php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18920 file_exists() doesn't work with relativ path's
Submitted: 2002-08-15 12:14 UTC Modified: 2002-09-09 05:25 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: jan dot lange at artada dot de Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4CVS-2002-08-15 OS: RedHat 7.2 Linux 2.4.18
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jan dot lange at artada dot de
New email:
PHP Version: OS:

 

 [2002-08-15 12:14 UTC] jan dot lange at artada dot de
Hi,

I have installed Apache 2.0.40 and PHP 4.3-dev

and I have a Programm (horde.org) that isn't working.

I have analyze the scripts and I see that they use the file_exists() function with relative path's.

I wrote a Test Script with 
echo file_exists ("./test.txt");

and when I run it, I get back a 0

When I set the full path to the file, then I get back a 1.

If I test the mini-script on PHP 4.2.2 on shell, it works with relativ path's.

After that I added this:
echo getcwd();
to show whether the Apache starts the PHP Script in the correct directory, and it were right.
So I think it is a PHP 4.3 bug in file_exists()

Greetings
Jan

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-15 12:20 UTC] kalowsky@php.net
Can you confirm this with Apache 1.3.x?
 [2002-08-15 12:46 UTC] jan dot lange at artada dot de
No, I can't it!

I have only Apache 2.0.40 installed.

Shall I install 1.3.x ?

I haven't many time for the next days, I can test it
on Monday, not sooner. Because my httpd.conf config-file is specialised for apache2, and won't work with apache 1.3 without some modifications.
 [2002-08-15 12:58 UTC] kalowsky@php.net
If you could test with it, it would be appriciated.  Please realize that PHP's support of Apache2 is experimental, and is not assured to work at this time.  
 [2002-08-16 09:58 UTC] jan dot lange at artada dot de
Hi!

I have installed Apache 1.3.26, and recompiled
php4-200208150600 with the same options.

Than I modified little bit my Apache2 httpd.conf
File so that it is working with Apache 1.3.x.

After that I have tested the file_exists() function with relativ path's, and now it works.

Is it now a Apache2 bug or a PHP Apache2 API (Filter) bug?

Next I will test it with Apache 2.0.39 and PHP-STABLE snapshot (4.2.3-dev).

Greetings
Jan
 [2002-08-16 10:00 UTC] kalowsky@php.net
Changing to an Apache2 bug
 [2002-09-09 05:25 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

And use Apache 2.0.40. This was reported to work with PHP 4.3.0-dev.

 [2002-09-11 11:31 UTC] yar at mi dot ru
Observed the bug with Apache 2.0.40 and PHP 4.2.3 at FreeBSD.
 [2002-10-08 16:19 UTC] ashkar at rdc dot cl
I have the same problem using Apache 2.0.43 and PHP 4.2.3
It worked ok with Apache 2.0.39 & php 4.2.2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 02:01:29 2024 UTC