Edit report at https://bugs.php.net/bug.php?id=65226&edit=1
ID: 65226 Updated by: a...@php.net Reported by: josh at servebyte dot com Summary: chroot() does not get enabled Status: Feedback Type: Bug Package: CGI/CLI related Operating System: Debian 7 PHP Version: 5.5.0 Block user comment: N Private report: N New Comment: That's clear that you can trick it to out the desired define :) ... Ok, i also see 'checking for chroot ... yes', but i do --enable-cgi --enable-cli too, not just ./configure . That might be the difference. Haven't looked where PHP_SAPI is set, you could debug it. config.nice is created once ./configure was run, so you don't have to type all the options again. Previous Comments: ------------------------------------------------------------------------ [2013-07-10 17:24:46] josh at servebyte dot com There's no file called config.nice in the 5.5.0 tar? ./configure | grep chroot checking for chroot... yes I can get it working by editing the configure file and commenting these lines like so; if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = $ $as_echo "#define ENABLE_CHROOT_FUNC 1" >>confdefs.h fi to #if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = $ $as_echo "#define ENABLE_CHROOT_FUNC 1" >>confdefs.h #fi The variable $PHP_SAPI is set to "none" so it seems to be a configure bug of some sort. ------------------------------------------------------------------------ [2013-07-10 17:09:48] a...@php.net #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC thats what has to match. please post the output of ./config.nice | grep chroot ------------------------------------------------------------------------ [2013-07-10 16:51:01] josh at servebyte dot com PHP 5.3... during the configure $PHP_SAPI is set to: cgi PHP 5.5... during the configure $PHP_SAPI is set to: none ------------------------------------------------------------------------ [2013-07-10 16:43:08] josh at servebyte dot com However the problem is in PHP 5.4 too #php -r "chroot();" Fatal error: Call to undefined function chroot() in Command line code on line 1 PHP 5.4.17 (cli) (built: Jul 10 2013 17:36:53) ------------------------------------------------------------------------ [2013-07-10 16:00:25] josh at servebyte dot com Seems to work fine with PHP 5.3 # php -r "chroot();" Warning: chroot() expects exactly 1 parameter, 0 given in Command line code on line 1 PHP 5.3.26 (cli) (built: Jul 10 2013 16:52:53) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=65226 -- Edit this bug report at https://bugs.php.net/bug.php?id=65226&edit=1