Lightty w/ PHP, prompts to download PHP file instead of processing
Added by about 16 years ago
Ubuntu 8.10, lighttpd 1.4.19, php5.2.6
Lightty is up and running, is responding to HTTP requests. I'm trying to install phpbb3, but instead of processing the index.php, it prompts me to download the file instead - if I download the file, it's the contents of index.php. Interestingly, it is also doing this with .html files.
I've tried to keep my config simple: http://paste.lighttpd.net/aog1W
Of interesting note, I get 404 errors unless I specify the full path to the files, even though index.html and index.php are listed in server.indexfiles.
My 'php5-cgi -v' command looks like:
PHP 5.2.6-2ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Feb 11 2009 20:31:57)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
And I see no errors in my fastcgi error log. I've set the cgi.fix_pathinfo = 1.
Clearly lightty is responding to my resquests, but not the way one would want. What am I missing here? I've looked through the PHP tutorial here in the Lightty wiki, but no luck so far.
Replies (5)
RE: Lightty w/ PHP, prompts to download PHP file instead of processing - Added by nitrox about 16 years ago
For this we might need to see your configuration and stuff. Also a good way to get some help is joining #lighttpd on irc.freenode.net.
Check if static-file.exclude-extensions has sth. strange or if fastcgi.server is properly configured.
If the problem gets solved outside this thread, please check back and add the solution here. Thx!
RE: Lightty w/ PHP, prompts to download PHP file instead of processing - Added by about 16 years ago
Hi nitrox - the link to my lightty config is above (http://paste.lighttpd.net/aog1W). What other config information would be useful to see?
I'll try the static-file.exclude-extensions configuration when I get home tonight, will post result here. But I'm not sure that would explain why even the .html files are being served as "download this file" popup.
RE: Lightty w/ PHP, prompts to download PHP file instead of processing - Added by nitrox about 16 years ago
$HTTP["host"] == "192.168.1.106:8080" { ... fastcgi.server = ( ...
Does that host get matched? Only if it gets matched the fastcgi.server and thus your php might kick in.
RE: Lightty w/ PHP, prompts to download PHP file instead of processing - Added by about 16 years ago
hmm, I'm not sure - what do you mean by matched? That is the URL I use to visit the site.
I don't know if it matters, but this Ubuntu install is actually running inside a VMware player.
RE: Lightty w/ PHP, prompts to download PHP file instead of processing - Added by about 16 years ago
turns out I had to take the :8080 out of $HTTP["host"] line, then everything started working. Thanks for the help!!