From: szoftos at freemail dot hu Operating system: Linux 2.4.33 PHP version: 5.2.0 PHP Bug Type: PHP options/info functions Bug description: memory_limit configuration seems to be ignored
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 bug report at http://bugs.php.net/?id=40023&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40023&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40023&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40023&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40023&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40023&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40023&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40023&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40023&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40023&r=support Expected behavior: http://bugs.php.net/fix.php?id=40023&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40023&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40023&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40023&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40023&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40023&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40023&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40023&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40023&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40023&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40023&r=mysqlcfg