php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19287 updating from 4.2.2 to 4.2.3 file_exists fails
Submitted: 2002-09-07 16:18 UTC Modified: 2002-09-11 03:48 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: soletan at toxa dot de Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.2.3 OS: Linux 2.4.18
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: soletan at toxa dot de
New email:
PHP Version: OS:

 

 [2002-09-07 16:18 UTC] soletan at toxa dot de
Hi,

PHP runs with Apache 2.0.40 as DSO and there are a few modules selected to be built into PHP-module. Everything was fine before updating PHP and I used the same configure-arguments to compile 4.2.3 as before 4.2.2 ...

Well, here comes the problem itself: I've updated from 4.2.2 to 4.2.3 right before and without further changes file_exists returns false in cases, where it returned true before. Files are existing and logfiles aren't showing anything. I originally used @ to suppress error messages and removed it temporarily to get some error message. display_errors is turned on, too.

But there's no message, while the tested files are world-readable. Now I change the source to get it back working ... how uncomfortable ... :( 


Thanx for your fixing,
Thomas Urban

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-07 16:51 UTC] edink@php.net
I can reproduce the problem, but only using Apache2 SAPI. It seems that file_exists() does not work with relative paths. Using absolute path seems to be working fine.
 [2002-09-08 02:54 UTC] sander@php.net
Can't reproduce with 4.3.0-dev.
 [2002-09-08 09:22 UTC] soletan at toxa dot de
okay, it's Apache2 SAPI here, too. When will 4.3.0 be published finally? I can't use dev-versions on a production web site ...
 [2002-09-08 09:38 UTC] sander@php.net
I expect it to take couple of months... there were many changes to many core parts of PHP and we haven't even started the QA process... 
Can you try the latest CVS (or a non-STABLE snapshot from http://snaps.php.net/) to make sure it has been fixed?
 [2002-09-08 14:09 UTC] fillmore at NRCan dot gc dot ca
Tests show this is also the cause of a 4.2.3 include file bug-
my bug #19291.  
I'm using an iPlanet 4.x NSAPI configuration.
Any chance there will be a fix before 4.3.0? (ie. 4.2.4?)
Thanks,  Bob Fillmore
 [2002-09-09 01:24 UTC] soletan at toxa dot de
So, I installed snapshot php4-STABLE-200209082100.tgz with my old configure.nice, made "all install" and restarted apache. Then I turned back what I've changed to workaround that "bug" and reloaded the page. He did it "fortunately".

Then I changed to php-4.2.3-installation dir and made install and restarted Apache again. It kept on doing it. Damn, I really called the script several times before, restarted apache and the whole and he didn't.

I can't explain and guess you don't, too.
 [2002-09-09 02:00 UTC] soletan at toxa dot de
Okay,

I feel a bit under-informed about snaps.php.net ... after realising by using phpinfo, that STABLE-foo is still 4.2.3 I took same snapshot without "STABLE" ... 

Downloading php4-200209082100.tgz, do the same before (configure.nice,all,install,restart apache).

Additionally I turned back another snippet of code where I used file_exists before including. After doing that it didn't run under 4.2.3 again. The code initially turned back still did a good job and I don't know why - it's assumed to be passed before the second snippet of code gets parsed and executed.

Well, after restarting apache I first assumed to have 4.3.0-dev running, then calling the script with both places turned back to use file_exists and everything was fine there.
For some further assertion I installed 4.2.3 again, checked this installation with phpinfo and reloaded the site and it didn't work ... I cycled another time to proove my tests finally and that's my closing line: it works under 4.3.0-dev.
 [2002-09-09 05:24 UTC] sniper@php.net
If it works -> closed.

 [2002-09-11 03:48 UTC] edink@php.net
This bug has been fixed in the STABLE branch. You can get the fixed version at http://snaps.php.net/php4-STABLE-latest.tar.gz which is basically 4.2.3 + a couple of fixes.
 [2002-11-23 12:53 UTC] simon at oxads dot com
I am currently having this problem with relative paths and 
file_exists (among file functions) using apache 2.0.43 and 
php 4.3.0RC1 as DSO.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC