#19323 [Opn->Fbk]: Filesystem calls with relative paths don't work

From: Date: Tue, 10 Sep 2002 10:24:08 +0000
Subject: #19323 [Opn->Fbk]: Filesystem calls with relative paths don't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18907@lists.php.net to get a copy of this message
ID: 19323 Updated by: edink@php.net Reported By: jneil@myersinternet.com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Linux PHP Version: 4.2.3 New Comment: Are you using Apache2? Previous Comments: ------------------------------------------------------------------------ [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 (#18907) next »