note 61376 added to function.ftp-nb-put
| From: | brandon dot farber at gmail dot com | Date: | Wed, 01 Feb 2006 23:14:14 +0000 |
| Subject: | note 61376 added to function.ftp-nb-put | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102842@lists.php.net to get a copy of this message | ||
I couldn't see this noted anywhere...
ftp_nb_put apparently takes a much much longer time to upload the file than ftp_put (I haven't
done any packet sniffing or logging tests to find out why). I was using a script, nearly identical
to the example above, and a 100KB file had only uploaded 3.99KB after about 8 minutes! The php
script naturally timed out before it was complete.
I changed my function to use ftp_put, got rid of the loop to check FTP_MOREDATA (as you will see in
the example above), and the same script uploaded 2.2MB within 30 seconds with no other changes.
If you're using this function instead of ftp_put *purely to try to speed up your script* and
it's taking a long time, you might want to try ftp_put instead.
----
Server IP: 216.194.113.175
Probable Submitter: 141.152.200.50
----
Manual Page -- http://www.php.net/manual/en/function.ftp-nb-put.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61376
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61376&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61376&report=yes
Search -- http://master.php.net/manage/user-notes.php