Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with apache / perl

Status
Not open for further replies.

dazn

Programmer
Joined
Nov 15, 2001
Messages
3
Location
US
hi.
i'm fairly new at this, and i'm not sure if i'm in the right place for help, but here it goes...
i just installed apache on my computer and i cannot seem to get perl cgi-bin to work correctly. i've only worked with perl in unix environment, and currently, my windows server is giving me a 500 internal server error, which is what i used to get when i forgot to set my XXXX.pl to executable in unix. what would i need to do?

sorry if this thread is something that does not belong in this msgbrd.
 
Yes you have to have perl installed seprately then remember to have a line similar to the following that tells your script where the perl executable is:

#!C:/perl folder/perl
 
not really, you can use the
ScriptInterpreterSource registry
line in httpd.conf if you associate the .pl files with your perl interpreter

//Daniel
 
i don't think i do, since my usr/bin directory doesn't have a perl directory. would i need to download something from perl.org?
 
you do know how to associate files, right?
if you associate the files with your perl interpreter you can lose the shebang line.
you also have to print the header at the top
print ("Content-Type: text/html\n\n");
these are some reasons why my scripts didnt work when i recently installed apache and activeperl on my computer
 
dazn - it would be more usual to have perl installed in c:\perl - have you checked there? If not installed then visit Activestate.com for the free download Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Hi,

You might try the following code. I copy it directly out of the ActiveState Perl Doc. It hopefully will redirect meaningful error to your browser. This code should be placed towards tha top of your script.

use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use CGI qw(:standard);
print header();
warningsToBrowser(1);

Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.

Leland Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top