View Full Version : executing PHP
SmoothDime
March 5th, 2005, 11:29 PM
is there some command line interface tool i can use to run my php script? i've made a php script to use for a cron job and i want to test it - not in the browser and not with the cron.
thanks
Jack_Knife
March 5th, 2005, 11:49 PM
You can get Command Line (CLI) versions of PHP.
Edit: Don't ask me anything about it though, I don't know. I stick to my CGI PHP.
trundrumbalind
March 6th, 2005, 12:09 AM
Emmm... www.php.net is all I or anyone else can say...
jw06
March 6th, 2005, 09:56 AM
:D
You need to first find the file and chmod +x FILE.php
After doing that: ./file.php :)
Have fun :D Yay for PHP CLI!
λ
March 6th, 2005, 10:21 AM
:D
You need to first find the file and chmod +x FILE.php
After doing that: ./file.php :)
Have fun :D Yay for PHP CLI!
That's only if you have the #!(shabang), which most PHP scripts don't. You probably want to execute
$ php myfile.php
You don't even have to chmod +x it, how's that for a bonus? ;)
SmoothDime
March 6th, 2005, 03:51 PM
but where do I run the command? ssh? putty?
CyanBlue
March 6th, 2005, 04:20 PM
telnet or ssh, I presume???
jw06
March 6th, 2005, 11:10 PM
SSH I recomend if you can.. use the She-Bang as Cyanblue said.
Yea it will save the chmod stuff... but.. do it lol.
In a SSH session with the server you can do it.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.