I have downloaded the latest version of XAMPP (8.2.0) which comes with PHP 8.0 and is running successfully. However the sites I'm looking to emulate for historical purposes require PHP 5.6.40.
To downgrade to this version I have undertaken the following steps,
- Downloaded PHP 5.6.40 from here - https://windows.php.net/downloads/releases/archives/
- Renamed the PHP folder in /xampp to PHP8
- Creates a new folder in /xampp called PHP and extracted the PHP 5.6.40 files into this folder.
Then I opened /xampp/apache/conf/extra/httpd-xampp.conf and changed
- Code: Select all
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"
to
- Code: Select all
LoadFile "C:/xampp/php/php5ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadFile "C:/xampp/php/libsqlite3.dll"
LoadModule php_module "C:/xampp/php/php5apache2_4.dll"
I then attempt to start Apache and receive the following error,
- Code: Select all
1:28:09 PM [Apache] Error: Apache shutdown unexpectedly.
1:28:09 PM [Apache] This may be due to a blocked port, missing dependencies,
1:28:09 PM [Apache] improper privileges, a crash, or a shutdown by another method.
1:28:09 PM [Apache] Press the Logs button to view error logs and check
1:28:09 PM [Apache] the Windows Event Viewer for more clues
1:28:09 PM [Apache] If you need more help, copy and post this
1:28:09 PM [Apache] entire log window on the forums
However, the apache error logs are empty, and the PHP error log shows "the system cannot find the specified path"
If I rename the PHP folder to PHP5 and rename PHP8 to PHP - Apache starts correctly (and generates some errors due to the web application not being PHP 8 compatible so this is fine)
Any suggestions on a step I may have missed would be appreciated.