Showing results for 
Search instead for 
Did you mean: 

php from command line ?


php from command line ?


I'm currently developing a php script that I plan on executing using cron. At the moment I am testing the script simply by browsing to it. However, although the script is executing (it sends me an email), the browser hangs.

I don't know if this is due to the fact that the script doesn't return any content for the browser, or if it is because I'm not exiting the script correctly.

I would like to execute the script from the command line so that I cna see if it hangs under the condition it will eventually be running in. I don't want my script to hang and cause problems on your server.

I hope I've explained enough - any feedback appreciated.


RE: php from command line ?

Hi David,

This should be possible although please be aware that I am by no means a PHP guru Smiley

I've been reliably informed that so long as you have the shebang entry in your script (#!/usr/local/bin/php3) you should indeed be able to call it from the command prompt. If you continue to have problems with the script I would suggest posting a request for help in our CGI newsgroup. Our resident CGI experts should be able to offer you further assistance.

| Dean Wood..........................Unmetered & ADSL solutions
| Customer Support Agent..............for Home & Business
| PlusNet Technologies Ltd..........@
+ ----- My Referrals - It pays to recommend PlusNet ----- +