Edit report at http://bugs.php.net/bug.php?id=40163&edit=1

 ID:                 40163
 Comment by:         hjan at libero dot it
 Reported by:        coyle at washpenn dot com
 Summary:            UNC Path not working
 Status:             Feedback
 Type:               Bug
 Package:            Directory function related
 Operating System:   Windows 2003
 PHP Version:        5.3
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Here the SO as showed by phpinfo : 

Windows NT W-WEB01 6.1 build 7600 (Unknow Windows version Standard
Edition) i586 

it's a Windows 2008 R2 Standard

IIS application pool runs with a domain administrator account. Share
runs on another server, W2003 STD, everyone users has full rights on
both share permission and physical folder permission.

With this test page named testdir.php:

<?php

$path = '\\\\ett2\\tempdb\\';





$f = fopen($path . "somefile.txt", "w") or die ("can't open");

fwrite($f,"AAAAA"); 

print  'wroted-----';

fclose($f);





if(is_dir($path)) {

   print 'directory' . $path . 'exists';

} else {

   print 'directory' . $path . ' does not exists';

}

?>

I obtain "can't open" on the web page and this message on the event
log:

The description for Event ID 2 from source PHP-5.3.4RC1 cannot be found.
Either the component that raises this event is not installed on your
local computer or the installation is corrupted. You can install or
repair the component on the local computer.



If the event originated on another computer, the display information had
to be saved with the event.



The following information was included with the event: 



php[3852]

PHP Warning:  fopen(\\ett2\tempdb\somefile.txt) [<a
href='function.fopen'>function.fopen</a>]: failed to open stream:
Invalid argument in [sitephysicalpath]\testdir.php on line 5



Let me know if you need more information or if i could help with more
test.

Regards,

Gianluca


Previous Comments:
------------------------------------------------------------------------
[2010-11-26 18:16:15] paj...@php.net

Not sure what C:\ETT\SITI\moodle\lib\setuplib.php is, but mkdir & co
work just fine here (various windows). Please provide a small script
with an explanation of your configuration (OS version where php runs, OS
where the UNC target is).

------------------------------------------------------------------------
[2010-11-26 16:33:54] hjan at libero dot it

still no luck with 5.3.4RC1

php[4452]

PHP Warning:  mkdir() [<a href='function.mkdir'>function.mkdir</a>]:
Invalid argument in C:\ETT\SITI\moodle\lib\setuplib.php on line 167

------------------------------------------------------------------------
[2010-11-26 12:33:34] paj...@php.net

Please try using 5.3.4RC1.

------------------------------------------------------------------------
[2010-11-26 08:53:06] hjan at libero dot it

PHP 5.3.3, windows 2008 R2, IIS 7.5.

This simple page:

<?php

$path = '\\\\server\\share\\';



$f = fopen($path . "somefile.txt", "w") or die ("can't open");

fwrite($f,"AAAAA"); 

print  'wroted-----';

fclose($f);



if(is_dir($path)) {

   print 'directory' . $path . 'exists';

} else {

   print 'directory' . $path . ' does not exists';

}

?>



return me PHP Warning: fopen(\\server\share\somefile.txt)
[function.fopen]: failed to open stream: Invalid argument in
C:\xxx\xxx\moodle\testdir.php on line 4 



If I comment the write function I obtain :

directory\\server\share\ does not exists

------------------------------------------------------------------------
[2010-09-13 12:53:24] paj...@php.net

Try with 5.3.3, it works just fine here.

------------------------------------------------------------------------


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/bug.php?id=40163


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=40163&edit=1

Reply via email to