php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19810 Function file_exists don't works on Apache2
Submitted: 2002-10-08 00:20 UTC Modified: 2002-10-08 04:46 UTC
From: alietss at yahoo dot com Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 4.2.3 OS: Linux RedHat 8.0
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: alietss at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-10-08 00:20 UTC] alietss at yahoo dot com
Hy boys, I'm using Linux RedHat8.0 with httpd-2.0.40 from RedHat rpms, I built rpms of PHP-4.2.3 for this configuration, everything is ok but the function file_exists that was working for me in apache-1.3 and PHP-4.2.3 it's not working good in apache-2, I have a script that test if a file exists in a location within the location of the server document root, was working ok but now it doesn't.
example:
<?
if (file_exists('index.php')){
   echo "Exists";
   }
   else {
   echo "Don't exists";
}
?>
This script is reporting that the file doesn't exist when in fact exists. if I give the absolute path to this then finds the file.
<?
if (file_exists('/var/www/html/index.php')){
   echo "Exists";
   }
   else {
   echo "Don't exists";
}
?>
which says that the function it is not finding the server's filesystem.

I'm using register globals in On
Here it goes my configuration configure

'./configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i686-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-pdflib=shared' '--with-tiff-dir=/usr' '--with-ncurses' '--with-gmp' '--with-iconv' '--enable-xslt=shared' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mcal=shared,/usr' '--with-mcrypt=shared,/usr' '--with-mhash=shared,/usr' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--with-sybase-ct=shared,/usr' '--with-xslt-sablot=shared,/usr' '--with-sablot-js=shared,/usr' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'

                                     Regards Aliet

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-08 00:38 UTC] rasmus@php.net
Note that there is no official support for Apache2 in PHP.  Lots of things will not work.  You can try a more recent snapshot from snaps.php.net and see if that fixes it, but I'd suggest installing Apache 1.3.x
 [2002-10-08 04:46 UTC] edink@php.net
This has been fixed in http://snaps.php.net/php4-STABLE-latest.tar.gz

And please try searching the bug database before reporting new bugs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC