php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22051 Two level relative paths broken
Submitted: 2003-02-04 12:42 UTC Modified: 2003-02-20 08:06 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chris at support dot wso dot net Assigned:
Status: No Feedback Package: Directory function related
PHP Version: 4CVS-2003-02-04 (stable) OS: BSDI 4.x
Private report: No CVE-ID: None
 [2003-02-04 12:42 UTC] chris at support dot wso dot net
Build line:
./configure --with-mysql=/usr/local --with-apache=../apache_1.3.27 --with-config-file-path=/etc --enable-ftp --enable-trans-sid


All of our include statements throughout about 15 scripts use two levels of path levels "../.." for ease of implementation across separate web servers.

Test is here:
http://norgate.wso.net/datafeed/test.php

PHP seems to have some serious path parsing issues when run from Apache 1.3.27 as a compiled module.

This is the entire script souce of the above URL:
 
<?
 
echo "Current dir is<br>";
echo getcwd() . "<br>";
echo '<hr>';
 
echo 'chdir("..");<br>';
chdir("..");
echo getcwd() . "<br>";
echo '<hr>';
 
echo 'chdir ("datafeed/onlinestatus");<br>';
chdir ("datafeed/onlinestatus");
echo getcwd() . "<br>";
echo '<hr>';

?>

As you can see, fairly straightforward but it seems to barf when you attempt more than one level of directory changes in a path.

We've also tried the regular 4.3.0 build, same issue.

Our previous build was 4.1.2 as a CGI and it didn't
have this problem.

Any help would be appreciated. Thank you!

-Chris
WSO

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-11 17:40 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I am unable to replicate the bug using the latest PHP in both CLI or Apache sapis.
 [2003-02-11 17:41 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

oops, set the wrong bug status.
 [2003-02-20 08:06 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 16:01:28 2024 UTC