ID: 14095 Updated by: mfischer Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: FTP related Operating System: Windows NT4 SP6a PHP Version: 4.0.6 New Comment:
No Feedback, closing. Previous Comments: ------------------------------------------------------------------------ [2001-11-17 17:52:49] [EMAIL PROTECTED] Unfortunately I do not have authority over that server. But I will try to either set up a test box (don't have NT4 available right now) or convince the admin to upgrade - so is there a known issue? ------------------------------------------------------------------------ [2001-11-17 17:32:32] [EMAIL PROTECTED] Can you please test with a more recent version (e.g. from php4win.de) ? ------------------------------------------------------------------------ [2001-11-17 17:16:35] [EMAIL PROTECTED] PHP as CGI on NT4SP6a/IIS4. To update a file on the server, I read the old contents into an array, populate a string with modified content, delete the old file, and use fopen/fwrite to write a new one. This worked great on FreeBSD/Apache, now on NT4/IIS4 the new file is not written. There are *no* error messages, but the file is not there. Really messed up is the fact that the file is written successfully when I specify the previous FreeBSD/Apache host in $FTPSite... The following variables are defined before the code below runs: $newcontents $FTPUser $FTPPass (contains special characters, e.g. "urb@n") $FTPSite ("host.domain.tl") $FTPDoc ("/path/filename") [Curiously, I cannot use "localhost" or an IP address as $FTPSite...("unable to find ftpbuf 0" on ftp_login and ftp_delete as well as "php_hostconnect: connect failed" on fopen)] // delete previous file via ftp $ftp = ftp_connect($FTPSite); ftp_login($ftp, $FTPUser, $FTPPass); ftp_delete($ftp, $FTPDoc); ftp_quit($ftp); // get file handler $FTPOpen="ftp://" . rawurlencode($FTPUser) . ":" . rawurlencode($FTPPass) . "@" . $FTPSite . $FTPDoc; //echo $FTPOpen . "<BR>"; $NewTopTen = fopen($FTPOpen,"w"); echo $NewTopTen; // write new content to file fwrite($NewTopTen, $newcontents); //close file handle fclose($NewTopTen); ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14095&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]