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.
Byron Posted January 8, 2017 Posted January 8, 2017 Does your shebang line look like this? #!/usr/bin/perl -w
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
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?
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
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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now