开发者

Kohana and Simple HTML Dom parser are having issues

开发者 https://www.devze.com 2023-04-11 00:05 出处:网络
Trying to use the Simple HTM开发者_Python百科L Dom Parser in my application. Placed the sample function of scraping_slashdot() into a controller.

Trying to use the Simple HTM开发者_Python百科L Dom Parser in my application.

Placed the sample function of scraping_slashdot() into a controller.

include_once('includes/simple_html_dom.php');
$ret = $this->scraping_slashdot();
print_r($ret);

Get:

ErrorException [ Fatal Error ]: Allowed memory size of 134217728 bytes exhausted (tried to allocate 291337 bytes)

The thing is that when I do the exact same thing in a stand-alone file (not as a part of a Ko app), everything seems to work just fine.

Does anyone have any idea what it could be?

PS

Using Ko 3.2, haven't tried other versions, though I've used this class in 3.0 before just fine.


Your script is trying to allocate more memory then allowed. Try using a profiler (Xdebug) to see where does the leak come from or use workaround solution - ini_set('memory_limit', '-1') or set it directly in php.ini if you have access.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号