Unable to start Apache with PHP 5.6.40

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Unable to start Apache with PHP 5.6.40

Postby Always_learning » 10. February 2023 03:36

Hi All,

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,

  1. Downloaded PHP 5.6.40 from here - https://windows.php.net/downloads/releases/archives/
  2. Renamed the PHP folder in /xampp to PHP8
  3. 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.
Always_learning
 
Posts: 5
Joined: 10. February 2023 03:17
XAMPP version: 8.2.0
Operating System: Windows 10

Re: Unable to start Apache with PHP 5.6.40

Postby Altrea » 10. February 2023 07:17

Hi,

try to start Apache as console application by executing apache_start.bat to get at least any helpful error message.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11954
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Unable to start Apache with PHP 5.6.40

Postby Always_learning » 10. February 2023 07:24

Hi Altrea,

Many thanks for the response and I had found this suggestion in the forums (I was unable to post a follow up until my post was approved - thank you for approving this.)

This is the error I am receiving,

Code: Select all
httpd.exe: Syntax error on line 537 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 20 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Can't locate API module structure `php_module' in file C:/xampp/php/php5apache2_4.dll: No error


Line 537,

Code: Select all
# XAMPP settings
Include "conf/extra/httpd-xampp.conf"


Line 20,

Code: Select all
LoadModule php_module "C:/xampp/php/php5apache2_4.dll"


Hmm this file exists in the correct directory so I'm a little confused as to why it's not working.
Always_learning
 
Posts: 5
Joined: 10. February 2023 03:17
XAMPP version: 8.2.0
Operating System: Windows 10

Re: Unable to start Apache with PHP 5.6.40

Postby Always_learning » 10. February 2023 07:30

Hmm I can see a bug report here,

https://community.apachefriends.org/f/viewtopic.php?p=270733&sid=b50110c27255ebb133be3d9b67a178fc#p270731

But it appears the version I have downloaded already has the update applied.
Always_learning
 
Posts: 5
Joined: 10. February 2023 03:17
XAMPP version: 8.2.0
Operating System: Windows 10

Re: Unable to start Apache with PHP 5.6.40

Postby Nobbie » 10. February 2023 12:18

You are mixing 64bit Xampp installation with 32bit DLLs from your download, that does not work.
Nobbie
 
Posts: 13233
Joined: 09. March 2008 13:04

Re: Unable to start Apache with PHP 5.6.40

Postby Always_learning » 10. February 2023 12:27

You are mixing 64bit Xampp installation with 32bit DLLs from your download, that does not work.


This is the version I downloaded,

php-5.6.40-Win32-VC11-x64

This is the 64 bit version correct?
Always_learning
 
Posts: 5
Joined: 10. February 2023 03:17
XAMPP version: 8.2.0
Operating System: Windows 10

Re: Unable to start Apache with PHP 5.6.40

Postby Altrea » 10. February 2023 13:29

wrong
LoadModule php_module "C:/xampp/php/php5apache2_4.dll"


correct
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11954
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Unable to start Apache with PHP 5.6.40

Postby Always_learning » 10. February 2023 13:38

Altrea wrote:wrong
LoadModule php_module "C:/xampp/php/php5apache2_4.dll"


correct
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"


Brilliant, thank you for your kind assistance!
Always_learning
 
Posts: 5
Joined: 10. February 2023 03:17
XAMPP version: 8.2.0
Operating System: Windows 10

Re: Unable to start Apache with PHP 5.6.40

Postby Altrea » 10. February 2023 13:39

you are welcome 8)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11954
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Unable to start Apache with PHP 5.6.40

Postby Nobbie » 10. February 2023 22:34

Always_learning wrote:php-5.6.40-Win32-VC11-x64

This is the 64 bit version correct?


"Win32"? I dont know, you should ask the provider of the files.
Nobbie
 
Posts: 13233
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 84 guests