tarock2 Posted October 4, 2016 Posted October 4, 2016 Sorry, I really tried to find the solution in the forum:I got a perl script in the cgi-bin folder of my public_html.Permission is 0755 (so runable) in File Manager.Shebang is #!/usr/bin/perl -w But when i try "http://tarock.heliohost.org/cgi-bin/test.pl" I get the Internal Server Error. :-( test.pl: #!/usr/bin/perl -w use strict; use CGI; print "Content-type: text/html\n\n"; print "Hello World\n"; Server: StevieUser: tarock
wolstech Posted October 4, 2016 Posted October 4, 2016 This is usually permissions issues, but you already chmodded it to 755. Have you tried running it from another folder? Also, try it using #!/usr/local/bin/perl as the shebang line.
Byron Posted October 4, 2016 Posted October 4, 2016 I chmoded your test.pl to 755 and it works fine now.
tarock2 Posted October 4, 2016 Author Posted October 4, 2016 So why dows it work, when you cmod it and not when i do it? Do I have to ask for every script?
Byron Posted October 4, 2016 Posted October 4, 2016 No you don't have to ask to have it chmoded. I didn't check the file permissions before I chmoded your file so I don't know what it was before. Just make sure you choose 755 on any cgi/perl files. If you have anymore problems, post back.
tarock2 Posted October 4, 2016 Author Posted October 4, 2016 Well, I still have my file DBSelectStatement.pl which has the same permissions 0755, but I get the server error. I just copied this one and named it test.pl.I can't figure out what is the difference between your 0755 and mine. Is there another possibility for me to do a chmod but in File Manager?
Byron Posted October 5, 2016 Posted October 5, 2016 That's because you code in DBSelectStatement.pl is throwing a 500 error. Fix your code and it will work too.More precisely, remove this line of code: use Cpanel::JSON::XS;
tarock2 Posted October 5, 2016 Author Posted October 5, 2016 Thanks a lot. That helped.I also figured out, that it takes some time, after changing the file permissions, till you can run the script. That irritated me.
Byron Posted October 5, 2016 Posted October 5, 2016 I also figured out, that it takes some time, after changing the file permissions, till you can run the script. That irritated me.That's probably just your cache. It should run immediately after you change the permissions.
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