Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongoose cannot run c++ based cgi program #389

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments
Open

mongoose cannot run c++ based cgi program #389

GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. i want to use this mongoose to run some cgi program written by c++;
the file is compiled by MingGW.rename from hello.exe to hello.cgi and move to 
the web direction
2. i configure mongoose as follow:
# Mongoose web server configuration file.
# Lines starting with '#' and empty lines are ignored.
# For detailed description of every option, visit
# http://code.google.com/p/mongoose/wiki/MongooseManual

cgi_pattern **.cgi$|**.pl$|**.php$
cgi_environment cgi
# put_delete_passwords_file <value>
# cgi_interpreter <value>
...(etc not relationed)

3.
hello.cgi fails to run.
What is the expected output? What do you see instead?
hello.cgi should output a webpage as a demo:
C:\webroot\root>index.cgi
Contenttype:text/html

<html>
<head><title> hello world </title></head>
<body>
    Hello, this is your first CGI page!
</body>
</html>

but what i get is only error infomation:

Error 500: Internal Server Error
Cannot spawn CGI process [./root/hello.cgi]: No such device or address

What version of the product are you using? On what operating system?
v3.3 win 8 x 64 version

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 9 Dec 2012 at 8:52

Attachments:

@GoogleCodeExporter
Copy link
Author

Hello,

I have the same problem! :(
I run Mongoose in CentOs. I see the same error: Error 500: Internal Server Error
I know what may be the problem, but I don't know what to do about it:
in mongoose.c, it wants to fork() to run the cgi. but fork() has problem in 
multithhreaded program.
Has anyone solved the problem?

Thanks in advance.

Original comment by [email protected] on 16 Dec 2012 at 10:47

@GoogleCodeExporter
Copy link
Author

running c++ executable renamed to cgi works fine here.
mongoose v3.8 on windows xp sp3

Original comment by [email protected] on 6 Sep 2013 at 10:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant