Re: #19348 [Dup->Fbk]: File_exists problem?

From: Date: Wed, 11 Sep 2002 00:49:00 +0000
Subject: Re: #19348 [Dup->Fbk]: File_exists problem?
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-88153@lists.php.net to get a copy of this message
On 11 Sep 2002 00:41:59 -0000 sniper@php.net wrote: > ID: 19348 > Updated by: sniper@php.net > Reported By: vinicius@teracom.com.br > -Status: Duplicate > +Status: Feedback > -Bug Type: *Directory/Filesystem functions > +Bug Type: Apache2 related > Operating System: Redhat 7.3 2.4.18 > PHP Version: 4.2.3 > New Comment: > > 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 > > > > > Previous Comments: > --------------------------------------------------------------------- > --- > > [2002-09-10 18:36:36] edink@php.net > > Duplicate of #19287 > > --------------------------------------------------------------------- > --- > > [2002-09-10 18:30:13] vinicius@teracom.com.br > > I was using Apache 2.0.39 with php 4.2.2 and everything was going > fine. When i change to Apache 2.0.40 with 4.2.3 with the same > configurantion, the function file_exists do not work anymore. > > This is the part of the script: > > if (!file_exists("subs/$sub.htm")) { > $op = fopen("/home/httpd/sistema/logerror.txt", "a"); > $ins = fputs($op, "Try accessing $sub.htm\n"); > $close = fclose($op); > Header("Location: portal.php?sub=error"); > exit; > } > > Regards, > > Vinicius Mommensohn > Maringa - PR - Brazil > This bug is real and it is in the head as well. You need a thread safe build + VCWD support for it to show. Builds like Apache2 and nsapi and possibly others are affected. I've fixed it in the PHP_4_2_0 branch. Why was that particular bit of code merged is beyond me. The problem is that the new version of filestat calls access(2) directly, disregarding the fact that some sapis use virtual current working directory. Edin

« previous php.dev (#88153) next »