Ask a Question related to PHP Bugs, Design and Development.
-
ras at fyn dot dk #1
#38820 [NEW]: chdir(".") and chdir("..") don't work with Apache 2.0+
From: ras at fyn dot dk
Operating system: Win XP SP2
PHP version: 5.1.6
PHP Bug Type: Directory function related
Bug description: chdir(".") and chdir("..") don't work with Apache 2.0+
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under Apache
2.0 or newer, using either the php5 module or the CGI binary, the function
changes the current directory to the Apache application folder, rather
than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3, 2.0.59
and 2.0.55 - all tested with both the php5 module and the CGI binary, all
with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says that
"this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
--
Edit bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=38820&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=38820&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=38820&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=38820&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=38820&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=38820&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=38820&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=38820&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=38820&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=38820&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=38820&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=38820&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=38820&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=38820&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=38820&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=38820&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=38820&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=38820&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=38820&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=38820&r=mysqlcfg[/url]
ras at fyn dot dk Guest
-
#28327 [Com]: chdir("..") not working in PHP5 on WinNT4
ID: 28327 Comment by: ras at fyn dot dk Reported By: zajdee at seznam dot cz Status: No Feedback Bug Type: ... -
CFINPUT type="radio" w/ "value" requires "label"
On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'... -
FScommand("Exec","myapplication.exe") doesnot work on Trial version MX?
i think projector in this case is meant to be a .exe file not a test.swf like you mentioned. goto File, Publish Settings... and there under the... -
"wrong argument type nil (expected String)" from Dir.chdir
I'm running Ruby 1.6.8. Can anybody tell me why this line: Dir.chdir("/") results in the error "wrong argument type nil (expected String)"... -
How to make the "search text" feature work with non "txt" file
On Fri, 27 Jun 2003 07:19:23 -0700, "Juergen" <anhorn@bktel.com> wrote: See MVP Doug Knox' comments and fix here:... -
tony2001@php.net #2
#38820 [Opn->Fbk]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
Updated by: [email]tony2001@php.net[/email]
Reported By: ras at fyn dot dk
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
Previous Comments:
------------------------------------------------------------------------
[2006-09-14 06:40:02] ras at fyn dot dk
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under
Apache 2.0 or newer, using either the php5 module or the CGI binary,
the function changes the current directory to the Apache application
folder, rather than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3,
2.0.59 and 2.0.55 - all tested with both the php5 module and the CGI
binary, all with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says
that "this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
tony2001@php.net Guest
-
ras at fyn dot dk #3
#38820 [Fbk->Opn]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
User updated by: ras at fyn dot dk
Reported By: ras at fyn dot dk
-Status: Feedback
+Status: Open
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
Previous Comments:
------------------------------------------------------------------------
[2006-09-14 08:50:01] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-14 06:40:02] ras at fyn dot dk
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under
Apache 2.0 or newer, using either the php5 module or the CGI binary,
the function changes the current directory to the Apache application
folder, rather than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3,
2.0.59 and 2.0.55 - all tested with both the php5 module and the CGI
binary, all with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says
that "this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
ras at fyn dot dk Guest
-
tony2001@php.net #4
#38820 [Opn]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
Updated by: [email]tony2001@php.net[/email]
Reported By: ras at fyn dot dk
Status: Open
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Not reproducible on Linux with Apache2.0.55 worker/prefork.
Previous Comments:
------------------------------------------------------------------------
[2006-09-14 11:21:56] ras at fyn dot dk
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
------------------------------------------------------------------------
[2006-09-14 08:50:01] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-14 06:40:02] ras at fyn dot dk
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under
Apache 2.0 or newer, using either the php5 module or the CGI binary,
the function changes the current directory to the Apache application
folder, rather than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3,
2.0.59 and 2.0.55 - all tested with both the php5 module and the CGI
binary, all with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says
that "this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
tony2001@php.net Guest
-
ras at fyn dot dk #5
#38820 [Opn]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
User updated by: ras at fyn dot dk
Reported By: ras at fyn dot dk
Status: Open
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
No, it does not reproduce on Linux, as said, the bug appears to be
specific to the Windows port.
Previous Comments:
------------------------------------------------------------------------
[2006-09-25 13:04:23] [email]tony2001@php.net[/email]
Not reproducible on Linux with Apache2.0.55 worker/prefork.
------------------------------------------------------------------------
[2006-09-14 11:21:56] ras at fyn dot dk
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
------------------------------------------------------------------------
[2006-09-14 08:50:01] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-14 06:40:02] ras at fyn dot dk
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under
Apache 2.0 or newer, using either the php5 module or the CGI binary,
the function changes the current directory to the Apache application
folder, rather than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3,
2.0.59 and 2.0.55 - all tested with both the php5 module and the CGI
binary, all with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says
that "this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
ras at fyn dot dk Guest
-
iliaa@php.net #6
#38820 [Opn->Fbk]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
Updated by: [email]iliaa@php.net[/email]
Reported By: ras at fyn dot dk
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
Previous Comments:
------------------------------------------------------------------------
[2006-09-26 06:19:26] ras at fyn dot dk
No, it does not reproduce on Linux, as said, the bug appears to be
specific to the Windows port.
------------------------------------------------------------------------
[2006-09-25 13:04:23] [email]tony2001@php.net[/email]
Not reproducible on Linux with Apache2.0.55 worker/prefork.
------------------------------------------------------------------------
[2006-09-14 11:21:56] ras at fyn dot dk
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
------------------------------------------------------------------------
[2006-09-14 08:50:01] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-14 06:40:02] ras at fyn dot dk
Description:
------------
When using chdir() with relative folders (e.g. "." and ".."), under
Apache 2.0 or newer, using either the php5 module or the CGI binary,
the function changes the current directory to the Apache application
folder, rather than a folder relative to the current folder.
Tested with PHP 5.1.6, and current 5.2.x-dev, under Apache 2.2.3,
2.0.59 and 2.0.55 - all tested with both the php5 module and the CGI
binary, all with same result.
Bug appears to be specific to the Windows port of PHP.
Apache 1.3.37 exhibits no similar problems.
I filed this bug with Apache, but Ruediger Pluem at apache.org says
that "this is clearly a PHP bug":
[url]http://issues.apache.org/bugzilla/show_bug.cgi?id=40496[/url]
Reproduce code:
---------------
// create the "test" folder before running the script!
echo getcwd() . "<br />";
chdir("test");
echo getcwd() . "<br />";
chdir("..");
echo getcwd() . "<br />";
chdir("..");
echo getcwd();
Expected result:
----------------
C:\Web
C:\Web\test
C:\Web
C:\
Actual result:
--------------
C:\Web
C:\Web\test
C:\Programmer\Apache Group
C:\Programmer\Apache Group
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
iliaa@php.net Guest
-
ras at fyn dot dk #7
#38820 [Fbk->Opn]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
User updated by: ras at fyn dot dk
Reported By: ras at fyn dot dk
-Status: Feedback
+Status: Open
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Installed under a clean Apache 2.2.3, and it worked!
Thank you for your fast response! :)
Should I change the status of this bug, or will an admin do that?
Previous Comments:
------------------------------------------------------------------------
[2006-09-26 17:30:34] [email]iliaa@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-26 06:19:26] ras at fyn dot dk
No, it does not reproduce on Linux, as said, the bug appears to be
specific to the Windows port.
------------------------------------------------------------------------
[2006-09-25 13:04:23] [email]tony2001@php.net[/email]
Not reproducible on Linux with Apache2.0.55 worker/prefork.
------------------------------------------------------------------------
[2006-09-14 11:21:56] ras at fyn dot dk
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
------------------------------------------------------------------------
[2006-09-14 08:50:01] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
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
[url]http://bugs.php.net/38820[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
ras at fyn dot dk Guest
-
tony2001@php.net #8
#38820 [Opn->Csd]: chdir(".") and chdir("..") don't work with Apache 2.0+
ID: 38820
Updated by: [email]tony2001@php.net[/email]
Reported By: ras at fyn dot dk
-Status: Open
+Status: Closed
Bug Type: Directory function related
Operating System: Win XP SP2
PHP Version: 5.1.6
New Comment:
Fixed -> closed.
Previous Comments:
------------------------------------------------------------------------
[2006-09-27 07:04:14] ras at fyn dot dk
Installed under a clean Apache 2.2.3, and it worked!
Thank you for your fast response! :)
Should I change the status of this bug, or will an admin do that?
------------------------------------------------------------------------
[2006-09-26 17:30:34] [email]iliaa@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.2-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]
------------------------------------------------------------------------
[2006-09-26 06:19:26] ras at fyn dot dk
No, it does not reproduce on Linux, as said, the bug appears to be
specific to the Windows port.
------------------------------------------------------------------------
[2006-09-25 13:04:23] [email]tony2001@php.net[/email]
Not reproducible on Linux with Apache2.0.55 worker/prefork.
------------------------------------------------------------------------
[2006-09-14 11:21:56] ras at fyn dot dk
Tony, as said - I already tried the current snapshot, downloaded the
latest development release yesterday.
Unless it was fixed and updated today, I'm sorry, but I don't have time
to uninstall, reinstall and reconfigure Apache and PHP again just now.
My current Apache 1.3 installation works just fine for me - I only use
the Windows release for testing and development on my workstation...
------------------------------------------------------------------------
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
[url]http://bugs.php.net/38820[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=38820&edit=1[/url]
tony2001@php.net Guest



Reply With Quote

