views:

78

answers:

3

I am having some problems in running cgi on my Apache (Windows, XAMPP), but the exe runs smoothly on the command prompt.

Reading the logs on Apache folder it gives no information about the error. Any ideas about this?

A: 

You are a little light on the detail, so I'll just hazzard a guess.

chmod +x app_executable

Also make sure you are outputting the Content-Type: text/html (or whatever you are returning) followed by two newlines.

Shaun
A: 

Is the file in the proper directory? Does Apache have the desired file/directory access rights to that directory? Can you run other CGI scripts from the same directory?

florin
A: 

Weird.

I found the problem, it was in a sprintf("%f", f); where f wasn't initiated. This is weird, because it ran normal on my cmd but not on apache

any clues?

Jonathan
Unitialised memory can be anything. My guess is that the way your system starts a process started by an exec from another process (eg cgi started from apache) gets memory that has been preset to zero for security reasons. While starting it on the commandline gets random contents
Martin Beckett