Jump to content

New PHP Install


Recommended Posts

Hi,

 

I am a newbi to PHP, I am trying to get php-5.3.1-Win32-VC9-x86 msi up and running.  My box is an XP Professional.  I have installed it but I am not confident it is configured correctly.

 

Is there a test I can perform to see if it is running normaly?

 

Cheers

 

Len O'Grady

Link to comment
Share on other sites

You'll need to install PHP with an HTTP server too, eg IIS or Apache. Unless you're confident with the command line to run your php scripts. In which case open the command line and type in

php -v

You may need to change directory to where PHP is installed for the command to work.

 

The way I recommend to setup PHP on Windows is the following. Personally I do not recommend the use of the PHP installer. I'd recommend you to uninstall PHP, delete any files left over. Go to http://windows.php.net/ and download the VC6 x86 Thread Safe zipped package. Extract the zip to C:\Server\PHP. Download Apache 2.2 MSI Installer from http://httpd.apache.org

 

Install Apache to C:\Server\Apache (using custom install). Once installed. Open Apaches httpd.conf file (located in C:\Server\Apache\conf). Add the following lines at the end of the file

LoadModule php5_module "C:/Server/PHP/php5apache2_2.dll"
PHPIniDir "C:/Server/PHP"
AddType application/x-httpd-php .php

Save the httpd.conf

 

Next you'll want to go to C:\Server\PHP and find the file name php.ini-recommended and rename it to php.ini

Now you'll want to add C:\Server\PHP to the PATH Environment Variable.

 

Restart Windows. You have now installed PHP and configured Apache with PHP. To test go to C:/Server/Apache/htdocs

Delete any files already in that folder and create a new file called info.php with the following code

<?php phpinfo(); ?>

 

Ensure Apache is running (there should an Apache icon present in the taksbar, with a green triangle which indicates Apache is running). Open you browser and go to http://localhost/info.php

You should see a page displaying your current php version with details about its settings and environment. Everything is now setup and is working correctly. To configure PHP edit the php.ini in C:/Server/PHP/php.ini.

 

Remember whenever you make any changes to the httpd.conf or php.ini you will need to restart Apache for the changes to take effect.

Link to comment
Share on other sites

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.