Check out the Red programming language from the same author

Better PHP support

Nenad Rakocevic - Softinnov
13-Jul-2007 9:23:15 GMT

Article #11
Main page || Index || 2 Comments


Starting from v0.9.16, PHP support is now much more stable and easier to set up. You just need to uncomment the following lines in the HTTPD.CFG file :
    ;if-loaded? mod-extapp [
    ;    extern-app [
    ;        name    php-fcgi
    ;        url     fastcgi://localhost:9999
    ;
    ;        command "..\php\php-cgi.exe -b 127.0.0.1:9999"	
    ;
    ;        environment [
    ;            PHP_FCGI_MAX_REQUESTS  0
    ;            PHP_FCGI_CHILDREN      1
    ;        ]
    ;	 ]
    ;]
Then change the command argument to match the name and installation path of your php-cgi executable. Path can be relative or absolute, but need to be formatted accordingly to your local filesystem and not in REBOL file format.

You can also change the listening port if it conflicts with another server. Change it both in url and command.

Launch Cheyenne, the PHP process will be launched at the same time. It will also be killed by Cheyenne on exiting. (On Windows platforms in console mode, use the Quit option in the systray menu).

If you need to launch the PHP process manually, comment the command line and follow the instructions here.

Note also, that you can have more than one php-cgi process, but the process pooling management is not yet implemented. To control the number of threads (Windows) or processes (UNIX), just set the PHP_FCGI_CHILDREN parameter to the number you want. If you don't know what this is about, just leave the default value (1). Even then, it can handle dozens of concurrent requests (thanks to the fastcgi multiplexing support added to Cheyenne 0.9.16).

Comments:

Vitaliy
22-Jul-2007 22:36:24
Thanks. This server great job!
Oldes
7-Nov-2007 16:01:14
in %mod-fastcgi.r there must be:
path: form to-local-file get-modes req/in/file 'full-path
instead of:
path: form to-local-file req/in/file

anyway... there still seems to be some problem to run php with virtual-root on windows

Post a Comment:

You can post a comment here. Please keep it on-topic.

Confirm:

Name:


Comment:

 
  Note: HTML tags allowed for:b i u strike li ol ul font a p br pre blockquote

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, personal attacks, offensive blogments, etc.

© Nenad Rakocevic - Softinnov