Click to See Complete Forum and Search --> : C++, CGI, and compilation


null
June 15th, 2003, 11:24 AM
I'm having trouble getting CGI scripts that I compile on one machine, run on a seperate server machine. I know you're not typically supposed to do this, but it's all I've got - I don't have access to the server other than FTP.

I've tried the -static switch, still no luck. I can't even get Hello World to work. I've taken care of the proper file format, endline format, and CHMOD issues.

Can anyone recommend anything that might help the compatibility issues? Anything would be a help right now.

No, I do not want to be told to go use PERL ;p I already know it, and it's not what I need right now.

Thanks in advance.

kakalake
June 15th, 2003, 04:03 PM
Hello!
The first thing you should do is to figure out what kind of system (operating system, hardware, ...) your provider uses. If you compile your code on a pc with a different cpu than the cpu of the pc you want to run your program on then it doesn´t work.
the second thing is you have to set the appropiate rigths for your cgi-program on the remote host. In most cases it is 755.
The third thing is that you have to tell the remote client (i.e. your browser) what kind of data your sending. Therefore you have to send the string "Content-Type:html/text\n\n" first to the client before you can send any kind of data.

I hope i could help you....