Zend_Gdata and Fatal error: Allowed memory size

Querying Youtube for videos via Zend_Gdata and ran into memory issues when searching for up to 20 videos. It was a simple fix, just had to up my memory_limit in php.ini. It was at 8M and I set it to 12M and am not running into any more issues. If you are on a shared hosting environment, you can use init_set within the page:


<?php
ini_set
(“memory_limit”,“12M”);

?>


Just be careful what you set it to, as too high a limit could cause problems.If you have a page that consumes a lot of memory and you set it high, say 50M, and along comes something that requests the page a lot, maybe a search spider gone bad or malicious user, you could run out of memory on your server…

Leave a Reply