I will do this i quick steps.
Install Lighttpd:
ipkg install lighttpd
Install Fast-CGI
Then you edit /opt/etc/lighttpd/lighttpd.confCode:ipkg install php-fcgi
(I Use Joe editor so if you havnet install it do it by: "")Code:ipkg install joe
now start removing the # fromCode:joe /opt/etc/lighttpd/lighttpd.conf
Code:# "mod_fastcgi",
Change
server.document-root
to something like:
change the accesslog.filenameCode:server.document-root = "/opt/share/www/"
to something like:
#### accesslog module
Add ".sqlite" to:Code:accesslog.filename = "/opt/share/www/log/access.log"
Now the most importent thing is to change the FastCGI setting to this:Code:url.access-deny = ( "~", ".inc",".sqlite" )
HitCode:fastcgi.server = ( ".php" =>
((
"host" => "192.168.1.1",
"port" => 1026,
))
)
to save and exitCode:ctrl-k-x
Next thing is to create the file
/opt/etc/init.d/S45php
So you make the file by doing
and you put the following in it:Code:joe /opt/etc/init.d/S45php
Save and exit: "Code:#!/bin/sh
export PHP_FCGI_CHILDREN=1
PORT=1026
BIN=/opt/bin/php-fcgi
#/opt/etc/php.d
case $1 in
start)
$BIN -b $PORT &
;;
stop)
kill Pidof phpM ;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
"Code:Ctrl-k-x
Change the permission on it to make it executable:
Now you can start it by:Code:chmod +x S45php
or it will start when you reboot the next timeCode:./S45php start
Thanks goes to Macsat for helping me to get it working on my unit