Robin Hood and PHP

If you’re running the Robin Hood web server and want to work with PHP, be aware that the current version of Robin Hood does not natively support the filtering mechanism you need to execute PHP as a standard CGI. You can, however, create a CGI wrapper for PHP that works quite nicely. Here’s how.
Download PHP for BeOS and put the PHP binary in ~/config/bin. Next, download Jonathan Perret’s CGI wrapper for PHP. Install this in ~/config/bin as well.
Now, instead of making the first line of your PHP scripts the path to PHP, use the path to the wrapper, with the path to PHP as an argument to that. Therefore, the simplest possible PHP script would look like this:

echo "Hello -- I'm a PHP script!";

To see this script running on this Robin Hood web server, click here.
To learn more about PHP and Robin Hood, read these In Focus articles by Seth Flaxman at BeNews:
BeOS In Focus: PHP and RobinHood
BeOS In Focus Update: Making PHP Work
Note that Stegemann and Stegemann’s web server diner comes with PHP capabilities built in, though some users have had difficulty getting it to work.



No comments so far.

(comments are closed)