Remote call php scripts from console

I have the follow dev environment:
- my computer under Windows
- Ubuntu server with php, mysql, memcache, etc.

In Windows I use network drive for editing source codes from Ubuntu computer.
I use PhpStorm on Windows machine and some times I want to use code generators for generating models and modules.

Now I use ssh for this, but it's very uncomfortably.  For example:
I need to execute
php /var/www/project/tools/generate_controller IndexController

To run this command I should run Putty, log in and run this command from the console.

May I use some IDE features for this? Something like this (http://devnet.jetbrains.net/docs/DOC-1230) but for remote computer.

4 comments
Comment actions Permalink

Hello trong,

Why you can not use code generation tool directly from Windows?

Thank you for feedback!

0
Comment actions Permalink

Hello, Nikolay!

Yes, I can, of course, but it's inconvenient to. In this case I must have 2 copies of PHP with all libraries and extensions. It's a solution, but not so cool :)

0
Comment actions Permalink

trong,

I see two possible solution for your case:

  • Built-in ssh client. Please vote - http://youtrack.jetbrains.net/issue/WI-3495
  • Register remote php as a command line tool. Is it possible to run your remote php as a single command line comman? (eg. putty yourname:yourpassword@yourhost args.....)


Thank you for feedback!

0
Comment actions Permalink

Thanks, I voted.
I think built-in ssh client is really good solution in my case.

0

Please sign in to leave a comment.