php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22178 file_exists() outputs warnings if file does not exist
Submitted: 2003-02-11 16:01 UTC Modified: 2003-02-20 08:18 UTC
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: marchart at marchart dot at Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 4.3.0 OS: solaris8
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: marchart at marchart dot at
New email:
PHP Version: OS:

 

 [2003-02-11 16:01 UTC] marchart at marchart dot at
The function "file_exists()" causes following PHP warning
on solaris8, if the file does not exist.
If the file exists the function works correctly.

Warning: file_exists() [function.file-exists]: Unable to access ...

On linux with the same setup (php 4.3.0 and apache 1.3.27)
it works fine! (The sun is a mirror from the linux box)

Best Regards
Johannes







Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-11 16:06 UTC] iliaa@php.net
Is your solaris server using the safe_mode and/or open_basedir ini directives?
 [2003-02-11 16:12 UTC] marchart at marchart dot at
Yes!

safe_mode               = On
safe_mode_exec_dir      = /usr/local/php/bin
open_basedir            = /www

Filesystemlayout, usernames/uids/gids and 
php.ini are ident to my linux box, where this is 
running fine
 [2003-02-11 16:32 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

At least one bug associated with warnings in file_exists & safe_mode has been fixed in latest CVS. So, try the latest CVS and see if that fixes the problem, if it does not please reply with all of the errors generated by the function.
 [2003-02-11 16:36 UTC] marchart at marchart dot at
The warnings disappear when specifying the
full path of the file.

Same problem also with function "is_file()"

Best Regards!
 [2003-02-11 22:45 UTC] sniper@php.net
Was this last comment for the PHP 4.3.1-dev version?
(the latest STABLE snapshot) If so, please update the
version to be '4.3.1-dev'.

One thing you could check is that all the directories
in the path to the file have the same uid/gid/permission
that is required for the file.

(This is actually another bug which I can't find now.)


 [2003-02-20 08:18 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-02-26 05:53 UTC] xeniac at animanga dot at
This "cosmetic problem" also appears under Winodws.
Message:
Warning: file_exists() [function.file-exists]: Unable to access themes/light/theme.class.php in c:\work\html\nukeevent\includes\session.class.php on line 73

Using: PHP4.3.0
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC