PHP veya Lighttpd fastcgi yuva oluşturmak mı?

3 Cevap php

I'm working on setting this up on Mac OS X Leopard. I'm having a devil of a time getting PHP5 working as fastcgi under lighttpd. I've verified that I've compiled php with fastcgi enabled. I've tried configuring lighttpd as I've seen in various documentation.

Php-cgi yuva oluşturmak gerekiyordu ben anlayamıyorum çekirdek bit veya lighttpd onu oluşturur eğer.

Benim lighttpd'nin config gibi görünüyor:

fastcgi.server = ( ".php" =>
        ( "localhost" =>
                (
                        "socket" => "/var/run/php-fastcgi.socket",
                        "bin-path" => "/usr/local/php/bin/php-cgi"
                )
        )
)

I / var / run kontrol ettiğinizde / php-fastcgi.socket oluşturuldu.

3 Cevap

I was tearing my hair out with the same problem. Ive setup lighty and php so many times on linux, but I struggled to get the php fastcgi-socket working under OSX.

In the end I started the fast cgi server manually, using php-cgi -b 127.0.0.1:5555

Then specified a tcp port in lighty config... fastcgi.server = ( ".php" =>( "localhost" =>("host" => "127.0.0.1","port" => 5555 )))

Muhtemelen ideal değil, ama bu şekilde çalışır

Httpd neredeyse kesinlikle oluşturur, böylece fastcgi yürütülebilir bölmek sonra devralabilir.

Eğer mod_fastcgi modül etkin var mı?

server.modules += ( "mod_fastcgi" )

Sunucu üzerinde çalışan kullanıcı için yazma izinleri var /var/run? Mı

Değer ne için, burada Debian Etch çalıştıran bir makinede benim yapılandırma bulunuyor:

fastcgi.server = ( ".php" =>
    ((
      "bin-path" => "/usr/bin/php5-cgi",
      "socket" => "/tmp/php.socket",
      "max-procs" => 1,
      "idle-timeout" => 20,

      "bin-environment" => (
        "PHP_FCGI_CHILDREN" => "1",
        "PHP_FCGI_MAX_REQUESTS" => "1000"),

      "bin-copy-environment" => (
        "PATH", "SHELL", "USER"),

      "broken-scriptfilename" => "enable"
     ))
    )