PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #25469 PHP has problems with accessing files and directorys in a windows share
Submitted:10 Sep 2003 11:25am UTC Modified: 18 Sep 2004 11:18am UTC
From:christian at freemails dot at Assigned to:
Status:Bogus Category:Documentation problem
Version:4.3.3 OS:Windows NT 5.2 build 3790
Votes:2 Avg. Score:5.0 ± 0.0 Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%) Same OS:1 (50.0%)
View/Vote Developer Edit Submission

Welcome! If you don't have a SVN account, you can't do anything here. You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
SVN Username: SVN Password:
Quick Fix:
Status: Assign to:
Category:
Summary:
From: christian at freemails dot at
New email:
Version: OS:
New/Additional Comment:

[10 Sep 2003 11:25am UTC] 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
[10 Sep 2003 6:43pm UTC] sniper@php.net
1. 4.3.3 is already released
2. And it's the permissions. Not bug.

[11 Sep 2003 5:47am UTC] 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.
[11 Sep 2003 5:48am UTC] christian at freemails dot at
or better: How to check that?
[11 Sep 2003 10:43am UTC] sniper@php.net
See bug #13292 (the last comment by christoph grottolo)
Should be documented somewhere..

[2 Oct 2003 11:52am UTC] f dot cassini at astra-srl dot com
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...
[18 Sep 2004 11:18am UTC] vrana@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dup of bug #13292.

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC