Small howto Lighttpd with PHP, SQLite for other fellow Vectorians that run into trouble:Install Lighttpd and PHP
First install Lighttpd and PHP 5.6.9 via Gslapt, it's the simple part, just go to menu -> system -> Gslapt Package Manager and search for lighttpd and php.Running Lighttpd
Lighttpd is not running after install. Open a terminal and log in as root. With /etc/rc.d/rc.lighttpd start -> the web server is started, with /etc/rc.d/rc.lighttpd stop -> it stops and /etc/rc.d/rc.lighttpd restart -> restarts the web server.Enable PHP
Edit the lighttpd.config file. For example with Geany:
# geany /etc/lighttpd/lighttpd.conf
Remove the # at the beginning of line 24 to enable fastcgi.
Replace the fastcgi section beginning at line 209 with:
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
Save the configuration.
Enable the php ini file:
# cp /etc/httpd/php.ini-development /etc/httpd/php.ini or # cp /etc/httpd/php.ini-production /etc/httpd/php.ini for a live web server.
The PHP package is configured for Apache. So you will have to correct the group for PHP to save sessions.
# chown root:lighttpd /var/lib/php
# /etc/rc.d/rc.lighttpd restart
And place your PHP files in /var/www/htdocs-lighttpd and correct the user and group on these files:
# chown lighttpd:lighttpd <filename>
Open a browser and goto http://localhost
to browse your PHP web site.
You can check if all PHP options are functioning, create a file index.php in /var/www/htdocs-lighttpd with this code:
and goto http://localhost