How can I upgrade PHP on Windows 7?

19,705

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:
19,705

Related videos on Youtube

JasonDavis
Author by

JasonDavis

PHP/MySQL is my flavor of choice however more recently JavaScript is really becoming something I enjoy developing with! Writing code since 2000' Currently working heavily with SugarCRM + Launching my Web Dev company ApolloWebStudio.com "Premature optimization is not the root of all evil, lack of proper planning is the root of all evil." Twitter: @JasonDavisFL Work: Apollo Web Studio - https://www.apollowebstudio.com Some of my Web Dev skills, self rated... +------------+--------+------+--------------+ | Skill | Expert | Good | Intermediate | +------------+--------+------+--------------+ | PHP | X | | | +------------+--------+------+--------------+ | MySQL | X | | | +------------+--------+------+--------------+ | Javascript | X | | +------------+--------+------+--------------+ | jQuery | X | | +------------+--------+------+--------------+ | CSS+CSS3 | X | | +------------+--------+------+--------------+ | HTML+HTML5 | X | | | +------------+--------+------+--------------+ | Photoshop | | X | | +------------+--------+------+--------------+ | Web Dev | X | | | +------------+--------+------+--------------+ | SugarCRM | X | | | +------------+--------+------+--------------+ | Magento | | X | | +------------+--------+------+--------------+ | WordPress | X | | | +------------+--------+------+--------------+ | SEO | X | | | +------------+--------+------+--------------+ | Marketing | X | | | +------------+--------+------+--------------+ |Social Media| X | | | +------------+--------+------+--------------+

Updated on September 17, 2022

Comments

  • JasonDavis
    JasonDavis over 1 year

    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?