php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #25469 PHP has problems with accessing files and directorys in a windows share
Submitted: 2003-09-10 11:25 UTC Modified: 2004-09-18 11:18 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: christian at freemails dot at Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.3.3 OS: Windows NT 5.2 build 3790
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christian at freemails dot at
New email:
PHP Version: OS:

 

 [2003-09-10 11:25 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-10 18:43 UTC] sniper@php.net
1. 4.3.3 is already released
2. And it's the permissions. Not bug.


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


 [2003-10-02 11:52 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...
 [2004-09-18 11:18 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 10:01:29 2024 UTC