php-documentation-list | 2003101

[PHP-DOC] #25469 [Com]: PHP has problems with accessing files and directorys in a windows share From: f dot cassini at astra-srl dot com (phpdoc <email protected>)
Date: 10/02/03

 ID: 25469
 Comment by: f dot cassini at astra-srl dot com
 Reported By: christian at freemails dot at
 Status: Open
 Bug Type: Documentation problem
 Operating System: Windows NT 5.2 build 3790
 PHP Version: 4.3.3
 New Comment:

Same problem on Win 98 SE, cli version
If running the script on a network redirected drive (e.g. net use x:
\\server\share)

1: <?php
2:
3: include './test2.php';
4:
5: ?>

This is OK on W2000, on W98SE php says:
Warning: main(.\test2.php): failed to open stream: Invalid argument in
test.php on line 4

Warning: main(): Failed opening '.\test2.php' for inclusion
(include_path='.;c:\php4\pear') in test.php on line 4

the only workaround I found is putting test2.php on a local drive, e.g.
c:\

But this imply ANY lan pc MUST have its own set of 'included' php
sources...

Previous Comments:
------------------------------------------------------------------------

[2003-09-11 10:43:53] sniper <email protected>

See bug #13292 (the last comment by christoph grottolo)
Should be documented somewhere..

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

[2003-09-11 05:48:02] christian at freemails dot at

or better: How to check that?

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

[2003-09-11 05:47:12] christian at freemails dot at

well, I upgraded to 4.3.3 now.

But how to make sure that this is not a PHP bug? I am really sure that
it (the share and the files) is writable and readable.

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

[2003-09-10 18:43:19] sniper <email protected>

1. 4.3.3 is already released
2. And it's the permissions. Not bug.

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

[2003-09-10 11:25:48] christian at freemails dot at

Description:
------------
well, I expierenced today this error message (see the output field in
the bugreport)
But I checked it by running cmd.exe (the Windows NT standard shell) as
webserver user and I can simply access any files. The share is writable
and on a FAT32 partition so no chmods or so on apply.

Well some PHP details:
It seems that I can use any filesystem function in PHP to fail to
access it. (tested with file)
file_exists return false.
I am using PHP as apache module as distributed on www.php.net
Apache 1.3.28 with PHP 4.3.2
Something that maybe apply: Today I upgraded my Apache to 1.3.28 from
1.3.27.

Reproduce code:
---------------
<?php
var_dump( file("\\\\somehost\\someshare\\somefile.txt") );

/* (line 8 is quoted in the bugreport) */
 ?>

Actual result:
--------------
Warning: file(\\pc4\hd2\do_chroot) [function.file.php]: failed to open
stream: Permission denied in c:\programme\apache
group\apache\htdocs\somescript.php on line 8

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

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