- Forums
- MySQL
- PHP Memory_limit - Why Do I Get The Error Allowed Memory Size Of Xxx Bytes
this post will show you how to solve an error message you might be getting in your PHP script that says PHP Memory_limit - Why Do I Get The Error Allowed Memory Size Of Xxx Bytes, the answer you will find in this post [860], Last Updated: Sat May 18, 2024
bigger_travis
Mon Nov 06, 2006
2 Comments
17559 Visits
Why do I get the error Allowed memory size of Xxx bytes exhausted?
the answer is simple, you need to change your php.ini configuration as i describe below. did you know that you can also change it through .htaccess file?
CODE:
php_value memory_limit [new memory limit]
To change it to 24 MB, write:
CODE:
php_value memory_limit 24M
If the .htaccess method does not work or if you get an internal server error after adding this line, remove the line from the .htaccess again. You can also try to change the memory_limit by adding the following line right after '<?php ' in install/index.php and in main.php:
CODE:
ini_set("memory_limit","32M");
If there's no "memory_limit" parameter in your phpinfo page, then all PHP/Webserver processes are limited by the per process max memory limit. You'll have to ask an administrator to change the limit in this case. On linux/unix, you can check the limit with the following command in the shell:
CODE:
ulimit -a
Or with PHP with a script check.php
CODE:
<?php print system('ulimit -a'); ?>
https://www.wallpaperama.com/forums/php-memory-limit-why-do-i-get-the-error-allowed-memory-size-of-xxx-bytes-t461.html