Bug #40163 [Com]: UNC Path not working

2010-12-03 Thread v-ryanbi at microsoft dot com
Edit report at http://bugs.php.net/bug.php?id=40163&edit=1

 ID: 40163
 Comment by: v-ryanbi at microsoft dot com
 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:

I cannot replicate this bug. Using the following script under IIS 

(with and without fastcgi.impersonate), under Apache2.2, and via 

CLI, all with recommended INI settings for both 5.3.4RC2 and 

5.2.15RC2, I get expected output:



'test_folder',

'missing'=>'not_here',

'file'=>'foo.txt',

);

foreach( $targets as $name => $target ) {

echo $name."\n";

$path = $share . DIRECTORY_SEPARATOR . $target;

echo '  path:   '; var_dump( $path );

echo '  is_dir: '; var_dump( is_dir( $path ) );

}

echo '---TEST-TWO---'."\n";

$bartxt = fopen( ( $share . DIRECTORY_SEPARATOR . 'bar.txt' ), "w" ) 

  or false;

if( !$bartxt ) {

echo 'failed to open stream';

} else {

fwrite( $bartxt, 'FUBAR '.time() );

fclose( $bartxt );

echo 'wrote file.';

}?>



Example result (IIS with impersonation):



---TEST-ONE---

exists

  path:   string(43) "\\win7-share-af04\share\test_folder"

  is_dir: bool(true)

missing

  path:   string(40) "\\win7-share-af04\share\not_here"

  is_dir: bool(false)

file

  path:   string(39) "\\win7-share-af04\share\foo.txt"

  is_dir: bool(false)

---TEST-TWO---

wrote file.



The file is created properly and is_dir reports accurately in 

all scenarios, except that which I don't have permission to see 

the share or the share is inaccessible. Have you tried using 

procmon to see the request for the file and the filesystem's 

response?


Previous Comments:

[2010-11-26 19:37:30] hjan at libero dot it

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:



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) [function.fopen]: 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


[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() [function.mkdir]:
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:





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




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


Bug #40163 [Com]: UNC Path not working

2010-11-26 Thread hjan at libero dot it
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:



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) [function.fopen]: 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() [function.mkdir]:
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:





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


Bug #40163 [Com]: UNC Path not working

2010-11-26 Thread hjan at libero dot it
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:

still no luck with 5.3.4RC1

php[4452]

PHP Warning:  mkdir() [function.mkdir]:
Invalid argument in C:\ETT\SITI\moodle\lib\setuplib.php on line 167


Previous Comments:

