ID: 22065
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2000 server
PHP Version: 4.3.0
New Comment:
The file must exist to continue in the code:-
if(file_exists($file1)==FALSE) die("File1 does not exist");
The file is everybody full control.
What would have if the file was in use by another server (updating) ?
Can php detect this condition ?
Previous Comments:
------------------------------------------------------------------------
[2003-02-06 08:45:38] [EMAIL PROTECTED]
Does the file exist?
What are the permissions for it?
(I think it's is_readable() that does not work correctly
on windows)
------------------------------------------------------------------------
[2003-02-06 01:52:50] [EMAIL PROTECTED]
safe_mode = Off
;open_basedir =
------------------------------------------------------------------------
[2003-02-05 10:41:21] [EMAIL PROTECTED]
Do you have open_basedir or safe_mode enabled?
------------------------------------------------------------------------
[2003-02-05 02:48:23] [EMAIL PROTECTED]
Error log fills with warnings abount the file() function.
Apache 2.0/34
Using php module version 4.3.0 rather than cgi.
Errors.log shows:-
[05-Feb-2003 08:33:45] PHP Warning: file(d:/temp/ht1/050203.ht1) [<a
href='http://www.php.net/function.file'>function.file</a>]: failed to
create stream: Permission denied in d:\Apache
Group\Apache2\htdocs\fa_tools_ht.php on line 103
Code:-
if(file_exists($file1)==FALSE) die("File1 does not exist");
if(is_readable($file1)==FALSE) die("File1 not readable");
// parse files into arrays
$file_array1=file($file1); //WARNING HERE
if($file_array1==null) die("Permission denied to open file");
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22065&edit=1