I'm not really an administrator and need some help setting up a cron, well actually calling a PHP script from the command line in the first place.
I have a PHP5 script that I need to run at the following location:
/var/www/apps/myapp/services/myservice.php
Before setting up a cron for that, I wanted to test this manually, like so:
php /var/www/apps/myapp/services/myservice.php
This results in nothing. I can confirm that that script did not run. There is also no error. However, if I cd into the directory, and then call the script:
cd /var/www/apps/myapp/services
php myservice.php
It does work, as I can see from the log file of that script. It must be something incredibly simple that I'm overlooking, but how can I call that PHP script from the command line in one go, without going into the directory first?
PS: I'm on Debian Edge, using Apache2 and PHP5.
php.ini
defaults to not allowing short tags. In case you Google'd your way here wondering why your fresh php install didn't run your CLI scripts.