ez.no / ezpublish / documentation / configuration / troubleshooting / not enough php memory
These documentation pages are no longer maintained. Please visit the new documentation site.
Having not enough memory can cause all kinds of problems, which don't necessarily have to lead to the "out of memory" error message. If you get the error message or any kind of weird non-tracable behaviour (page not found, blank screens, etc.) after the initial install, try raising the memory as explained below.
On some configurations, eZ publish 3 needs more than 8Mb internal memory, especially when loaded for the first time.
Please raise the memorylimit for php, i.e. set
php_admin_value memory_limit 20M
in the (virtual) server config or set
memory_limit 20M
directly in the PHP configuration file php.ini.
You can also try to set it in the PHP file start using the function
ini_set ( "memory_limit", "20M")
wich sets the value of the given configuration option. Returns the old value on success, FALSE on failure. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.
If your Webspace is able to handle ".htaccess" files then you could also set it by adding the following line
php_value memory_limit 20M
which avoid the need to include the previous instruction at the start of ALL PHP scripts.
-----
Note #1. Not all the available options can be changed using ini_set(). This can be changed/set (as of PHP 4.2.0) at level PHP_INI_ALL (Entry can be set anywhere).
Get more detailed info about ini_set() at http://www.php.net/manual/en/function.ini-set.php
Note #2. This can also be caused by a PHP acellerator not clearing memory.
Comments
Shared hosting
Wim Stander
Wednesday 18 February 2004 3:46:23 pm
I tried it with the .htacces file in /home/username/public_html but that doesn't work out.
memory exhausted M - not MB
Sepp Spalt
Wednesday 21 January 2004 1:28:41 pm
<FilesMatch "\.(php|html?)$">
php_value memory_limit 20M
</FilesMatch>
this I write in my .htaccess and it works.
type 20M ( not 20MB as written in documentation)