Bug #55726 [Asn->Csd]: Changing the working directory makes router script inaccessible
| From: | laruence@php.net | Date: | Tue, 20 Sep 2011 07:06:46 +0000 |
| Subject: | Bug #55726 [Asn->Csd]: Changing the working directory makes router script inaccessible | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163697@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55726&edit=1
ID: 55726
Updated by: laruence@php.net
Reported by: thomas at weinert dot info
Summary: Changing the working directory makes router script
inaccessible
-Status: Assigned
+Status: Closed
Type: Bug
Package: Built-in web server
Operating System: Windows
PHP Version: 5.4.0beta1
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-09-20 07:06:37] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=317040
Log: Fix Bug #55726 (Changing the working directory makes router script inaccessible)
------------------------------------------------------------------------
[2011-09-19 12:13:34] thomas at weinert dot info
Description:
------------
A router script that calls 'chdir()' to set the working directory for scripts in
subdirectories is not found in the next request.
The first request works fine, but the second request outputs an error.
The problem can be avoided using an absolute path for the router script in command line.
Test script:
---------------
<?php
// a subdirectory "admin" is needed
chdir(__DIR__.'/admin');
echo 'Hallo Welt';
Expected result:
----------------
Hallo Welt
Actual result:
--------------
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'chdir-bug.php'
(include_path='.;C:\php\pear') in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55726&edit=1