In a nutshell: I have a module that is using the php ftp commands for download and upload. The download works fine and the upload worked fine for a small text file. As I started using larger files, the upload completed without error but it only copied a small part of the file then stopped. I tried this for a 1k gif file and I was able to display the resulting file but it only had the first few lines of the original file.

In case it matters, I am running this from my local Windows machine accessing an internet server for both the download and the upload.

I have fairly large timeouts for the module and on the ftp_connect. I have tried it with and without passive mode and as ASCII and BINARY.

Any suggestions?

Have you checked your php.ini file for max-size-upload? Could it be that is set for a very small file size.

Excellent point! I hadn't checked that but when I did I found that the value was 2 megs (larger than any of the files I was trying).

I tried running this from the server instead of from my local machine. I got that to work successfully. What confused it for a while was that my regular FTP program (BlazeFTP) was mangling some of my test files that I was uploading to the server.

So I don`t know why it wasn`t working from the local machine. Unless someone has something else that I can check, I will consider this solved and live with the limitation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.