Put simply, I can't work out why the code below won't carry out a file transfer? I have been assured by the sysadmin staff on the remote server that there are no permissions/firewall issues that could be affecting it and that the login details are correct.

I've logged file output using -O and the resulting file (--ftp-user=ITParts) is blank. What could be wrong?

exec('wget -o --ftp-user="xxxx" --ftp-password="xxxx"  \
    ftp.eurosimm.com/StocklistDealSOss.csv \
  • url (see en.wikipedia.org/wiki/Uniform_resource_locator) are in the form protocol://host/path, for you, it should be ftp.eurosimm.com/PATH/Stock. I assume you sample is a mistake in copy/paste ? – Archemar Oct 2 '14 at 13:51
  • 1
    on second thought, have you tried wget ... on command line ? – Archemar Oct 2 '14 at 13:53
  • 2
    Is there a reason you're not using the ftp_get function? – Barmar Oct 2 '14 at 14:35
  • Where is wget located? (type wget) and is the path in the once exec() searches for binaries? – Anthon Oct 2 '14 at 14:35
  • You do not state the log filename after the -o option and you do not use the -O option before the output file name. – Dubu Oct 2 '14 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.