php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29048 UNC path and mapping lead to different behaviour for exec() function
Submitted: 2004-07-07 14:43 UTC Modified: 2004-07-08 12:23 UTC
From: phpbug at volcane dot fr Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.7 OS: windows XP pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbug at volcane dot fr
New email:
PHP Version: OS:

 

 [2004-07-07 14:43 UTC] phpbug at volcane dot fr
Description:
------------
Hi,

I've got a strange behaviour with apache 2.0.49 running a PHP (4.3.7) script, and I don't know if it is a bug, and if it's a bug, if it is related to PHP or apache.

I use a virtual host, with a document root on a network drive (on a linux box, with samba).
If I configure the virtual host with a path like "z:/path", everything works fine BUT apache cannot run as a service, as the z: mapping is done  in the interactive session environment.
In this configuration, the PHP command "exec('cd')" outputs "z:\path".

Thus, I use the preferred UNC notation for my virtual host : "//host/share/path" . But if I do that, the PHP command "exec('cd')" outputs "c:\windows".

Therefore all my commands executed through exec() have a different behaviour depending on the notation of the DocumentRoot (there's also a Directory directive for the same location), even if, physically, it points to the same location.

I had to stop considering running apache as a service for this configuration (hopefully, it's only a development system).

So, is it a bug ? and if so, an apache one, or a PHP one ?
My opinion is that it is a bug, as it prevents me from running the application as a service in this network configuration.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-08 11:15 UTC] sniper@php.net
No, it's not a bug. Apache just uses different working directory when you start it differently.

 [2004-07-08 12:23 UTC] phpbug at volcane dot fr
I don't talk about *the way* apache is started, but about the behaviour that changes depending on the *notation* of the path of the document root, that points to the same location.
I talked about service/command line only for explaining why it is important for me.

Of course, maybe it is an apache bug, and not a php one. I cannot comment on this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 15:01:33 2024 UTC