Vlad777 / mit-stanford

MIT-Stanford MOOC mashup
2 stars 0 forks source link

Only getting 6 results #3

Closed Vlad777 closed 11 years ago

Vlad777 commented 11 years ago

I'm only getting the first 6 courses in the list. Expected data for 133 courses.

Vlad777 commented 11 years ago

Ok, I think the issue here is that the timeout is short on my machine... Not sure if it's possible to find a workaround besides increasing the server timeout configuration?

Vlad777 commented 11 years ago

It's not even a timeout. I'm getting the following error: PHP Fatal error: Allowed memory size of 20971520 bytes exhausted...

Vlad777 commented 11 years ago

Hmmm... I must need to configure my server limits to be increased.

[20-Apr-2013 22:21:14] PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 35 bytes) in simple_html_dom.php on line 131 [20-Apr-2013 22:30:35] PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 16 bytes) in simple_html_dom.php on line 1450 [20-Apr-2013 22:32:06] PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 42 bytes) in simple_html_dom.php on line 1333

Vlad777 commented 11 years ago

Right, make sure to call $html->clear(); each time when you call file_get_html.

See note about memory leak at the bottom of: http://www.phpbuilder.com/columns/PHP_HTML_DOM_parser/PHPHTMLDOMParser.cc_09-07-2011.php3

charslong commented 11 years ago

did that fix the problem?

Vlad777 commented 11 years ago

yes, calling $html->clear(); fixed the problem I was having with the memory leak. :)

reztic commented 11 years ago

I still see no fix to the problem, did you sync your local repo to the master?

charslong commented 11 years ago

I only closed it because vlad said $html->clear() fixed the problem. Vlad also uploaded a PHP file that builds on top of what MITpages.php that includes $html->clear() so i decided to close it.