#19323 [Com]: Filesystem calls with relative paths don't work

From: Date: Wed, 11 Sep 2002 07:15:10 +0000
Subject: #19323 [Com]: Filesystem calls with relative paths don't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19015@lists.php.net to get a copy of this message
ID: 19323 Comment by: florian@cathala.org Reported By: jneil@myersinternet.com Status: Open Bug Type: Apache2 related Operating System: Linux PHP Version: 4.2.3 New Comment: Same problem on FreeBSD 4.6-STABLE with Apache 2.0.40 and PHP 4.2.3. './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local' '--with-sockets' '--enable-ftp' '--with-gd' '--with-gettext' '--with-ttf' '-with-pdflib' '--with-png' '--with-tsrm-pth' '--with-pgsql' Previous Comments: ------------------------------------------------------------------------ [2002-09-10 10:31:10] jneil@myersinternet.com I am using apache2 running php as an SO module. ------------------------------------------------------------------------ [2002-09-10 05:24:08] edink@php.net Are you using Apache2? ------------------------------------------------------------------------ [2002-09-09 18:05:57] jneil@myersinternet.com It did work with 4.2.2. Are their config options introduced with 4.2.3 that changed this behavior? We did not change our php.ini file when we upgraded from 4.2.2 to 4.2.3. ------------------------------------------------------------------------ [2002-09-09 18:03:01] sniper@php.net Works fine here. Does it work with PHP 4.2.2? ------------------------------------------------------------------------ [2002-09-09 17:42:20] jneil@myersinternet.com As of PHP 4.2.3 any filesystem functions that call for a pathname only work with fully qualified paths. Relative paths no longer appear to work. This includes the fopen commands. This breaks a lot of code out there. For example, the following function does not work: <?php if ($fp = fopen("some_local_file.txt", "r")) { echo "Opened file...<br>\n\n"; } ?> However, the following DOES work: <?php if ($fp = fopen("/full/path/to/some_local_file.txt", "r")) { echo "Opened file...<br>\n\n"; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19323&edit=1

« previous php.bugs (#19015) next »