Install PHP

PHP is a language written entirely with web development in mind from the ground up. I look at PHP as an intagral part of Apache and almost always install it. It is to Apache as ASP 3.0 is to IIS.

  1. go to http://www.php.net and download the current source of PHP
  2. Copy and extracp PHP. I copied the file to /usr/local/src:
    cp -p php-4.3.6.tar.gz /usr/local/src/
    cd /usr/local/src
    tar xvzf php-4.3.6.tar.gz
  3. Compile and install PHP:
    cd /usr/local/src/php-4.3.6
    ./configure --with-mysql --with-apxs2=/usr/local/apache/bin/apxs
    make
    make install
  4. Create a php test page named phpinfo.php and inject the information below:
    <?php
    // Show all information, defaults to INFO_ALL
    phpinfo();

    // Show just the module information.
    // phpinfo(8) yields identical results.
    phpinfo(INFO_MODULES);

    ?>
  5. Now run http://IP_ADDRESS/phpinfo.php and see if it returns your php enviroment information.

  Main