logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Help getting perl/CGI working - 500 Internal Server Error
Author
trevdak



Joined: 25 Nov 2008
Posts: 1
Location: Chicago, IL

PostPosted: Tue 25 Nov '08 0:23    Post subject: Help getting perl/CGI working - 500 Internal Server Error Reply with quote

I'm exasperated. I've looked all over the web, and everywhere offers the same answers, yet the answer doesn't seem to work.
I'm trying to get perl/cgi working on my server so I can use bugzilla.
Here's some basic setup info:
Apache HTTP 2.2
Snippets from the config file:

Code:
LoadModule cgi_module modules/mod_cgi.so
...
<Directory />
    Options FollowSymLinks +ExecCGI
    AllowOverride None
    AddHandler cgi-script cgi pl
</Directory>
...
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
...
AddHandler cgi-script cgi


Most other stuff seems unrelated, mostly default.



Now, I'm trying to run a basic .cgi file in my home directory.
Location: myserver.com/home.cgi
Script content:
Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, world!\n";


Script chmodded a+x

.htaccess contents:
Code:
php_flag display_errors on
Options +FollowSymlinks +ExecCGI
AddHandler cgi-script cgi pl



When I run the script in command line with ./hello.cgi, I get:
Content-type: text/html

Hello, world!


However, when I run it in my browser (http://www.myserver.com/hello.cgi) I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.



Now, all the sources I've found on the internet say to check the error logs. So, I check my error logs and I see nothing.

So, what's happening? Any ideas or help I get would be greatly appreciated.

Thanks so much for your help.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 25 Nov '08 4:42    Post subject: Reply with quote

Where is perl installed on the system?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 25 Nov '08 18:40    Post subject: Reply with quote

maybe it helps to locate perl with whereis

Code:

user@pc$ whereis perl
Back to top


Reply to topic   Topic: Help getting perl/CGI working - 500 Internal Server Error View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules