Score:1

Apache 2.4 on Windows Server 2022 - Always getting Error 500

cn flag

I hope, this is the right place for my question. First I need to say, I am pretty much a beginner in Apache web server. I already had some experience with Apache. But these are already 15 years and more back. I'm trying setting up a Windows 2022 Server with Apache 2.4. I want to use PHP on this server. The problem I actually have is, that the Apache web server is always returning Error 500:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at contact@mydomain.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

This message is always being returned, even when I try to open a simple HTML file without any PHP scripts in it. PHP files are not working either. I tried to open the basic test phpinfo.php, but this is returning exactly the same error.

In the error log file of Apache, I'm getting these 2 lines on every request:

[Mon Feb 06 09:15:37.962313 2023] [fcgid:warn] [pid 5820:tid 1156] (OS 109)The pipe has been ended. : [client 2.200.184.251:64710] mod_fcgid: get overlap result error

[Mon Feb 06 09:15:37.962313 2023] [core:error] [pid 5820:tid 1156] [client 2.200.184.251:64710] End of script output before headers: test.html

The crazy thing is, that the same configuration is working on my private computer (Windows 11). I've copied the folders of Apache and PHP to the server, installed the Apache service and on the server the exact same config is not working, while on my personal computer is working fine.

This is the fcgid part of the httpd.conf:

<IfModule fcgid_module>
   FcgidMaxRequestLen 10000000
   FcgidInitialEnv PHPRC "D:/_Websever/PHP/v7.4"
   <FilesMatch \.(php|html)$>
      SetHandler fcgid-script
   </FilesMatch>
   FcgidWrapper "D:/_Websever/PHP/v7.4/php-cgi.exe" .php
   FcgidWrapper "D:/_Websever/PHP/v7.4/php-cgi.exe" .html
</IfModule>

What can I do, to get more infos about the error or what's going wrong there. Any help appreciated and many thanks in advance. If there is any information missing, please let me know. I will try to add the missing information as soon as possible.

Score:0
cn flag

I did further research on this topic and I was able to fix this issue. It seems that the reason was the wrong PHP version (x86). I've downloaded the PHP x64 version and all worked fine! For all those who may get a similar error.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.