From: twells at smarterliving dot com Operating system: RedHat 9 PHP version: 4.4.2 PHP Bug Type: *Compile Issues Bug description: Order of ./configure options can result in --enable-memory-limit being ignored
Description: ------------ The order of ./configure arguments can result in --enable-memory-limit functionality not being built into the binary. Reproduce code: --------------- 1) Build PHP with: ./configure --with-mysql=/usr --with-curl --with-gettext --with-mcrypt --with-dom --enable-inline --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-zlib-dir=/usr/lib --with-openssl --enable-ftp --with-apache=../apache_1.3.34 --enable-memcache --enable-mbstring --enable-memory-limit 2) Observe in the configure output that "checking whether to enable a memory limit... yes" 3) Install, make sure memory_limit is set in php.ini and restart apache and load phpinfo(). Observe there is no memory_limit value in the PHP Core output however --enable-memory-limit is listed in the Configure Command output. Test calls to memory_get_usage() will result in a PHP Fatal call to an undefined function. 4) Rebuild PHP with: ./configure --with-mysql=/usr --with-curl --with-gettext --with-mcrypt --with-dom --enable-inline --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-zlib-dir=/usr/lib --with-openssl --enable-ftp --enable-memory-limit --enable-memcache --enable-mbstring --with-apache=../apache_1.3.34 5) Again in the config output you should see: "checking whether to enable a memory limit... yes" 6) Install, restart apache, and load phpinfo(). memory_limit is now visible in the PHP Core output and functions like memory_get_usage() work again Expected result: ---------------- Both configure lines should result in an identical PHP build Actual result: -------------- --enable-memory-limit functionality is missing from the build. -- Edit bug report at http://bugs.php.net/?id=38136&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38136&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38136&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38136&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38136&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38136&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38136&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38136&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38136&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38136&r=support Expected behavior: http://bugs.php.net/fix.php?id=38136&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38136&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38136&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38136&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38136&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38136&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38136&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38136&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38136&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38136&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38136&r=mysqlcfg