| |||||||||||||||||||||||
PHP scripts can run with Resin using FastCGI. This page explains how to configure Resin and PHP.
Resin works with PHP using the FastCGI protocol through the FastCGIServlet. PHP runs as a separate process waiting for Resin requests. Configuring Resin with PHP requires the following:
The FastCGI servlet requires a single parameter: "server-address" which specifies the FastCGI host and port for PHP. This address must match the port PHP is listening to.
PHP must be compiled with FastCGI support. To check whether your PHP has FastCGI, use "php -v". If you see "(cgi-fcgi)", then your PHP already has FastCGI built in. If you only see "(cgi)", you'll need to rebuild PHP.
Compiling PHP with FastCGITo compile PHP with FastCGI, you'll add the --enable-fastcgi argument to the PHP ./configure script.
To start PHP listening for FastCGI requests, add a "-b 8002" argument.
PHP will start, listening for the next request.
Now, add a test.php to your document tree, and browse the location. You should see the result of the PHP page.
If you have trouble, enable Resin's logging to see what's going on.
|