From: phpbug at volcane dot fr
Operating system: windows XP pro
PHP version: 4.3.7
PHP Bug Type: Unknown/Other Function
Bug description: UNC path and mapping lead to different behaviour for exec() function
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.
--
Edit bug report at http://bugs.php.net/?id=29048&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29048&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29048&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29048&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29048&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29048&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29048&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29048&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29048&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29048&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29048&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29048&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29048&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29048&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29048&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29048&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29048&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29048&r=float