Having struggled with this problem for the last 2 days can someone please help!

I am using ftp from my own server to an ftp server my ISP provides. I am using the latest version of PHP which allows me to use the ftp_nb_put functions.

I can upload files 2,3,4mb in size without a problem using both ftp_put and ftp_nb_put but when I try to upload a file that is 5.2mb in size i get the following :-


Warning: ftp_put() [function.ftp-put]: Opening BINARY mode data connection for /htdocs/support_documents/software/fred.exe


This only happens on the 5.2mb file and is really frustrating. Even though this warning is returned the file has actually been uploaded to the webspace and compares in file size to the actual file chosen for upload.

I have gone through the php.ini file and set everything to gigantic in an effort to identify what is causing this and can only think that it is a problem within php.

Another point! When I upload the smaller files (1,2,3mb) the browser returns my page instantly. When I try and upload the large file it takes some 60seconds after the file has been uploaded (confirmed by monitoring ftp space using ftp client) before the browser returns the page.

I hope that someone out there might have an idea!

Regards

Phil

    Could it be possible that your ISP has put a limit on file sizes ?, I dont mean the value in php.ini, the ISP may have put global restiction on the FTP account. I may be worth looking into.
    good luck buddy.

      I can use CuteFTP and WS_FTP to upload the same file without problem so the issue of file size limits is negated.

      Its when I use the ftp functions within php I get this strange anommaly. Also, the fact that the file actually exists where it should on the uploaded ftp server is also confusing.

      Anyone had this problem??

      Phil

        5 years later

        Hi!
        I had same problem.
        The problem was: server full, no more space fo anything;
        the solution: delete some unused files.
        Maybe that's not your problem but you should check.

        Andrés

          haha last reply dates 02-17-2003, 11:14 AM
          where the hell am I? šŸ™

            a year later

            Even when lasts posts date from years, I’d like to add this info just for the sake of helping other users like me seeking the solution to this kind of problem.

            As a matter of fact, as dubrubru said, this is mainly a quota issue, consider deleting files in order to get free space for uploading new files. Take in consideration that if you uploaded files with your script during this warning, all of them will have 0KB.

            Another related issue is that if you use any given FTP user, created via your FTP User Manager, check that the quota for that user is space-enough for the task of uploading files via your PHP script.

            That's it hope it works for you people.

              Write a Reply...