Hello,
how can I run php script A.php on another FTP from script B.php on my localhost.

B.php (on my localhost)

/*
 FTP connection here...
*/
ftp_exec('php5 folder/A.php -a 13');

All I get is this:
Warning: ftp_exec() [function.ftp-exec]: Unknown SITE command.

I'd tried ftp_raw instead, but nothing's changed.
I get: 500 - Unknown command

If I run local script C.php on that FTP, containing the same command, but with exec() function, everything works.

C.php

exec('php5 folder/A.php -a 13');

Thanks for help in advance.

    Thanks for reply, why? 🙁
    Is there any other possibility how to run script on remote server?

      You could do it with plain ol HTTP, assuming there is a web server available.

        offspring86 wrote:

        Is there any other possibility how to run script on remote server?

        There are a variety of ways to do that (one being requesting the page across HTTP as Shrike mentioned above). Using a normal FTP server, however, isn't one of them.

          offspring86 wrote:

          I can run the script when connecting to server with SSH connection.

          Well there you go - it sounds like you already have a method to execute the script. If you want to automate it, then do the same process (e.g. use PHP to open an SSH connection and execute the command).

            Read the installation instructions. Or use your system's ssh functionality through exec or similar

              Write a Reply...