Newbie Question

  • Thread starter John D. Sanders
  • Start date
J

John D. Sanders

I have an Apache Web Server running and I want to use Perl as my CGI
language.

I have Matt's FormMail script running properly but when I try to
implement my own scripts I get an error.

The script I am using for testing:
#! /usr/bin/perl

use warnings;
use strict;

print "content-type: text/html\n\n";
print "<html><head><title> Current Date and Time </title>";
print "</head>\n<body>";
print scalar( localtime() );
print "</body></html>";


The error I get when executing www.lovinthelord.org/cgi-bin/testing.pl:

Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, (e-mail address removed) and
inform them of the time the error occurred, and anything you might have
done that may have caused the error.

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

Please any help would be appreciated.

Thanks
John
www.lovinthelord.org
 
I

ioneabu

I entered your script on my server and it appears to work. Browser
output:

Mon Jan 3 17:41:08 2005

wana
 
J

John D. Sanders

I entered your script on my server and it appears to work. Browser
output:

Mon Jan 3 17:41:08 2005

wana
Do you have any ideas why id does not on mine when other Perl scripts work?
 
G

Gunnar Hjalmarsson

John said:
I have an Apache Web Server running and I want to use Perl as my CGI
language.

I have Matt's FormMail script running

Exchange it for http://nms-cgi.sourceforge.net/scripts.shtml
properly but when I try to
implement my own scripts I get an error.

The script I am using for testing:
#! /usr/bin/perl

use warnings;
use strict;

print "content-type: text/html\n\n";
print "<html><head><title> Current Date and Time </title>";
print "</head>\n<body>";
print scalar( localtime() );
print "</body></html>";


The error I get when executing www.lovinthelord.org/cgi-bin/testing.pl:

Internal Server Error

<snip>

- Are you sure that the path to perl is correct?
- Did you upload the script in ASCII mode?
- Did you set the right permissions (probably 755)?

If that doesn't help:
http://faq.perl.org/perlfaq9.html#My_CGI_script_runs_f
 
J

Jürgen Exner

John said:
I have an Apache Web Server running and I want to use Perl as my CGI
language.

I have Matt's FormMail script running

Very bad idea!
Please see the gazillions of postings about tha topic for details and what
to do instead.
properly but when I try to
implement my own scripts I get an error.
[...]

Internal Server Error

Did you check the FAQ? Please read "perldoc -q 500", it addresses your very
error message.

[...]
More information about this error may be available in the server
error log.
Please any help would be appreciated.

Well, did you check the server error log as suggested in the error message?
What does it say?

jue
 
A

A. Sinan Unur

Do you have any ideas why id does not on mine when other Perl scripts
work?

Because you cannot make s**t up and expect it to work!

You wrote:

I have an Apache Web Server running and I want to use Perl as my CGI
language.

I have Matt's FormMail script running properly but when I try to
implement my own scripts I get an error.

The script I am using for testing:
#! /usr/bin/perl

use warnings;
use strict;

print "content-type: text/html\n\n";

That is not correct.
 
T

takarov2003

John said:
I have an Apache Web Server running and I want to use Perl as my CGI
language.

I have Matt's FormMail script running properly but when I try to
implement my own scripts I get an error.

YOu have already gotten advice on this matter ^^^^
The error I get when executing www.lovinthelord.org/cgi-bin/testing.pl:

Internal Server Error

Do you still get the error if you rename the file testing.cgi? If not,
this is an apache configuration matter, not a perl matter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,356
Latest member
deepthi.kodakandla

Latest Threads

Top