If you have already read about some of my projects (dashboard, web charts…), you’ve certainly noticed that I’d like to use the PHP language for developing dynamic web pages. You can use the PHP also with Arduino Yun, here’s how to do that…
First you must install the software packages. I chose to install PHP version 5, including the CLI module, that allows to call PHP scripts from the command line (you’ll understand how this can be useful when you’ll learn how to launch commands using the Bridge library!):
Now edit the webserver’s config file (/etc/config/uhttpd), uncommenting (= removing the # character at the end of the line) the php list interpreter:
Restart the webserver:
To make sure everything is working, prepare a webpage with the phpinfo() command.
Move on the SD card (cd /www/sd) and create the page:
Now with your browser check that the page is correctly rendered: