PHP

 
 
PHP (= Hypertext Preprocessor) is an HTML-embedded server-side scripting language.

PHP is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE information.

More information about PHP can be found at: http://www.php.net

PHP manuals can be found at:
http://www.php.net/manual/en/
http://devzone.zend.com/manual/

The latest PHP version can be downloaded from: http://www.php.net/downloads.php







Installing PHP5.2.8 on Apache 2.2.11



Information
none

Operating system used
Windows Vista Home Premium SP 1

Software prerequisites
Apache 2.2.11

Procedure
  1. Download and unzip php-5.2.8-Win32.zip:
    e.g.: C:\Tools\php-5.2.8-Win32

  2. Set System environment variable: PATH:..;c:\tools\php-5.2.8-Win32

  3. Copy file C:\Tools\php-5.2.8-Win32\php.ini-recommended
    to
    c:\WINDOWS\php.ini

  4. Edit file c:\WINDOWS\php.ini, change the following line:

    doc_root = C:\mobilefish_web
    extension_dir = "c:\tools\php-5.2.8-Win32\ext"




  5. Configure Apache by editing C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf:

    • In this example PHP will be run as a module in Apache and not as a CGI library. Add the following line after all the LoadModule statements:
      LoadModule php5_module "c:/tools/php-5.2.8-Win32/php5apache2_2.dll"

    • Add index.php in the DirectoryIndex directive:
      DirectoryIndex index.html index.shtm index.htm index.php

    • Add the following line after all the AddType statements:
      AddType application/x-httpd-php .php

    View the updated httpd.conf file.

  6. Restart Apache.

  7. To test the PHP installation, create a file phpinfo.php with the following line:

    <?php phpinfo(); ?>

    Save this file into your Apache htdocs directory, e.g.: C:\mobilefish_web and type:
    http://localhost/phpinfo.php

    You should see something like this:

    PHPinfo