Jump to content

ftp error


Recommended Posts

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



$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';
   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");

echo "<hr>All done!";


Anyone know what the error means?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.