Bug #12004 Updated: problem with fopen over ftp and a related fgets

From: Date: Sun, 21 Oct 2001 02:40:27 +0000
Subject: Bug #12004 Updated: problem with fopen over ftp and a related fgets
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68534@lists.php.net to get a copy of this message
ID: 12004 Updated by: sniper Reported By: koenig@internet24.de Old Status: Open Status: Analyzed Bug Type: *Directory/Filesystem functions Operating System: linux PHP Version: 4.0.5 New Comment: Reproduced with PHP 4.1.0RC1 Seems like this is not supported at all.. --Jani Previous Comments: ------------------------------------------------------------------------ [2001-07-10 06:07:36] koenig@internet24.de Configure './configure' '--with-apxs=/usr/local/apache/bin/apxs' Command '--with-mysql' '--with-pgsql' '--with-zlib' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local/lib' '--enable-versioning' '--enable-track-vars=yes' '--enable-url-includes' '--enable-sysvshm' '--enable-syscsem' '--with-gettext' <?php $file = "user:secret@somewhere.org/path/file.txt"; if (!($fp = fopen($file, "r+"))) { echo "error: can't open file<br>"; exit; } fputs($fp, "test number one..."); fputs($fp, "test number two..."); fputs($fp, "etc..."); fclose($fp); ?> ------------------------------- The problem is, that nothing is written in the file even though fopen,fputs and fclose do not return an error. If you use fopen($file, "a+") the strings are written to file. But now the problem is, that fopen tries to create that file even if it already exists. Ciao, Tobias ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12004&edit=1

« previous php.dev (#68534) next »