E_ERROR (Allowed memory ... exhausted) |
Guru master
|
It is probably the wrong section and unlikely to be anything to do with PhpED
You probably need to increase the amount of memory that PHP is allowed to use. It looks like your PHP is currently limited to 128MB. The php.ini file will need editing. You can find the location of that file by using:
Find the line that says memory_limit and assign a new value such as 256M noting that you use M and not MB.
Then restart the web service (eg Apache) so that it picks up the change. With some web server configurations you can also do this from the .htaccess file:
Don't assign too much memory; very few scripts require more than 256MB and that is a common memory limit requirement for many web applications. Giving too much memory to PHP can also hide some script issues. If your script had an error causing it to run out of memory, more memory means it will take longer before it ultimately fails again. Some operations require more memory, image manipulation being a good example. Also the more PHP extensions you have loaded, the more memory you require, so only enable required extensions. |
||||||||||||||||||
|
|
Thanks very much for your detailed response, very much appreciate.
I increased the memory to 256 as suggested by still got the error. Not sure what to do now. Thank you for reading. |
||||||||||||
Last edited by kathekas on Tue Jun 03, 2014 12:08 am; edited 1 time in total |
Guru master
|
The error indicates your PHP still has the same memory available. If you do the phpinfo() again, how much does that show against memory_limit ?
|
||||||||||||
|
Site Admin
|
Then restart the web service (eg Apache) so that it picks up the change
|
||||||||||||
_________________ The PHP IDE team |
|
I am afraid I have been stupid. I altered the memory allocation for apache and not the webserver in PHPeD. Sorry.
The script I have is doing screen scraping. It saves the webpage to a file, which is 200k and extracts data from it. While parsing the file it does about 20 loops. With the memory increased to 500m, the programs crashes on the second iteration. Thank you very much for the help. |
||||||||||||
|
E_ERROR (Allowed memory ... exhausted) |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by