peec / raspberry-piface-api

PiFace PHP 5.4+ API for Raspberry PI PiFace module.
13 stars 2 forks source link

Readme issue #4

Open djsharman opened 11 years ago

djsharman commented 11 years ago

Php test file needs to be enclosed with <?php

and

?>

Also upon running

php -f test_piface.php

if you get as error like "Dynamically loaded extensions aren't enabled" you must

sudo vim /etc/php5/cli/php.ini

then change

enable_dl = Off

to

enable_dl = On


I am currently stuck with an error:

PHP Fatal error: The device /dev/spidev0.0 does not exist in /home/pi/myphpiface/vendor/pkj/raspberry-piface-api/src/Pkj/Raspberry/PiFace/SpiManager/SpiExtension.php on line 16

Should I load a kernel driver first?

iworx commented 11 years ago

@djsharman - the user you are running with doesn't have rights on the /dev/spidev0.0 - it works for me in CLI but not if I call it from Nginx with PHP5-FPM. Already tried adding the www-data user to the group.