rhyspaterson Posted May 25, 2007 Share Posted May 25, 2007 Hey guys, Just having some issues with my basic FTP script (again). I had to move the script to a new webserver which runs the last version of PHP5. The code was created and tested using PHP4. And all was good. However on the new server i can seem to get ftp_put to work for me. // upload the file $upload = ftp_put($conn_id, $destination_file, $file, FTP_BINARY); // check upload status if (!$upload) { echo "<br />FTP upload of has failed!<br />"; exit(); // if upload worked, delete the folder off the local webhost } else { echo "<p>Uploading Complete!</p><br /><br />"; recursive_remove_directory($directory, $empty=FALSE); } The code fails at the f (!$upload) statement obviously. This is strange because i can create a connection, AND create a directory on the remote host. But i just cant send the file. The $file and $destination_file variables are all correct. I literally just went from PHP4 to PHP5 and it stopped working. Any suggestions? Cheers, /Rhys Link to comment https://forums.phpfreaks.com/topic/52926-more-ftp-issues/ Share on other sites More sharing options...
cbisson Posted August 4, 2007 Share Posted August 4, 2007 I'm having a similar problem, I can't upload any files online, but from my local version of the website to the actual server, it works fine! For my part, the FTP/upload is enabled and yet doesn't work, so did you check your new server if it was enabled? Chris Link to comment https://forums.phpfreaks.com/topic/52926-more-ftp-issues/#findComment-315320 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.