php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10439 relative chdir from root doesn?t work
Submitted: 2001-04-22 06:54 UTC Modified: 2001-10-29 04:01 UTC
From: php at gustl dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.5 OS: W98, W98SE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at gustl dot net
New email:
PHP Version: OS:

 

 [2001-04-22 06:54 UTC] php at gustl dot net
On w98 and w98se it is not possible to change from root directory (eg. c:\) to a relative subdirectory (e.g. windows). There is a delay of about 1 second. The same when accessing file functions (eg. is_dir, filesize) on filenames in the root directory without path (e.g. filesize ("msdos.sys"), no result is returned.

Try this script:

<?PHP
function mychdir ($text, $dir, $works) {
  echo "$text '$dir': "; flush();
  chdir ($dir);
  echo 
    "<font color=". ($works ? "green" : "red").">".
    str_replace ("\\", "/", getcwd ())."</FONT><BR>"; 
  flush ();
}
mychdir ("change to root", "/", true);
mychdir ("change to existing full path", "c:/windows/temp", true);
mychdir ("change to parent", "..", true);
mychdir ("change to relative subdir", "temp", true);
mychdir ("change to parent-parent", "../..", true);
mychdir ("change to root", "/", true);
mychdir ("change to relative subdir from root - does not work (notice the delay)", "windows", false);
?>

Gustav Graf

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-30 09:35 UTC] andi@php.net
Works fine in latest CVS under NT.
Please try 4.0.5 which should be released today and report back if your problem has been solved.
 [2001-05-02 16:24 UTC] php at gustl dot net
No, new version 4.0.5 didn't solve my problem, testesd under win98.
 [2001-05-02 16:29 UTC] andi@php.net
Do you happen to have an NT machine you can try and reproduce this on? I am on Windows 2000 and it works.
 [2001-05-02 16:34 UTC] php at gustl dot net
Sorry, my only win2000 system is an asp-mysql production system in a network center and not available for testing now. I will install php on this system maybe in two weeks.
 [2001-05-02 16:34 UTC] php at gustl dot net
asp-mssql
 [2001-10-29 02:44 UTC] sniper@php.net
Reopen if this happens with PHP 4.0.6. Also, try not to out-smart PHP's functions. They should know how to handle
different path separators and such things which are platform
specific.


--Jani

 [2001-10-29 04:01 UTC] php at gustl dot net
now it works (php 4.08dev). could you please explain "..not to out-smart ..",

gustav graf
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 11:01:30 2024 UTC