PHP and FastCGI
From Resin 3.0
PHP compilation
To use PHP in FastCGI mode, you need to compile it with --enable-fastcgi
> ./configure --enable-fastcgi > make
PHP starting
You will need to start PHP in fastcgi mode and enable a number of concurrent processes.
> PHP_FCGI_CHILDREN=256 php -b localhost:6666
Note in particular that you may need to set the PHP_FCGI_CHILDREN environment variable. If that value is too low, PHP will not be able to handle multiple requests.
resin-web.xml configuration
<web-app xmlns="http://caucho.com/ns/resin"> <servlet servlet-name="php-fastcgi" servlet-class="com.caucho.servlets.FastCGIServlet"> <init> <server-address>localhost:6666</server-address> </init> </servlet> <servlet-mapping url-pattern="*.php" servlet-name="php-fastcgi"/> </web-app>