dreamwest Posted November 28, 2011 Share Posted November 28, 2011 Im getting this error message randomly 1 in 6 times itll lag and eventually show this error when i try to upload an image to a remote server. Warning: ftp_put() [function.ftp-put]: php_connect_nonb() failed: Operation now in progress (115) in /home/user/public_html/2.php on line 22 Warning: ftp_put() [function.ftp-put]: Type set to I in /home/user/public_html/2.php on line 22 Script: $ftp_server = ""; $ftp_user = ""; $ftp_pass = ""; // connect to target ftp server $target_conn = ftp_connect($ftp_server) or die("Could not connect to server try again!"); if(ftp_login($target_conn, $ftp_user, $ftp_pass)){ echo 'Success'; }else{ echo 'Failed or timed out'; } // switch to passive mode if behind a firewall - REMOVE THIS IF YOU RUN INTO PROBLEMS ftp_pasv($target_conn, true ); // change to the target path ftp_chdir($target_conn, '/1/'); // upload the thumbnail ftp_put($target_conn, 'test.jpg', 'tmb_4.jpg', FTP_BINARY) or die("There was an error uploading the thumbnail. Please try again"); ftp_close($target_conn); echo "<hr>All done!"; Anyone know what the error means? Link to comment https://forums.phpfreaks.com/topic/251940-ftp-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.