Can't enable PHP
Added by stleric over 12 years ago
Hello,
I'm running lighttpd 1.4.28 on TinyCore Linux. I also have PHP 5.3.8 which, I'm told, works with cgi, fcgi, apache2 and lighttpd. Here's what I did:- created directories /var/www and /var/www/htdocs.
- created files /var/www/htdocs/index.html and /var/www/htdocs/hello.php
- chown to nobody:nogroup on all of the above dirs and files.
- created basic lighttpd.conf (owner is root, perm is 644):
server.document-root = "/htdocs" server.port = 80 server.username = "nobody" server.groupname = "nogroup" server.chroot = "/var/www" mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain" ) static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" ) index-file.names = ( "index.html" )
So far so good, I start up lighttpd (using sudo) and I can see the index page.
Then I add the following to lighttpd.conf:
server.modules = ( "mod_fastcgi" ) fastcgi.server = ( ".php" => (( "bin-path" => "/usr/local/bin/php-cgi", "socket" => "/tmp/php.socket" )) )
Trying to start lighttpd now (again via sudo) I get "bind failed for unix:/tmp/php.socket-0 No such file or directory", and it's tagged mod_fastcgi.c.978.
My questions, does anyone see any problem with my config file or how I've set up my lighttpd environment (permissions, etc.)? Does this look like a lighttpd issue (bad config file, etc.)? Or is it perhaps a TinyCore issue (missing packages, incorrect version, etc.)?
The above described config came from TinyCore, I've also seen a config file that uses "$SERVER["socket"] == "80"..." which came from lighttpd which seems to cause even more problems so I've not pursued it further.
TIA,
eric