From: phpbugs at thequod dot de Operating system: Ubuntu Linux PHP version: 4CVS-2006-04-29 (CVS) PHP Bug Type: CGI related Bug description: doc_root causes FastCGI to fail with "No input file specified." error
Description: ------------ If doc_root gets enabled with PHP 4.4.3-dev (cgi) (built: Apr 29 2006 02:13:25) it causes an "No input file specified." error. I've tried it with "--enable-discard-path", after first experiencing this error, but the result was the same as without this configure option. It fails on URLs like http://demo.b2evolution.net/HEAD.4/blogs/index.php?blog=2 (I've removed the doc_root option, so it won't fail there anymore), but strangely not on http://demo.b2evolution.net/phpinfo.4 ! The last (working) URL gets rewritten to /content.php4 internally (.htaccess): RewriteRule ^phpinfo(?:\.(4))?/?$ /content.php$2/$1 [L] The first (non-working) URL gets not rewritten, but is a "plain" existing file. NOTE: I'm using a chroot (with Apache's mod_chroot) and therefor also have a recursive symlink "/XXX" in the chroot "/XXX" itself - _maybe_ that could cause this. The problem does not appear with 5.1.3-cvs. Reproduce code: --------------- doc_root set in php.ini to the same as DocumentRoot in Apache 2. My configure: ./configure \ --prefix=/XXX/make/php4 \ --with-config-file-path=/etc/php4 \ --with-pear=/XXX/lib/php4 \ --enable-calendar \ --enable-exif \ --enable-fastcgi \ --enable-force-cgi-redirect \ --enable-gd-native-ttf \ --enable-inline-optimization \ --enable-mbstring \ --enable-memcache \ --enable-memory-limit \ --enable-sockets \ --enable-track-vars \ --with-bz2 \ --with-dom \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv \ --with-jpeg-6b \ --with-jpeg-dir \ --with-ldap \ --with-ldap-sasl \ --with-mysql \ --with-openssl \ --with-png-dir \ --without-mm \ --without-sqlite \ --with-pcre-regex \ --with-ttf \ --with-zlib \ --with-zlib-dir=/bin I've also tried --enable-discard-path (which is not recommened for fastcgi (in README.FastCGI), because of some hint in a "bogus" bug report, with the same result. The problem is probably in "sapi/cgi/cgi_main.c". I'd like to help debug this, but would need a hint, where to start. Expected result: ---------------- Page gets parsed by PHP. Actual result: -------------- "No input file specified." error gets thrown. -- Edit bug report at http://bugs.php.net/?id=37240&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37240&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37240&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37240&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37240&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37240&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37240&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37240&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37240&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37240&r=support Expected behavior: http://bugs.php.net/fix.php?id=37240&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37240&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37240&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37240&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37240&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37240&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37240&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37240&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37240&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37240&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37240&r=mysqlcfg