Path

ez.no / ezpublish / documentation / configuration / troubleshooting / not enough php memory


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

Is that valid for a shared hosting account? Or do you need root access?

I tried it with the .htacces file in /home/username/public_html but that doesn't work out.

memory exhausted M - not MB

set memory_limit by htaccess:

<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)

Contents

Configuration

Configuration
Security
Optimization
Backup & Restore
Troubleshooting
    404 - Page not found
    Change the right configuration file
    Debug popup window infinite loops
    eZ publish 3 and Apache 2
    Getting looped back when logging in
    Giving you back the admin rights
    I need to reindex my site for search.
    Images do not work
    Mixing up node id and object id
    Not enough PHP memory
    Open_basedir restriction
    Permissions of cache files
    Problems with the translation function
    Process cache enabled reduces perform...
    User site instead of admin site
    Warning: Failed to write session data...
    What not to do with eZ


Created

05/05/2003
1:57:13 pm
by Karsten Jennissen

Last updated

12/07/2004
3:28:28 pm
by kracker

Authors

Karsten Jennissen
Tony Wood
humaneasy future internet technologies
zackwlg zackwlg
Bård Farstad
kracker



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.