cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Error

N/A

Internal Error

Hi,
I've developed a Perl application that I'd like to try online.
Unfortunately using someone elses server is not as easy as having your own root server.
My CGI scripts all seem to return an Internal Server error. I've had a look at /var/log/httpd/error_log but it is blank.
Is there any way to see the errors?

Phil.
10 REPLIES
N/A

Internal Error

You could try adding:

use CGI::Carp qw ( fatalsToBrowser ); 
to the top of the script.
N/A

Internal Error

Nae luck. If I execute the cgi script from the command line (ssh into the cgi server) it displays the appropriate HTML, but the webserver still gives an Internal Server Error. Cry
Is this a job for Force9 support?
N/A

Internal Error

Do you have:

print "Content-Type: text/html\n\n";


at the top of the script? I don't think Support will help with script problems, but I could be wrong.
N/A

Internal Error

Yep (using header from the CGI module)
Here's the text that is generated from running the script from the command line. Actually, now I think about it the file is called banner.cgi - should it be called banner.pl?


Content-Type: text/html; charset=ISO-8859-1

<html>
<head><title>Banner</title></head>
<body>
<center>
<font size="+2">Worship Service Planning and Archiving System - Version 0.3</font><br>
Written by <a href="http://www.netouerkz.co.uk">Netouerkz Computer Services</a><br>
<table width="100%" border="0">
<tr><td align=center valign=top><a href=".cgi?noframes" target="_top">No Frames Version</a></td>
<td align=center valign=top><a href="mydet.html" target="_top">My Details</a></td>
<td align=center valign=top><a href="team.html" target="_top">Team Manager</a></td>
<td align=center valign=top><a href="rota.html" target="_top">Rota Manager</a></td>
<td align=center valign=top><a href="dataman.html" target="_top">Song Manager</a></td>
<td align=center valign=top><a href="service.html" target="_top">Service Planner</a></td>
<td align=center valign=top><a href="stats.html" target="_top">Statistics</a></td>
<td align=center valign=top><a href="help.html" target="_blank">Documentation</a></td>
</tr>
</table>
</center>
</body>
</html>
N/A

Internal Error

The source to the perl would be better as its easier to see the problem. Feel free to PM it to me.
N/A

Internal Error

I think I've sussed the problem, nad it may be a Force9 support issue.
My cgis all use common code in a module called common.pm.
I wrote a noddy script with a noddy module, and the script worked if the module was not included, but would execute from the command line both with or without the module included.
Is there something I should add to my use lines to point to the modules or is it a problem with Apache?
N/A

Internal Error

I have used:

use lib '/files/home1/support/status/scripts/
before.


[Moderator's note (by csogilvie): Fixing Code Tag]
N/A

Internal Error

OK, progress is being made now that I have sussed that fatalsToBrowser must be the first included item. Here's a weird one for you to do with @INC.
I get the following error:
Can't locate warnings.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at Mail/Sender.pm line 26.

But if I do perl -V I get:
@INC:
/usr/local/lib/perl5/5.8.0/i686-linux
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.

Que?
N/A

Internal Error

Ah ha - you have found the secret Wink The Web Servers have a different version of Perl than the CGI server. This was discussed back in January in the Newsgroup but the articles have expired. I suspect it may be resolved when stuff is updated in a few weeks. I'll certainly point this out to someone again...
N/A

Internal Error

Phew. I got round this by copying warnings.pm from /usr/local/lib/perl5/perl5.8.0 into my local cgi-bin folder and hacking the errors out of it. My application is now starting to work (minus a few easy-to-fix bugs).
Thanks for all your help Colin. Let's do lunch at Stirling Uni some time.