CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    1

    C++, CGI, and compilation

    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.

  2. #2
    Join Date
    May 2000
    Location
    Germany
    Posts
    369
    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....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured