#42460 [NEW]: Working directory reporting inconsistent

From: Date: Tue, 28 Aug 2007 14:29:42 +0000
Subject: #42460 [NEW]: Working directory reporting inconsistent
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116770@lists.php.net to get a copy of this message
From: jgorny at orthodoxmarketplace dot com Operating system: Windows 2003 Server PHP version: 5.2.3 PHP Bug Type: Filesystem function related Bug description: Working directory reporting inconsistent Description: ------------ Pages using include() and require() are not finding files that are present using ISAPI. They are also not entirely working using CGI. The same pages are processed via CLI without incident. This bug may need to be split. Reproduce code: --------------- Running ISAPI, I created a page in the web root with the following code: <? // current directory echo getcwd() . "\n"; phpinfo(); ?> Expected result: ---------------- Using the CLI, pages with includes/requires load successfully and output code as expected without any warnings about files being missing or unavailable. I expect the same from running either ISAPI or CGI. These pages (and their permission sets) ran fine <= 5.1.6. Actual result: -------------- Repeatedly loading this page in a browser under ISAPI generates either the w3svc root (c:/windows/inetserv or equiv.) or else a random directory beyond the actual web root being loaded from (e:\webroot\images.) As a result, a page in the root called "bob.php" that runs include("./mary.php") fails, stating it is unable to find Mary. Loading this page under CGI generates the correct root for the main document being loaded, but does not seem to traverse directories well - a page locatied in root called "bob.php" will include('./mary.php') successfully, but when ./mary.php tries to include('/steve.php') it fails, citing that it cannot find '/steve.php'. -- Edit bug report at http://bugs.php.net/?id=42460&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42460&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42460&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42460&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42460&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42460&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42460&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42460&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42460&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42460&r=support Expected behavior: http://bugs.php.net/fix.php?id=42460&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42460&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42460&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42460&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42460&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42460&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42460&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42460&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42460&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42460&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42460&r=mysqlcfg

« previous php.bugs (#116770) next »