in reply to Re^4: Accessing a C++ compiler through a CGI script
in thread Accessing a C++ compiler through a CGI script
Yeah, when you put it on your server I think (i'm not very good with apache) that your apache path has to be set right. The first server i tested on had the path and permissions all setup. If the path isn't set try changing the file paths to their full path name... /home/var/www/blah/code.cpp and /home/var/www/blah/output.txt in code.cgi. Also make sure apache has permissions to write to that directory.
The 'problem receiving data' error comes when the response back from the script isn't a 200 OK response... which means that the script is probably erroring out giving you a 500 ERROR response. If it is doing that, it's probably due to permission/path issues.
When i put it on this server (2nd server i've put it on) i also noticed when apache ran g++ it didn't have permission to make a .o file. i'm still looking for a work-around for that problem... since g++ always wants to make a .o file. If you do get that error, at least you know it compiled successfully :). On my site i just put in some regexs to clean out the path and and that specific error message when it came up. If you could find another program that just checked the syntax, that should work fine as well... and just sub that in the system command. Hope this helps somewhat. The html file should still be ok. UPDATE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Accessing a C++ compiler through a CGI script
by Spidy (Chaplain) on Oct 27, 2005 at 21:54 UTC | |
by ickyb0d (Monk) on Oct 27, 2005 at 22:13 UTC |