Monkey + PHP

Before we begin with the intructions of configuring and installing PHP, we assume you have Monkey installed on your system.

It doesnt matter if you already have PHP installed running Apache or another httpd, because you can install PHP in another directory it will be perfectly compatible.

  • Download the Latest version of PHP:
      In the official site http://www-php.net you can find the latest version of this great hypertext preprocesor.
  • Installing PHP for Monkey :
      From the command line :

        # tar zxfv php-4.x.x.tar.gz
        # cd php-4.x.x
        # ./configure --prefix=/home/my_home/php/
        # make
        # make install

      That will install PHP in your home directory. If you wish to add Mysql support,
      you have to add the to the configure --with-mysql or any other thing you might want to enable.
  • Adding the PHP libraries to the system :
      Now we must copy the configuration file of PHP (php.ini-dist) located in the same directory where are located the source code of this to where has been installed PHP with the destiny name "php.ini":

        # cp php.ini-dist /home/my_home/php/lib/php.ini
      The following steps must be executed has root. Add this line at the end of "/etc/ld.so.conf" :

        /home/my_home/php/lib

      Afterwards run the following command:

        # ldconfig
  • Reconfiguring monkey.conf :
      Having installed PHP correctly, we must edit and reconfigure the monkey.conf file (conf/monkey.conf)

      In the file, we must define the mime type and the interpreter to process the PHP files, so you must add the following line:

        AddScript application/x-httpd-php /home/my_home/php/bin/php php

      With this defined, you can now process files with .php extentions. If you wish to add more extentions so they can be looked at the PHP, you must add the same line we wrote above with more extentions.
    Any problems or questions : edsiper@users.sf.net . ;-)

    Translated by Davidlohr Bueso