Olaf Sweekhorst

robotic - web applications

Rüttenscheider Platz 10
45130 Essen
0201 800 950 24
info@skurrilewelt.de
USt ID DE 228 788 976

Update PHP Version in xampp (from 7.X to 8.X)

Determine which version, architecture and thread safety mode.

Open a terminal window and type

$ php -i|find "PHP Version"

In my case php 8 is already installed and running so it gives me

PHP Version => 8.1.6
$ php -i|find "Thread Safety"

Thread Safety => enabled

$ php -i|find "Architecture"

Architecture => x64

But the interesting parts are thread safety and architecture. Now you have all information to get the right package on https://windows.php.net/download/ 

Rename your old php directory (for safety) to php7, unzip the new php 8 into xampp/php. Copy the php.ini-development or php.ini-production into php.ini and compare with yout old version of php.ini, now residing in xampp/php7 and change settings like upload_max_size ect. to values needed. Go to the extension section and activate the needed extensions by removing the leading semicolon.

Important: On windows systems you have to add or uncomment the line:

extension_dir = "ext"

above the extensions section.

Next edit the httpd-xampp.conf file.

You will find there on the top of the file this lines

LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadFile "C:/xampp/php/libsqlite3.dll"
LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"

Change it to your new major version

LoadFile "C:/xampp/php/php8ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadFile "C:/xampp/php/libsqlite3.dll"
LoadModule php_module "C:/xampp/php/php8apache2_4.dll"

and afterwards replace all occurences of „php7_module“ to „php_module“.

Restart apache from the xampp control panel and you are done.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert