Results 1 to 2 of 2

Thread: Install PHP 5 to work with Apache 2.2 on Windows

  1. #1
    Join Date
    Jan 2009
    Posts
    1,738

    Install PHP 5 to work with Apache 2.2 on Windows

    In this guide, you will know how to Install PHP 5 to work with Apache 2.2 on Windows. So you will need to download and install Apache. To install and configure Apache see this Guide.

    Now Download PHP 5 from here. Now install PHP5. Follow the Image Tutorial :







    Now PHP is installed on your system. You need to make some changes to PHP's configuration file so that it can work without any problems. Go to C:\Program Files\PHP and open php.ini. It will open in notepad, now search for the following code :
    Code:
    short_open_tag = Off
    Now replace the code with this one :
    Code:
    short_open_tag = On
    Sometimes, older PHP scripts may be ran on the server, which you might sometimes don't know or may be you are running some third party php scripts. But all those scripts will not run unless you make some other change. Now find the following code from php.ini file :
    Code:
    register_globals = Off
    And replace the code with the code below :
    Code:
    register_globals = On
    Note : Don't change this if you are not sure.
    You will not want your users to see if any error occurs on your site, so you need to disable error showing. In php.ini file search for :
    Code:
    display_errors = On
    And change the value to Off so it becomes :
    Code:
    display_errors = Off
    If your website uses sessions, then you need to change the following code :
    Code:
    ;session.save_path = "/tmp"
    you will need to change this path as there is no "/tmp" folder. You can change this to :
    Code:
    ;session.save_path = "C:\tmp"
    Save the file and proceed.

    Configure Apache to run PHP scripts.

    Open Apache's folder and go to conf folder. From there opne httpd.conf file and it will open with notepad. Now add this line to the file :
    Code:
    LoadModule php5_module "c:/php/php5apache2_2.dll"
    Now php scripts requires to run an application which could convert the php scripts which is understandable by Apache. For doing this you need to add this line too :
    Code:
    AddType application/x-httpd-php .php
    Now save
    the file and restart Apache.
    Thats it, Done!

  2. #2
    Join Date
    Feb 2010
    Posts
    1

    Re: Install PHP 5 to work with Apache 2.2 on Windows

    When i followed this I can,t able to connect PHP to apache...
    when i add the two lines to httpd file apache can,t able to restart. can u help me in this .......

Similar Threads

  1. Replies: 4
    Last Post: 05-05-2012, 05:59 PM
  2. Install Apache and MySql on windows
    By Enriquee in forum Networking & Security
    Replies: 5
    Last Post: 05-01-2010, 04:32 AM
  3. How to install Apache Tomcat on Windows Vista
    By Janhavi4U in forum Windows Software
    Replies: 3
    Last Post: 19-02-2009, 10:32 AM
  4. Cannot install apache
    By Clemens in forum Operating Systems
    Replies: 3
    Last Post: 13-02-2009, 09:46 AM
  5. How to install Apache server
    By Dodge in forum Windows Software
    Replies: 5
    Last Post: 14-10-2008, 02:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,530,574.35054 seconds with 16 queries