#40023 [Opn->Bgs]: memory_limit configuration seems to be ignored
| From: | tony2001@php.net | Date: | Thu, 04 Jan 2007 16:31:10 +0000 |
| Subject: | #40023 [Opn->Bgs]: memory_limit configuration seems to be ignored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107170@lists.php.net to get a copy of this message | ||
ID: 40023
Updated by: tony2001@php.net
Reported By: szoftos at freemail dot hu
-Status: Open
+Status: Bogus
Bug Type: PHP options/info functions
Operating System: Linux 2.4.33
PHP Version: 5.2.0
New Comment:
In PHP <= 5.2.0 you need to add --enable-memory-limit to the configure
line first.
In later versions memory limit will be always enabled.
Previous Comments:
------------------------------------------------------------------------
[2007-01-04 16:28:44] szoftos at freemail dot hu
Description:
------------
the memory_limit in php.ini won't be taken in use in php 5.2.0
i have set up to 8M in the configuration file, but when i get a
phpinfo(), there is no memory_limit option in the configuration
options.
ini_get also won't return any value, and i have experienced that in
this way one script can eat up all memory, causing messages like this
in the kernel log:
kernel: __alloc_pages: 0-order allocation failed (gfp=0x1d2/0)
kernel: VM: killing process php
kernel: VM: killing process mysqld
meanwhile the whole machine hangs.
i'm using lighttpd, with fastcgi extension. php is running under the
username of the virtualhost's user.
i have tested this with another virtualhost on the server, i couldn't
see it on the other site too.
php compile options:
'./configure' '--enable-mbstring' '--disable-static'
'--disable-debug'
'--enable-pic' '--enable-inline-optimization'
'--with-config-file-path=/etc/php5' '--enable-magic-quotes'
'--enable-debugger' '--enable-track-vars' '--enable-safe-mode'
'--with-regex=system' '--with-versioning' '--enable-sysvsem'
'--enable-sysvshm' '--with-mod_charset' '--enable-force-cgi-redirect'
'--without-mm' '--enable-trans-sid' '--with-dbase'
'--with-filepro'
'--enable-yp' '--enable-ftp' '--with-xml'
'--with-mysql=shared,/usr'
'--with-iconv' '--with-gettext' '--with-zlib=/usr'
'--with-gd=shared,/usr' '--with-mysql-sock=/tmp/mysql.sock'
'--enable-gd-native-ttf' '--with-png' '--with-ttf'
'--with-jpeg-dir=/usr' '--with-freetype-dir=/usr'
'--with-xpm-dir=/usr'
'--enable-fastcgi' '--enable-cgi' '--enable-discard-path'
Reproduce code:
---------------
<?
phpinfo();
ini_get('memory_limit');
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40023&edit=1