tarock2 Posted October 4, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
wolstech Posted October 4, 2016 Share 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. Quote Link to comment Share on other sites More sharing options...
Byron Posted October 4, 2016 Share Posted October 4, 2016 I chmoded your test.pl to 755 and it works fine now. Quote Link to comment Share on other sites More sharing options...
tarock2 Posted October 4, 2016 Author Share 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? Quote Link to comment Share on other sites More sharing options...
Byron Posted October 4, 2016 Share 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. Quote Link to comment Share on other sites More sharing options...
tarock2 Posted October 4, 2016 Author Share 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? Quote Link to comment Share on other sites More sharing options...
Byron Posted October 5, 2016 Share 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; Quote Link to comment Share on other sites More sharing options...
tarock2 Posted October 5, 2016 Author Share 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. Quote Link to comment Share on other sites More sharing options...
Byron Posted October 5, 2016 Share 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. Quote Link to comment Share on other sites More sharing options...
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.