- Download the PHP 5.4.0 package
- Stop Apache through the XAMPP Control GUI
- Rename C:\XAMPP\php to C:\XAMPP\php-old
- Extract the package to C:\XAMPP\php
- Copy C:\XAMPP\php\php.ini-production to C:\XAMPP\php\php.ini
- Update the following settings in C:\XAMPP\php\php.ini
error_log = "\xampp\php\logs\php_error_log"
include_path = ".;\xampp\php\PEAR"
extension_dir = "\xampp\php\ext"
upload_tmp_dir = "\xampp\tmp"
browscap = "\xampp\php\extras\browscap.ini"
session.save_path = "\xampp\tmp"
session.hash_function = 1
soap.wsdl_cache_dir="\xampp\tmp"
- Uncomment any necessary PHP modules in C:\XAMPP\php\php.ini. NB: Not all modules can be enabled without installing additional libraries. The uncommented modules in the following list should suffice and do not require any extra libraries other than what is included with XAMPP
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
;extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
extension=php_soap.dll
extension=php_sockets.dll
;extension=php_sqlite.dll
extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
;extension=php_zip.dll
- PHP 5.4.0 requires that you set the default timezone in php.ini. I'm in Brisbane, Australia so I set the following
date.timezone = "Australia/Brisbane"
date.default_latitude = -278.29
date.default_longitude = 153.80
- Copy C:\XAMPP\php-old\extras\browsecap.ini to C:\xampp\php\extras
- Start Apache via the XAMPP Control GUI and you will be running PHP 5.4.0
Comments
Ankur
2013-02-16
I got very good article here for the same http://www.techflirt.com/how-to-upgrade-php-in-xampp/
Mei
2012-11-19
Great guide.
In addition to these steps I also had to copy xampp/php/php5apache2_2.dll to xampp/apache/modules/php5apache2_2.dll (which already existed) to get things going correctly.
Some of the modules I enabled didn't exist, which gave errors on start up, but starting apache/apache_start.bat will tell you which ones it can't find. These can then be commented out in php.ini.
Ian
2012-05-24
tengo un problema en el config de pear
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config\Container.php on line 111