link Upgrade XAMPP 1.7.7 to PHP 5.4.0← Back

  1. Download the PHP 5.4.0 package
  2. Stop Apache through the XAMPP Control GUI
  3. Rename C:\XAMPP\php to C:\XAMPP\php-old
  4. Extract the package to C:\XAMPP\php
  5. Copy C:\XAMPP\php\php.ini-production to C:\XAMPP\php\php.ini
  6. 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"
    
  7. 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
    
  8. 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
    
  9. Copy C:\XAMPP\php-old\extras\browsecap.ini to C:\xampp\php\extras
  10. Start Apache via the XAMPP Control GUI and you will be running PHP 5.4.0

Comments

Gravatar

Ankur

2013-02-16

I got very good article here for the same http://www.techflirt.com/how-to-upgrade-php-in-xampp/

Gravatar

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.

Gravatar

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

Post a comment
encounter
encounter
rambunctious-dibasic
rambunctious-dibasic