ID: 40163
Updated by: [EMAIL PROTECTED]
Reported By: coyle at washpenn dot com
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: Windows 2003
PHP Version: 5.2.0
New Comment:
You do need to escape \ even under single quotes, so your first example
is fine:
$path = '\\\\server\\share\\directory\\';
Are you running PHP under a web server? This sounds to me like
permissions issue? Could you try running php.exe from command line and
see if the result is any different.
Previous Comments:
------------------------------------------------------------------------
[2007-01-19 14:33:54] coyle at washpenn dot com
Above:
$path = '\\server\share\directory';
Should be:
$path = '\\\\server\share\directory';
I am running out of things to try here. When I print $path, I get a
valid UNC path with no spaces anywhere but I still get the error above.
------------------------------------------------------------------------
[2007-01-19 14:27:23] coyle at washpenn dot com
$path = "\\\\server\\share\\directory";
or
$path = '\\server\share\directory';
Doesn't matter which I try ... I've tried many different combinations
to produce the path in both 5.2.0 or 5.2.1 RC4-dev and none of them
work. Everything was fine in php <= 5.1.6
------------------------------------------------------------------------
[2007-01-19 14:09:15] [EMAIL PROTECTED]
Double slashes are needed only with double quotes, because "\x" means
an escape character.
------------------------------------------------------------------------
[2007-01-19 13:05:37] coyle at washpenn dot com
Better Example:
$path = '\\\\server\\share\\directory\\';
mkdir($path, 0770);
Warning: mkdir() [function.mkdir]: Invalid argument in <file> on line
<line>
------------------------------------------------------------------------
[2007-01-19 08:08:04] [EMAIL PROTECTED]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
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
http://bugs.php.net/40163
--
Edit this bug report at http://bugs.php.net/?id=40163&edit=1