CGI scripts in C

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

CGI scripts in C

Postby histor » 12. April 2008 14:54

I'm in the habit of writing CGI scripts in C, rather than Perl or PHP. In the past this has been fairly straightforward, but I have recently switched to Vista and it's all gone wrong.

I have installed XAMPP without any trouble (http://localhost works fine). The problem comes when I try to execute a script. Then I get the following message :

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
couldn't create child process: 720005: script.cgi

If you think this is a server error, please contact the webmaster.
Error 500
localhost
04/12/08 14:24:31
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5



Note that "script.cgi" is a .exe file that I renamed because the basic instructions stated that .cgi was the only acceptable suffix for a CGI executable.

Does anyone have any suggestions? All ideas gratefully received.
histor
 
Posts: 3
Joined: 12. April 2008 14:13

Postby Wiedmann » 12. April 2008 16:48

Note that "script.cgi" is a .exe file

A *.exe file only works, if the extension is *.exe.

that .cgi was the only acceptable suffix for a CGI executable.

Just add *.exe to the CGI extensions ("AddHandler cgi-script ...") (Or put the file in the (cgi-bin dir).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby histor » 13. April 2008 11:46

Thanks for the advice Wiedmann. It gets me a little further forward.

I placed the .exe file in c:\xampp\cgi-bin. I still get the same error, but at least I'm using the correct file now.

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
couldn't create child process: 720005: script.exe

If you think this is a server error, please contact the webmaster.
Error 500
localhost
04/13/08 11:39:19
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5



I then tried modifying the AddHandler line in c:\xampp\apache\conf\httpd.conf (I presume this is the right file) as suggested, but that didn't improve things further.

In the same file, I also tried uncommenting "ScriptInterpreterSource registry" in case looking for a non-existent shebang line was causing trouble, but that didn't help either.
histor
 
Posts: 3
Joined: 12. April 2008 14:13

Postby histor » 13. April 2008 20:57

Problem solved - I switched to Abyss, which I can make work.
histor
 
Posts: 3
Joined: 12. April 2008 14:13


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 141 guests