You are not logged in.

#1 2009-07-08 22:33:39

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

PHP and FastCGI

I have the official arch linux php package and fcgi installed. How can I get php to work with fastcgi? I need it for cherokee web server. On ther site is a quick how to on php, but I can't get it to work. I dont know how to start the fastcgi server and how to get the socket file. I'm doing this for the firs time, and it's quite frustrating. Can somebody help?

Offline

#2 2009-07-10 14:12:10

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: PHP and FastCGI

Offline

#3 2009-07-10 14:12:22

Zyx
Member
From: Poland
Registered: 2006-12-09
Posts: 20
Website

Re: PHP and FastCGI

Well, go to /etc/conf.d and find spawn-php file. Edit it and set the following variables:

SPAWNFCGI="/usr/bin/spawn-fcgi"
FCGIPROGRAM="/usr/bin/php-cgi"

USERID=youruser
GROUPID=yourgroup

FCGISOCKET="/tmp/php-fcgi.socket"

Then, run:

/etc/rc.d/spawn-php start

If you see in the ps aux output some instances of the php-cgi process, it means that PHP FastCGI is running. Then you simply copy the socket name to your webserver configuration and configure it according to the docs. Unfortunately, I can't help you with Cherokee, because I'm using Lighttpd.

Offline

#4 2009-07-10 14:48:40

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: PHP and FastCGI

I dont use any goofy launchers. I just use php's native fastcgi launch interface, along with daemontools to keep the service up.

example: http://blog.kovyrin.net/2006/05/30/ngin … cgi-howto/

If you are interested in my daemontools specific run script, then let me know.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2009-07-10 16:37:03

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

Re: PHP and FastCGI

I've asked on the mailing list. Cherokee has a 'wizard' (hate them, but this one actually works) to set php up. You dont need any spawning, because cherokee will spawn php if it can't find any already running (thats why you give him the UNIX socket or the host:port directive). Anyway, After running the wizard, I checked what Information source (cherokee specific) it created. So, the Interpreter field is /usr/bin/php-cgi -b /tmp/cherokee-php.socket (that's the spawning part) and then Connection is obviously /tmp/cherokee-php.socket. That's it. Now you only need to make use of the Interpreter in as many rules (again, cherokee specific) as you wish.

Offline

#6 2009-10-27 19:02:50

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: PHP and FastCGI

Which should I use from the official repo: http://www.archlinux.org/packages/?sort … =&limit=50
Why is the wiki linking to the AUR if both the versions is hosted in extra?

Birger smile

Offline

Board footer

Powered by FluxBB