t_miller_3 Posted December 28, 2008 Share Posted December 28, 2008 Here's the code: <?php $connection = ftp_connect('89.xxx.xx.xxx') or die("Couldn't connect to server"); ftp_login($connection, 'myusername', 'mypassword') or die("Couldn't login"); ftp_put($connection, "/folder/file.ini", "file.ini", FTP_BINARY) or die("Couldn't transfer file"); ftp_close($connection); ?> I've tested the script and it works fine when uploading the file from one linux webserver to another however when I try to upload the file from a linux server to a windows server, I get this error message: Warning: ftp_put() [function.ftp-put]: Port ok. in /home/timm/public_html/formtest/ftptest2.php on line 6 Can anyone help me with this? Link to comment https://forums.phpfreaks.com/topic/138643-using-ftp_put-to-upload-a-file-from-linux-server-to-windows-server/ Share on other sites More sharing options...
Mark Baker Posted December 28, 2008 Share Posted December 28, 2008 What ftp server are you running on the Windows box? An MS one, or third-party? Are you running it as a secure ftp server? Link to comment https://forums.phpfreaks.com/topic/138643-using-ftp_put-to-upload-a-file-from-linux-server-to-windows-server/#findComment-724909 Share on other sites More sharing options...
t_miller_3 Posted December 28, 2008 Author Share Posted December 28, 2008 I'm sorry I don't know the answer to your question, the windows server is actually a game server which is run by a game server company. Link to comment https://forums.phpfreaks.com/topic/138643-using-ftp_put-to-upload-a-file-from-linux-server-to-windows-server/#findComment-724922 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.