On my Raspberry Pi with Raspbian OS (Debian optimized for Raspberry Pi) I've installed Nginx + MySQL + PHP.
Nginx + PHP (using php5-fpm) seem to work well as I can retrieve HTML / PHP files from my browser.
At another machine with Debian & Apache, I can run PHP scripts from the command line using the command:
$ php /var/www/myscript.php
When I want to add that script to crontabs I have to include the path to PHP:
/usr/bin/php /var/www/myscript.php
On my Raspberry Pi when I try
$ php /var/www/myscript.php
I get the error "-bash: php: command not found" and with
$ sudo php5-fpm /var/www/myscript.php
I get the help screen of php5-fpm
How can I start PHP scripts from the command line?
Do I have to find the full path to PHP?
Or do I have to include some configuration settings for CLI to my /etc/nginx/sites-available/default ?
Thanks in advance!
-------------------------------------------------------------------
Peter Martin, Joomla specialist www.db8.nl
Raspberry Pi with Raspbian Linux + Nginx + PHP (with php5-fpm) + MySQL