0

I'm trying to execute a LFTP command using the system() PHP method in a IIS 7.0 site.

$command = 'cmd /c lftp -c "open -u name,password -p 22 sftp://server.mylife.com ; cd test/portal/template ; put /cygdrive/c/inetpub/uploads/cata/exports/tpl_1421946484/cata.csv;"';
system($command);

I put it in a PHP file. If if run it directly by the command line php sendFile.php it works fine. But if I access this same php file throught a IIS 7.0 website, I got nothing and no error.

I can't understand where it comes from...!

Any help ?

Barmar
  • 741,623
  • 53
  • 500
  • 612
Pete_Gore
  • 594
  • 1
  • 5
  • 20

1 Answers1

0

Have you checked whether this is a permissions problem? Is it that the account under which IIS hosts the website might not have access to the /cygdrive/c/inetpub/uploads/cata/exports/tpl_1421946484/cata.csv file?

CJBS
  • 15,147
  • 6
  • 86
  • 135