Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php from command line

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
I have a php file file.php
and when I access it via the web, it works just fine and injects db entries.

However,
if I issue the command
php file.php I don't see any output and it doesn't seem to be doing the database items.

Is there a way to run this script from command line? (specifically I am trying to run it via a cron job with the php command ...... if I use wget it works correctly)


Many thanks!
 
If you do only:

[tt]php -v[/tt]

at the command-line, what do you get?

Also, with cron it's best to use the absolute path and filename if the PHP executable in my case, that's:

[tt]/usr/local/bin/php -v[/tt]



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top