"CGI deactivated" + CGI error reports, but file is present

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

"CGI deactivated" + CGI error reports, but file is present

Postby FrankC » 26. June 2015 17:02

I just installed XAMPP 5.6.8 on another machine, Win 7 x64 (first time for that machine to have XAMPP installed). I am seeing this server notification in Firefox when I try to open a file:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.


The XAMPP Status Page says that CGI is deactivated (all other necessary modules activated), and this is what the error log says:
[Fri Jun 26 16:56:45.461115 2015] [cgi:error] [pid 5788:tid 1632] (OS 2)The system cannot find the file specified. : [client 127.0.0.1:49532] AH01223: couldn't spawn child process: C:/xampp/cgi-bin/cgi.cgi


However, as this image shows, the cgi.cgi file is present, at its correct location. How do I solve this, the fastest way possible (I need to get a lot of work done before Monday, and the other machine has several hardware problems)?
Last edited by FrankC on 26. June 2015 22:09, edited 1 time in total.
FrankC
 
Posts: 42
Joined: 23. October 2011 03:57
Location: The city of cities
XAMPP version: 7.4
Operating System: Win 10 Pro

Re: "CGI deactivated" + CGI error reports, but file is prese

Postby FrankC » 26. June 2015 21:39

The problem is solved for now. I moved my .htacces file to outside of the local root directory. But that leaves a couple of questions:

  1. Why does the XAMPP Status Page report that CGI is disabled while it is not? I've been working with XAMPP ever since v. 1.7, but this has never happened to me before.
  2. My .htacces file causes no problems whatsoever on the remote server (PHP v.5) and on my other machines, with the oldest having XAMPP v. 1.7. Why does the current version 'crash' on it?
Don't get me wrong, I am very grateful for the product that you folks have been making. The amount of time and research that XAMPP saves if one works with local PHP en MySQL is enormous. So ------> kudos to you! <----------. But I would hate to see XAMPP get a lesser reputation than its Windows competitors because of something so seemingly simple.
FrankC
 
Posts: 42
Joined: 23. October 2011 03:57
Location: The city of cities
XAMPP version: 7.4
Operating System: Win 10 Pro

Re: "CGI deactivated" + CGI error reports, but file is prese

Postby second child » 28. June 2015 00:25

if you go to the windows install information page, it gives some alternative actions. I had a similar problem, and put a a second alias directive into apache configuration file and it has worked well. There is also another alias file so separate by a # and I have no more troubles with that.
Here is the directive that I used:
ScriptAlias/cgi-bin/user/local/Apache2/cgi=bin/
I am not sure of a space between Script and Alias but read the comments about it in config file.
second child
 
Posts: 1
Joined: 27. June 2015 23:37
Operating System: Windoows 7

Re: "CGI deactivated" + CGI error reports, but file is prese

Postby FrankC » 29. June 2015 10:25

The correct syntax would actually be
Code: Select all
ScriptAlias /cgi-bin/ /user/local/Apache2/cgi-bin/


But even that doesn't cure in my case. I think I'll just enter a bug report, because with a small work-around I do have a well working system now. I don't like it when a system reports incorrectly or errors, but for now I have no more practical problems.

Thanks for the effort, second child!
FrankC
 
Posts: 42
Joined: 23. October 2011 03:57
Location: The city of cities
XAMPP version: 7.4
Operating System: Win 10 Pro

Re: "CGI deactivated" + CGI error reports, but file is prese

Postby FrankC » 27. May 2018 13:41

UPDATE

It turned out that CGI was deactivated because at installation I chose to not have Perl installed because I never use it. It also turned out that the server's error report regarding the cause ("Either the server is overloaded or there was an error in a CGI script.") is incorrect. The error log (xampp/apache/logs/error.log) showed that the error lay with the htaccess file, i.e. with these command lines:

Code: Select all
ExpiresActive On
ExpiresDefault "modification"
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/xhtml+xml


The lines in themselves are correct, but they need certain modules to be loaded/activated, which is not the case in the default XAMPP configuration. I chose to make the server ignore the local htaccess file because it is no use and because remote servers may have a different base configuration, influencing the eventual results.
FrankC
 
Posts: 42
Joined: 23. October 2011 03:57
Location: The city of cities
XAMPP version: 7.4
Operating System: Win 10 Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 129 guests