You are not logged in.

#1 2007-09-12 22:45:39

hjohnson
Member
Registered: 2007-09-12
Posts: 3

Need help on lighttpd + php + fastcgi

I am having one terrible time trying to get the above configured.  Every time I access a .php script I get a "No input file specified" error.  Pulling up .html pages works fine... just not .php.

The following are installed:
php 5.2.4-1, lighttpd 1.4.18-1, fcgi 2.4.0-2

And here is the relevent section of the /etc/lighttpd/lighttpd.conf file:

server.modules              = (
                                "mod_rewrite",
                                "mod_redirect",
                                "mod_access",
                                "mod_fastcgi",
                                "mod_proxy",
                                "mod_simple_vhost",
                                "mod_compress",
                                "mod_accesslog" )

server.document-root        = "/data/srv/www/"
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
simple-vhost.server-root   = "/data/srv/www/vhosts/"
simple-vhost.default-host  = "ncc1701a.test.adtran.com"
simple-vhost.document-root = "/"

$HTTP["host"] == "ncc1701a.test.xxxxx.com" {
  server.document-root = "/data/srv/www/vhosts/ncc1701a.test.xxxxx.com/"
}

server.username             = "lighttpd"
server.groupname           = "lighttpd"

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi",
                                 )
                               )
                            )
fastcgi.debug = 1

All the logs look good (I think)... just cannot get this to work.  If have spent the past six hours reading Google and cannot find anything.  Anyone have any answers?

Offline

#2 2007-09-13 10:07:29

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: Need help on lighttpd + php + fastcgi

What's that "localhost" => part supposed to do? The following works for me:

fastcgi.server = (
    ".php" => ((
        "bin-path" => "/usr/bin/php-cgi",
        "socket" => "/tmp/php-fastcgi.socket"
    ))
)

Offline

#3 2007-09-13 13:04:42

hjohnson
Member
Registered: 2007-09-12
Posts: 3

Re: Need help on lighttpd + php + fastcgi

Smoon,

Thanks for the reply.

I don't know what the localhost statement does... I picked it up off the Wiki (http://wiki.archlinux.org/index.php/Fas … d_lighttpd).  I tried your code and it still does not work.

Offline

#4 2007-09-14 18:05:49

brean
Member
Registered: 2007-09-14
Posts: 2

Re: Need help on lighttpd + php + fastcgi

I've got the same problem - since I upgraded my system to the current versions (round about a week). Maybe it's a bug, I don't know. Before I did a upgrade, it worked very fine with this configuration...

Offline

#5 2007-09-14 18:11:48

hjohnson
Member
Registered: 2007-09-12
Posts: 3

Re: Need help on lighttpd + php + fastcgi

Well after about three days of tinkering I finally fixed the problem...

My original /etc/php.ini did not have the "open_basedir" set... so it was not used.  But when I upgraded the php the new php.ini had a value in it.  Of course that value did not included the path to my scripts... so I added the path to my scripts as follows:

open_basedir = /data/srv/www/:/tmp/:/usr/share/pear/

And now everything works fine.

Offline

#6 2007-09-14 18:16:19

brean
Member
Registered: 2007-09-14
Posts: 2

Re: Need help on lighttpd + php + fastcgi

That's the solution! :-) hjohnson, I spent many houres to find a solution, too. Thank you very, very much!

Offline

#7 2007-10-03 09:09:54

xhemi
Member
From: /dev/urandom
Registered: 2007-03-14
Posts: 11
Website

Re: Need help on lighttpd + php + fastcgi

same issue here, the php.ini didn't account for the lighttpd package now fhs compliant /srv/www directory

Offline

Board footer

Powered by FluxBB