Jump to content

Recommended Posts

Posted

When using C++ as cgi, do I have to compile the program on the server or I can use one compiled on my linux machine? I ask this because I've already tried uploading a c++ program but if I try and run it I get a 500 error message.

Posted

 

Does your shebang line look like this?

#!/usr/bin/perl -w

I'm sorry but I don't really understand. Why the shabang? Where is it supposed to go?

 

Anyway, I realized that in the previous program I had compiled I forgot the part:

printf("Content-Type: text/html")

now it works, thank you anyway

Posted

 

 

Does your shebang line look like this?

#!/usr/bin/perl -w

I'm sorry but I don't really understand. Why the shabang? Where is it supposed to go?

 

 

 

oops my bad.

 

 

Anyway, I realized that in the previous program I had compiled I forgot the part:

printf("Content-Type: text/html")

now it works, thank you anyway

 

 

So you were able to get your file to work on our server?

Posted

The reason I asked was because I was testing some C++ code on my account and every time I tried compiling it, it gave me a 500 error no matter what I did. I was starting to think there was still some bugs to work out of the Tommy server. Then I finally realized I SSH'd in as root to Tommy and every time the new cgi file was created it had root ownership instead of me. Anyway glad you figured your problem out. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...