...

View Full Version : How to run a script from SSH



rfresh
03-11-2008, 07:07 AM
How do I run a php script from the SSH command line?

I'm doing this: php test.php

I can run my script ok from the brower but when I try to execute it in SSH at the command line, the cmd prompt never returns.

Is there some kind of trick?

phantom007
03-11-2008, 09:59 AM
Make sure you are permitted to execute script.

ess
03-11-2008, 11:03 AM
you may have to install PHPRC in order to execute scripts from the shell.

rfresh
03-11-2008, 04:37 PM
Make sure you are permitted to execute script.

I am susposed to be able to execute - I am logging in as root.

Spookster
03-12-2008, 04:39 AM
I am susposed to be able to execute - I am logging in as root.

Since you say you are logged in as root is it safe to assume you are the administrator of the system? If so then did you install configure PHP for running PHP from the command line?

digitalfiz
03-13-2008, 02:34 AM
If you do not get "command not found" php is installed to run CLI so it might be something wrong with the script or your php install maybe fubar. What is in the test.php?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum