ID: 40023 User updated by: szoftos at freemail dot hu Reported By: szoftos at freemail dot hu Status: Bogus Bug Type: PHP options/info functions Operating System: Linux 2.4.33 PHP Version: 5.2.0 New Comment:
Hello Tony, Thanks for replying me in such a short time. I am recompiling now the php with that configuration option. I was planning to add ulimit memory restriction to the php interpreter, but now i'll try it that way. Thanks again, Laszlo Previous Comments: ------------------------------------------------------------------------ [2007-01-04 16:31:10] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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