Install fcgi gem after installing FastCGI with darwinports
sudo gem install fcgi -- --with-fcgi-dir=/opt/local
11303 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
sudo gem install fcgi -- --with-fcgi-dir=/opt/local
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/home/jah/tmp/jah-php5-fcgi.socket", "bin-path" => "/usr/local/www/cgi-bin/php5-fcgi -c /home/jah/etc/php.ini", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "32", "PHP_FCGI_MAX_REQUESTS" => "5000" ) ) ) )
#!/usr/bin/perl use FCGI; $cnt = 0; while (FCGI::accept() >= 0) { print ("Content-type: text/html\r\n\r\n"); print ("<head>\n<title>FastCGI Demo Page (perl)</title>\n</head>\n"); print ("<h1>FastCGI Demo Page (perl)</h1>\n"); print ("This is coming from a FastCGI server.\n<BR>\n"); print ("Running on <EM>$ENV{USER}</EM> to <EM>$ENV{REMOTE_HOST}</EM>\n<BR>\n"); $cnt++; print ("This is connection number $cnt\n"); }
> /usr/local/www/cgi-bin/php5-fcgi -v PHP 5.0.3 (cgi-fcgi) (built: Dec 30 2004 22:44:32)
<IfModule mod_fastcgi.c> FastCgiIpcDir /usr/local/www/fcgi_ipc/tmp AddHandler fastcgi-script .fcgi FastCgiSuexec /usr/local/sbin/suexec FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION </IfModule> <Location /php-fastcgi/> Options ExecCGI SetHandler fastcgi-script </Location>
SuexecUserGroup ${USER} ${GROUP} ScriptAlias /php-fastcgi/ ${HOME}/php-fastcgi/ AddType application/x-httpd-fastphp .php Action application/x-httpd-fastphp /php-fastcgi/php5-fcgi
#!/bin/sh PHPRC="/usr/local/etc" export PHPRC PHP_FCGI_CHILDREN=8 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS exec /usr/local/www/cgi-bin/php5-fcgi