php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19557 file_exists() always returns false.
Submitted: 2002-09-23 09:06 UTC Modified: 2002-09-23 10:19 UTC
From: m dot e dot foster at sussex dot ac dot uk Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.2.3 OS: Solaris 8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: m dot e dot foster at sussex dot ac dot uk
New email:
PHP Version: OS:

 

 [2002-09-23 09:06 UTC] m dot e dot foster at sussex dot ac dot uk
The following code, in a file called "test.php" will only 
ever print "is_file OK".

This is rather a large flaw?

<?php

if (file_exists('test.php')) 
	echo "file_exists OK"; 
	
if (is_file('test.php')) 
	echo "is_file OK"; 	

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-23 09:12 UTC] tal@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.
 [2002-09-23 09:14 UTC] tal@php.net
Oops...
gotta read those reports before bogusing...
 [2002-09-23 09:48 UTC] sniper@php.net
Please try using this CVS snapshot:

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

Works here with the latest CVS HEAD. (I don't have 4.2.3 installed so can't test if this was fixed or not.)

 [2002-09-23 10:05 UTC] edink@php.net
It was fixed in 4.2.4-dev which can be downloaded at http://snaps.php.net/php4-STABLE-latest.tar.gz  
 [2002-09-23 10:19 UTC] m dot e dot foster at sussex dot ac dot uk
I have this built and installed now and it is indeed fixed 
in 4.2.4-dev. Roll on 4.2.4

Thankyou
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 23:01:33 2025 UTC