XAMPP 8.2.4 for Windows fails with missing Apache extension

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

XAMPP 8.2.4 for Windows fails with missing Apache extension

Postby trejder » 26. August 2023 00:54

I have installed exactly the same version of XAMPP for Windows (from an official source) on four different PCs -- my DEV, TEST, UAT and PROD environments. One of them (DEV) has Windows 11 Pro all three remaining -- Windows 10 Pro.

Deployed PHP application works just fine on three of those machines and fails totally with the following error:

PHP Fatal error: Uncaught Error: Call to undefined function apache_setenv() in ...


Can someone explain to me, how in the heaven this is possible?

This runs beyond my imagination. My experience tells me that if I have used exactly the same installer (meaning that my PHP on all four machines is compiled by the same person based on the same sources and configuration) then it is simple impossible that such installation reports missing PHP extension on only one of four deployment targets.

Furthermore, is there anything I can do about this? Can I somehow add / enable ext-apache extension in my PHP and make my application running on all targets?
trejder
 
Posts: 68
Joined: 13. April 2008 06:45

Re: XAMPP 8.2.4 for Windows fails with missing Apache extens

Postby trejder » 26. August 2023 18:52

Of course my question is, how to make sure that apache_setenv() works on all enviroments.

A solution of replacing apache_setenv() with putenv() is obvious and has already been implemented.
trejder
 
Posts: 68
Joined: 13. April 2008 06:45

Re: XAMPP 8.2.4 for Windows fails with missing Apache extens

Postby Nobbie » 27. August 2023 12:55

trejder wrote:Can someone explain to me, how in the heaven this is possible?


There are multiple options:

1) In php.ini the entry disable_functions can be used to disable functions.
2) In a CGI environment the Apache functions getenv / setenv do not work.

Maybe in the error_log is a hint. As we dont know anything about your installation, its impossible to find the reason. Compare the output of phpinfo(), compare php.ini etc.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: XAMPP 8.2.4 for Windows fails with missing Apache extens

Postby trejder » 27. August 2023 14:18

Many thanks for trying to help. But, I think that you are missing my key point.

NOTHING was changed, nothing was modified, nothing is different.

I took exactly the same .zip file (taken from Apache Friends website), unpacked it on four different PCs and executed installer contained within. I have clicked exactly the same options set on each page of the installer and completed the installation in an exactly the same way.

On three PCs PHP has this function, on four it hasn't.

For me this is a pure magic.

I started this thread only to cure my curiosity, because I haven't faced such problem ever before in my 25+ years experience in an IT industry. The problem from technical perspective is already solved by using "putenv" instead of "apache_setenv".

BTW: I could replicate the problem again and bring you the logs, but what good would you have out of that? A fatal error of missing "apache_setenv" function will most likely have no traceability in the logs. This is as simple as it can be error saying that your PHP has been compiled without Apache library (ext_apache). Period.

I am myself developer, but I have never compiled anything in Linux or out of C++, because this isn't my area of expertise. All four installations are 99.99% exactly the same. I take 0.01% for UFO intervention. Also nobody, except me, has any access to these four installations (as this is entirely internal laboratory stuff) so chances that somebody else has modified or changed anything on any of these PCs are equal to previously mentioned Martians presence.

On the other hand, I do have lost a number of screws a couple of weeks ago. In a very strange, X-Files-like, never explained conditions. This -- together with this "apache_setenv" error rises my doubts about possible UFO intervention.
trejder
 
Posts: 68
Joined: 13. April 2008 06:45

Re: XAMPP 8.2.4 for Windows fails with missing Apache extens

Postby Nobbie » 27. August 2023 21:47

trejder wrote:NOTHING was changed, nothing was modified, nothing is different.


Thats what all people say. There MUST be something different, you simply overlooked it. Computers do not randomly change their mind.

trejder wrote:I take 0.01% for UFO intervention.


Yes, of course. And dont forget, the earth is a flat disk.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 186 guests