I'm trying to use your PHP script to FTP a backup file to my PC running an FTP server. I've tried both FileZilla and Windows FTP Server on my PC but I can't seem to get your script to communicate with the FTP server. I've heard that it can be done, but I can't find the post that I first read about it. Do you know how to set the FTP settings in the PHP to communicate with the FTP server?
Also, I was getting good responses from your script, but now I'm getting an error.
Good responses:
Net::FTP>>> Net::FTP(2.74)
Net::FTP>>> Exporter(5.567)
Net::FTP>>> Net::Cmd(2.25)
Net::FTP>>> IO::Socket::INET(1.26)
Net::FTP>>> IO::Socket(1.27)
Net::FTP>>> IO::Handle(1.21)
Net::FTP=GLOB(0x82884ec)<<< 220-=(<*>)=-.:. (( Welcome to PureFTPd 1.0.12 )) .:.-=(<*>)=-
Net::FTP=GLOB(0x82884ec)<<< 220-You are user number 4 of 50 allowed.
Net::FTP=GLOB(0x82884ec)<<< 220-Local time is now 17:21 and the load is 1.17. Server port: 21.
Net::FTP=GLOB(0x82884ec)<<< 220 You will be disconnected after 15 minutes of inactivity.
Net::FTP=GLOB(0x82884ec)>>> user jrnhost
Net::FTP=GLOB(0x82884ec)<<< 331 User jrnhost OK. Password required
Net::FTP=GLOB(0x82884ec)>>> PASS ....
Net::FTP=GLOB(0x82884ec)<<< 230-User jrnhost has group access to: jrnhost
Net::FTP=GLOB(0x82884ec)<<< 230 OK. Current restricted directory is /
Net::FTP=GLOB(0x82884ec)>>> TYPE I
Net::FTP=GLOB(0x82884ec)<<< 200 TYPE is now 8-bit binary
Net::FTP=GLOB(0x82884ec)>>> ALLO 1302233
Net::FTP=GLOB(0x82884ec)<<< 200 Zzz...
Net::FTP=GLOB(0x82884ec)>>> PASV
Net::FTP=GLOB(0x82884ec)<<< 227 Entering Passive Mode (127,0,0,1,52,7)
Net::FTP=GLOB(0x82884ec)>>> STOR backup-4.13.2004_16-21-24_jrnhost.tar.gz
Net::FTP=GLOB(0x82884ec)<<< 150 Accepted data connection
Net::FTP=GLOB(0x82884ec)<<< 226-31809.2 Mbytes free disk space
Net::FTP=GLOB(0x82884ec)<<< 226-File successfully transferred
Net::FTP=GLOB(0x82884ec)<<< 226 0.037 seconds (measured here), 33.13 Mbytes per second
Net::FTP=GLOB(0x82884ec)>>> QUIT
Net::FTP=GLOB(0x82884ec)<<< 221-Goodbye. You uploaded 1272 and downloaded 0 kbytes.
Net::FTP=GLOB(0x82884ec)<<< 221 Logout - CPU time spent: 0.020 seconds.
--------------------------------------------------------
Copying Reseller Config...Done
Copying Mail files....Done
Copying proftpd file....Done
Copying www logs.............
.........
Done
Grabbing mysql dbs...Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir....Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/backup-4.13.2004_16-21-24_jrnhost.tar.gz
Creating Archive ....Done
md5sum is: 8eec6d0519a45641c33888c25ee6768e
Bad Responses:
Can't call method "login" on an undefined value at /usr/local/cpanel/bin/ftpput line 24.
--------------------------------------------------------
Copying Reseller Config...Done
Copying Mail files....Done
Copying proftpd file....Done
Copying www logs.............
.........
Done
Grabbing mysql dbs...Done
Grabbing mysql privs...Done
Copying mailman lists....Done
Copying mailman archives....Done
Copying homedir....Done
Copying cpuser file.......Done
Copying crontab file.......Done
Copying quota info.......Done
Storing Subdomains....
Done
Storing Parked Domains....
Done
Storing Addon Domains....
Done
Copying password.......Done
Copying shell.......Done
pkgacctfile is: /tmp/backup-4.13.2004_17-11-22_jrnhost.tar.gz
Creating Archive ....Done
md5sum is: ebdc5c580beb928fe2491374f3c43aa9