Thursday, August 18, 2011

problem with ftp upload using php ftp_connect

The php script to upload csv files automatically had not worked for a while. Checking it out:

This page says that with some firewalls you should connect to the firewall and then connect to the host etc. Tried that, doesn't work.

I suspect that the problem is with the way in which php handles ftp commands. When a put command is sent on our system, cyberoam responds saying delayed due to scanning, and then uploads.

STOR /httpdocs/program/csv/AmeriStream20110818.csv
150-Scanning file for viruses
150-There'll be a delay while we scan for viruses
150 Data connection already open; Transfer starting.
221-Scanning for virus
221 Transfer complete.

I think php's ftp library does not handle the ftp 150 commands, hence it fails.

I have currently commented out the ftp upload part in the mkcsv php script.

No comments:

Post a Comment