As a first project I implemented an old application with which one can switch 2 leds, connected to gpio ports, on and off. The application is straight forwards, using only PHP and PHP-CGI.
First you have to install PHP and PHP-CGI (see openwrt-wiki)
opkg update opkg install php5 php5-cgi
Notice the /etc/php.ini file afterwards.
You also need to add the line:
list interpreter ".php=/usr/bin/php-cgi"
to the 'main' section of the /etc/config/uhhtpd file
Restart your webserver with
and now you're up and running for using PHP
I used gpiocfg instead of fast-gpio mainly because I didn't know of the existence of fast-gpio. In the first few lines of the PHP file you can select the gpio pins to use. Start using the webpage calling Omega-abcd.local/php/SwitchLeds.php in your browser.
The PHP file is:
Place this file in /www/php, otherwise you need to change the above URL.