Re: Lighttpd + PHP

Previous thread: Dear,TS¥50元红包已加入您的账户,请尽快使用 by TS官网 on Sunday, December 26, 2010 - 11:21 pm. (1 message)

Next thread: Your friend recommends you a site by fusionchiro on Monday, December 27, 2010 - 12:25 am. (1 message)
From: Hugo Osvaldo Barrera
Date: Sunday, December 26, 2010 - 11:59 pm

I know there's like a millon threads and questions on the internet on 
this, and I've read (most of) them.
I'm trying to run lighttpd chrooted, with PHP.

I get the dreaded "No input file specified." error over and over.

Here's the relevant parts of my php.ini:
--
doc_root = "/sites/main-site/"
cgi.force_redirect = 1
cgi.fix_pathinfo=1
--

Here's the relevant parts of lighttpd.conf:
(mod_fastcgi is enabled, of course)
--
server.document-root        = "sites/main-site/"
[...]
fastcgi.server             = ( ".php" =>
                                ( "localhost" =>
                                  (
                                    "socket" => "/tmp/php-fastcgi.socket",
                                    "bin-path" => 
"/usr/local/bin/php-fastcgi"
                                  )
                                )
                             )
--

I've also tried with
   "broken-scriptfilename" => "enable"
and the same problem persisted.

The PHP file I'm trying to visit exists, and if i try to open 
/some-other-file.php, I get a standard 404 error, hence, lighttpd is 
finding the file.

I've copied all the dependencies for php-fastcgi inside the chroot.
The following works fine:

chroot -u _lighttpd /var/www /usr/local/bin/php-fastcgi 
/sites/main-site/info.php

Hence, php-fastcgi is working properly.


Any hints?  I've found that no solution online helped, and I was 
wondering if anybody is actually running lighttpd+php+chroot on openbsd 
and can give me any hints, or maybe a sample of their configs.

Cheers, thanks!

-- 
Hugo Osvaldo Barrera

From: Rodrigo Mosconi
Date: Monday, December 27, 2010 - 5:30 am

Did you  tryed  the "server.chroot=" option ?

From: Hugo Osvaldo Barrera
Date: Monday, December 27, 2010 - 6:46 pm

Yes, the server is chrooted much like the default install, on /var/www/
I copied over php and it's dependencies over to the chroot (and it works 
on it's own as you can see)


-- 
Hugo Osvaldo Barrera

Previous thread: Dear,TS¥50元红包已加入您的账户,请尽快使用 by TS官网 on Sunday, December 26, 2010 - 11:21 pm. (1 message)

Next thread: Your friend recommends you a site by fusionchiro on Monday, December 27, 2010 - 12:25 am. (1 message)