Manually install php-5.2.1

Posted by saurabh On March - 14 - 2009
        ('DiggThis)           SocialTwist Tell-a-Friend     
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Follow the steps listed below to install php 5.2.1 on Windows XP/Windows Vista.
Install apache 2.2.3 before installing php.

  • Download the zipped folder of php 5.2.1 from www.php.net
  • Extract the file and rename the folder as ‘php’. 
  • Move the folder to your desired location (e.g. C:/Web Server/php) 
  • Go to the directory where you have copied ‘php’ and open it.
  • Make a copy of the file ‘php.ini-recommended’. Name the new file as ‘php.ini’.
  • Open ‘php.ini’.
  • Search for ‘doc_root=’ and enter the path of the root where web pages will be kept.
    (e.g. C:\Web Server\www)
  • Save and close the file.

 

Change configuration settings for apache

  • Open ‘httpd.conf’ in notepad from ‘conf’ folder in the apache installation directory. 
  • Search for the section of the file that has a series of "LoadModule" statements.
  • Add the following line
    LoadModule php5_module "C:/Web Server/php/php5apache2_2.dll"
  • Find "AddType" lines in the <IfModule mime_module> section.
  • Add the line just before the closing </IfModule> for that section.
    AddType application/x-httpd-php .php
  • Add the following line at the end of the file:
    PHPIniDir "C:/Web Server/php"
  • Find ‘DirectoryIndex index.html’ and replace with the following line:
    DirectoryIndex index.php index.html
  • Save and close the file.
  • Restart apache.

Test php

  • Open notepad
  • Enter the following
          <?php
            echo phpinfo();
           ?>
  • Save the file in the web-server root (C:/Web Server/www) as phpinfo.php
  • Open web browser and type ‘http://localhost/phpinfo.php’ and press enter.
  • If you see a page with information about php, then the installation was successful.

For any query please send email to saurabh(at)techwhiz(dot)in

VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
-->
67 views ;  TAGS: , , ,
Related Posts:
  • Install apache 2.2.3
  • Install mysql 4.1
blog comments powered by Disqus

There is nothing lost or wasted in this life. — Bhagvad Gita