Jump to content

Recommended Posts

okay what's going on?

I have the following script:

helloworld.cgi
[code]
#!/usr/local/bin/perl

print "Content-type: text/html\n\n";
print "<HTML><HEAD>";
print "<TITLE>CGI Test</TITLE>";
print "</HEAD>";
print "<BODY><H2>I just wrote a web page using Perl!</H2>";
print "</BODY></HTML>";
[/code]

-permissions on file is 777
-i telneted to my site and did "which perl" and the path is right
-I can run the script just fine through telnet (putty) but if i try to do http://www.mysite.com/cgi-bin/helloworld.cgi  it gives me the following error:

[quote]
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
[/quote]

so...any ideas?
Link to comment
https://forums.phpfreaks.com/topic/35127-cant-even-do-a-perl-hello-world/
Share on other sites

Well I contacted my host in regards to this issue, and he told me I shouldn't set the file permission to 777 (which, I knew that, but I was trying everything, in an attempt to solve it on my own...) but other than that, it should be working.  So I changed it to 755 and sure enough, it is working.... and it still worked when I changed it back to 777. 

Now, as you can see, I'm a total noob at perl, so far.  So I [i]could[/i] be wrong, but I really didn't think that simply changing the chmod from 777 to 755 would really make a difference here,  so I asked the guy why it wasn't working.  Did I not do something right? Some sort of setting in cpanel? What??? And he wouldn't tell me.  On the one hand, I'm kind of upset that he wouldn't tell me, but on the other hand, it leads me to believe that my host probably messed up some setting on their end, as far as installation goes, or something.  I really don't know.  But who cares, it works now. 

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.