[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:





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.


[2010-09-13 12:02:44] as at 24h dot de

Still unresolved in PHP 5.3.1


[2008-07-15 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".




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


Bug #40163 [Com]: UNC Path not working

2010-11-25 Thread hjan at libero dot it
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:

PHP 5.3.3, windows 2008 R2, IIS 7.5.

This simple page:





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


Previous Comments:

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

Try with 5.3.3, it works just fine here.


[2010-09-13 12:02:44] as at 24h dot de

Still unresolved in PHP 5.3.1


[2008-07-15 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2008-07-07 19:11:35] abaranenko at gmail dot com

It did not work with version 2.5.7

Still unresolved.

I've tried many different combinations.

The shared directory with this ALL permission.

PS.: My English is bad bad.


[2008-07-07 15:11:43] fel...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi






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


Bug #40163 [Com]: UNC Path not working

2010-09-13 Thread as at 24h dot de
Edit report at http://bugs.php.net/bug.php?id=40163&edit=1

 ID: 40163
 Comment by: as at 24h dot de
 Reported by:coyle at washpenn dot com
 Summary:UNC Path not working
 Status: No Feedback
 Type:   Bug
 Package:Directory function related
 Operating System:   Windows 2003
 PHP Version:5.2.0
 Block user comment: N

 New Comment:

Still unresolved in PHP 5.3.1


Previous Comments:

[2008-07-15 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2008-07-07 19:11:35] abaranenko at gmail dot com

It did not work with version 2.5.7

Still unresolved.

I've tried many different combinations.

The shared directory with this ALL permission.

PS.: My English is bad bad.


[2008-07-07 15:11:43] fel...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




[2008-07-07 14:39:06] abaranenko at gmail dot com

I have the same problem.

We have tried different settings:

file://10.1.1.7 (shared folder)

\\ 2 bars

 4 bars

All the settings possible, no been successful.

Use PHP 5.2.5. Below the 5.1 versions work.



No command operates on a network:

is_dir, file_exists.



Help


[2008-05-13 15:47:38] julienlembo at free dot fr

I exerience the same problem.

My UNC path is correct but is_dir function is in trouble




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


#40163 [Com]: UNC Path not working

2008-07-07 Thread abaranenko at gmail dot com
 ID:   40163
 Comment by:   abaranenko at gmail dot com
 Reported By:  coyle at washpenn dot com
 Status:   Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.2.0
 New Comment:

It did not work with version 2.5.7
Still unresolved.
I've tried many different combinations.
The shared directory with this ALL permission.
PS.: My English is bad bad.


Previous Comments:


[2008-07-07 15:11:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-07-07 14:39:06] abaranenko at gmail dot com

I have the same problem.
We have tried different settings:
file://10.1.1.7 (shared folder)
\\ 2 bars
 4 bars
All the settings possible, no been successful.
Use PHP 5.2.5. Below the 5.1 versions work.

No command operates on a network:
is_dir, file_exists.

Help



[2008-05-13 15:47:38] julienlembo at free dot fr

I exerience the same problem.
My UNC path is correct but is_dir function is in trouble



[2008-03-06 13:20:27] brianelley at gmail dot com

I don't know why this is was not continued by Coyle, but, this bug is
still persisting even today. I am bound with this setup because of some
other packages but I am unable to create folders or files on a network.
This is really critical for the application. 

Can some one please reopen this bug as this is really urgent and its
been a week that I am struggling with this. 

Brian.. [EMAIL PROTECTED]



[2007-01-28 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



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



#40163 [Com]: UNC Path not working

2008-07-07 Thread abaranenko at gmail dot com
 ID:   40163
 Comment by:   abaranenko at gmail dot com
 Reported By:  coyle at washpenn dot com
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.2.0
 New Comment:

I have the same problem.
We have tried different settings:
file://10.1.1.7 (shared folder)
\\ 2 bars
 4 bars
All the settings possible, no been successful.
Use PHP 5.2.5. Below the 5.1 versions work.

No command operates on a network:
is_dir, file_exists.

Help


Previous Comments:


[2008-05-13 15:47:38] julienlembo at free dot fr

I exerience the same problem.
My UNC path is correct but is_dir function is in trouble



[2008-03-06 13:20:27] brianelley at gmail dot com

I don't know why this is was not continued by Coyle, but, this bug is
still persisting even today. I am bound with this setup because of some
other packages but I am unable to create folders or files on a network.
This is really critical for the application. 

Can some one please reopen this bug as this is really urgent and its
been a week that I am struggling with this. 

Brian.. [EMAIL PROTECTED]



[2007-01-28 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2007-01-20 22:48:58] [EMAIL PROTECTED]

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.



[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.



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



#40163 [Com]: UNC Path not working

2008-05-13 Thread julienlembo at free dot fr
 ID:   40163
 Comment by:   julienlembo at free dot fr
 Reported By:  coyle at washpenn dot com
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.2.0
 New Comment:

I exerience the same problem.
My UNC path is correct but is_dir function is in trouble


Previous Comments:


[2008-03-06 13:20:27] brianelley at gmail dot com

I don't know why this is was not continued by Coyle, but, this bug is
still persisting even today. I am bound with this setup because of some
other packages but I am unable to create folders or files on a network.
This is really critical for the application. 

Can some one please reopen this bug as this is really urgent and its
been a week that I am struggling with this. 

Brian.. [EMAIL PROTECTED]



[2007-01-28 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2007-01-20 22:48:58] [EMAIL PROTECTED]

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.



[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



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



#40163 [Com]: UNC Path not working

2008-03-06 Thread brianelley at gmail dot com
 ID:   40163
 Comment by:   brianelley at gmail dot com
 Reported By:  coyle at washpenn dot com
 Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows 2003
 PHP Version:  5.2.0
 New Comment:

I don't know why this is was not continued by Coyle, but, this bug is
still persisting even today. I am bound with this setup because of some
other packages but I am unable to create folders or files on a network.
This is really critical for the application. 

Can some one please reopen this bug as this is really urgent and its
been a week that I am struggling with this. 

Brian.. [EMAIL PROTECTED]


Previous Comments:


[2007-01-28 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2007-01-20 22:48:58] [EMAIL PROTECTED]

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.



[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.



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