Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am currently running Xampp for a dev server on Windows 7. It has Apache, PHP,MySQL and some other stuff all in one simple exe package for windows and works great. My version currently has PHP version 5.2.9 and the new version of Xampp comes with PHP 5.3.1

I would like to use the newer PHP but I do not want to update everything else. So how would I install the newest version of PHP in windows?

Also on the Xampp page there is another extension download for Tomcat 6.0.20 I am not sure what Tomcat does can someone explain?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

PHP on Windows is essentially a couple of dll files, an ini file and an extension directory. You can have unlimited versions of PHP on your machine, what matters is which version your webserver (in your case with XAMPP, Apache) uses.

Firstly download the latest version of PHP from www.php.net, install it in, for instance, C:\Program Files\PHP.

In your Apache conf file (Something like C:\Program Files\XAMPP\Apache\Conf\httpd.conf) edit the following section so it suits your new PHP installation:

# 
LoadModule php5_module "C:\Program Files\PHP\php5apache2.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:\Program Files\PHP\php.ini"

See the PHP installation docs for more.

Calling phpinfo() from a test script will also help you pinpoint any ini files that are in weird places (Windows directory, Apache Directory etc...)

Tomcat is an Apache extension for running Java, safe to assume you don't need it!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.