Check out the Red programming language from the same author

PHP support revealed

Nenad Rakocevic - Softinnov
2-Jun-2007 0:07:15 GMT

Article #5
Main page || Index || 3 Comments


If you want/need PHP interfacing with Cheyenne, here are the installation steps to follow :
  1. Download latest PHP binaries for your platform (v5.2.3 at the time this article is written). For the Windows binaries, I've tested only with the .ZIP package, the INSTALLER package may mess up the PHP config, so better stick with the ZIP or TGZ ones.

  2. Unarchive the PHP package where you want, open a shell window and go to the PHP directory. Then launch a PHP session using :

    > php-cgi -b 9999

    Windows users can either use the DOS console or can make a shortcut link to the php-cgi.exe file then edit the properties to add the above startup arguments.

  3. Once your PHP session is up and running, go to your Cheyenne's home directory, then edit the httpd.cfg file, go to the "localhost" domain definition block, then change the root-dir option to indicate the full path of Cheyenne's %www directory. For example, in my config, it looks like this :

    root-dir %/c/dev/cheyenne/www/

  4. Launch Cheyenne and go to the following URL : http://localhost/test.php
    If all goes well, you should see the phpinfo page meaning that the interface is working ok!
You don't have to set anything in the php.ini file to interface with Cheyenne. If you need to allow PHP to connect to a database (like MySQL for example), just edit the php.ini file and uncomment the required extensions (extension=php_mysql for MySQL).

The PHP interfacing is done thanks to the FastCGI protocol. It's currently in alpha state, so don't push it too hard for now. We've tested this interfacing using several popular PHP applications like: phpMySQL, WordPress, GForge, eGroupWare. All worked well as long as you keep a very low traffic (less than 4 simultaneous connections).

More news about the PHP interfacing next week, so stay tuned !

© Nenad Rakocevic - Softinnov