MauroF Posted January 8, 2017 Posted January 8, 2017 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. Quote
MauroF Posted January 8, 2017 Author Posted January 8, 2017 Did you give it 755 permissions?Yes Quote
Byron Posted January 8, 2017 Posted January 8, 2017 Does your shebang line look like this? #!/usr/bin/perl -w Quote
MauroF Posted January 8, 2017 Author Posted January 8, 2017 Does your shebang line look like this? #!/usr/bin/perl -wI'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 Quote
Byron Posted January 8, 2017 Posted January 8, 2017 Does your shebang line look like this? #!/usr/bin/perl -wI'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? Quote
MauroF Posted January 8, 2017 Author Posted January 8, 2017 So you were able to get your file to work on our server? Yes, I have quickly compiled another program in my linux machine with the code from this wiki article, and it works on the server Quote
Byron Posted January 8, 2017 Posted January 8, 2017 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.