Jump to content

Apache 2.2.8 PHP 5.2.5 Installation...


Recommended Posts

I'm new, and I can't seem to find the right tutorial/help to install those version, either 1 uses the Apache previous version, or the other way...

 

Please help, each step like, which files needs to be copied where...

 

Sorry to look like such a noob. :(

 

Thanks in advance.

Link to comment
Share on other sites

You don't need copy/move files anywhere. Read the following steps:

1. First of all download the Apache 2.2.8 MSI Installer and the PHP 5.2.5 zip package save these files to your Desktop

 

2. Run through the Apache installer. When the installer asks you for the Network Domain and Server Name enter localhost in both boxes, you can use any email address (fake or real) for the Admins Email address. Click Ok to the remaining steps

 

3. After the installer is finished. Apache will be up an running and ready for http requests. To test whether Apache is installed correctly and is running just open your web browser and go to http://localhost/ you should get a It Works message.

 

4. Now extract the contents of the php-5.2.5-Win32 zip file to C:\PHP. Once the contents of the zip are extracted PHP is installed! Well not quite you'll now need to configure Apache with PHP.

 

5. Now go to Start > Program Files > Apache HTTP Server 2.2.8 > Configure Apache Server > and right click the menu itemEdit the Apache httpd.conf Configuration File and select Properties In the properties box click the Find Target button. This should open Windows Explorer and open Apaches conf/ folder

 

6. Open the file called httpd.conf and scroll down the bottom of the file and find this line:

 

# Secure (SSL/TLS) connections

  Before that line add the following lines:

 

# PHP5 Configuration
Include conf/httpd-php5.conf

 

7. Save and close the httpd.conf

8. Now reopen Apache's conf/ folder and create a new file called httpd-php5.conf and add the following lines to it:

 

LoadModule php5_module "C:/php/php5apache2_2.dll"
PHPIniDir "C:/php"

AddType application/x-httpd-php .php

 

9. Apache is now configured. To test if the configuration worked or not you'll need to restart Apache. To do so find the Apache taksbar icon (bottom right hand corner of the screen) and left click it and select Apache2.2 > Restart.

 

10. Once Apache has restarted now open Apaches htdocs/ folder (path is something like C:/program files/Apache foundation/Apache2/htdocs) and create a folder called phpTest.php and add the following code to it:

   

<?php phpinfo(); ?>

    Also whilst in the htdocs folder clear any existing files within that folder, they are not required

 

 

11. Now to test whether Apache is properly configured. Simply open your browser and go to http://localhost/phpTest.php If Apache is configure correctly you should get a page similar to this

If you do Apache is successfully setup with PHP!

 

Now just a few more needed steps.

 

Have fun with PHP!

Link to comment
Share on other sites

In addition to those steps, I recommend finding and setting the following common values in php.ini (stop and start your web server to get any changes made to php.ini to take effect) -

 

error_reporting  =  E_ALL | E_STRICT

display_errors = On

 

extension_dir = c:\php\ext

 

session.save_path = "/tmp"

 

The first two will help when learning php, developing php code, or debugging php code on a development system by getting php to help you as much as possible.

 

The third one will get php to look for extension dll's in the proper folder (except for auxiliary dll's which need to be in a folder listed in the Windows path statement, which has already been taken care of in wildteen88's instructions.)

 

The fourth one will allow sessions data files to be stored in a specific folder (you need to create a c:\tmp folder to match the setting.)

 

The other common settings in php.ini that are need to be set are to uncomment any extension= lines to enable any particular extension.

 

 

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I'm not exactly new here as I've used PHP in the past.

 

I've tried installing these two application (latest version as of today) but ran into problem getting PHPInfo to display the result. I was baffled by this problem even though I've went through the posted instruction several time.

 

I have discovered that rather than using the PHP "installer" version, you can avoid the problem altogether by extracting the "package" version to your local drive!

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.