Gossamer Forum
Home : General : Perl Programming :

Perl on Apache (win 32) v. 1.3

Quote Reply
Perl on Apache (win 32) v. 1.3
Hi
I have installed apache on my pc in order to run cgi scripts locally. I cannot understand if the release include a perl interpreter.

http://localhost/ works correcly and I can read any html documents but when I try cgi-bin directory I get the following *Server Error*.

[Tue Dec 21 18:41:49 1999] [error] [client 127.0.0.1] (2)No such file or directory: couldn't spawn child process: c:/programs/apache group/apache/cgi-bin/file-test.pl


If you have any questions just post them. I really need help.

Thanks in advance!!!
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
Um, no. Apache is a web server. It has nothing to do with Perl. You'll have to download and install Perl from http://www.activestate.com/ then read the docs to see what needs to be done so that apache will recgnoze CGI.

--mark
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
OK It seems I have to add a perl module in apache modules directory. I'm very confused. Is there anybody using apache on a pc ....available to help me configure everything??

Thanks.
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
You need to install the WHOLE Perl package, not just a "module".

Also, you should look at www.apache.org for more information about Apache web servers and...how to configure Perl.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
I am running Apache 1.3.6 on win32 with ActivePerl and TCL. All three work like a charm. You need to do a full install of Perl and you should then be ok. Any perl scripts you try to run from your cgi-bin need to show the correct path to the perl interpreter on the top line like:

#!C:/Perl/bin/perl.exe

If you have any questions just drop me an email.

Daniel Alexander
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
Hi everybody.
Thanks very much for your support.
I installed perl and made the call as you indicated >> C:\perl_location\perl.exe

Everything is working. Now the point is this.
How can I get the server *date* locally (I doesn't work).... and how can I simulate a sendmail process locally in order to see if the script is working before uploading it.

Also... less important :: a debugger to get the *script line* when there is an error??

THANKS!!




--------------------------------------------------
Merry Christmas everyone!... and HAPPY NEW YEAR!!!
--------------------------------------------------
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
BTW, if anyone is considering going one step further for local web servers, installing Apache, MySQL, PHP and Perl on Windows 98

head here:
http://www.thedailyspread.com/tech/tut.html

Be careful of one spot where they mention the shebang path as:
!#/usr/bin/perl
or
!#/Perl\bin\MSWin32-x86\Perl
which should read:
#!/usr/bin/perl
or
#!/Perl\bin\MSWin32-x86\Perl

Only took me an hour to figure that out. I copy and paste too often Smile


[This message has been edited by Katana Man (edited December 22, 1999).]
Quote Reply
Re: Perl on Apache (win 32) v. 1.3 In reply to
 
Code:
#!c:/Perl/bin/perl.exe

$smtp = 1;
$mailer_path = "C:/Path/to/Mailer/module";
require $mailer_path . "/Mailer.pm";

$smtpserver = "192.168.0.21";
$email = "you\@work.com";
$return_mail = "me\@work.com";
$subject = "Testing";
$body_txt = "This is a test.";

my $mailer = new Mailer ( { smtp => $smtpserver } )
or die "Can't init mailer: $Mailer::error";
$mailer->send ( {
to => $email,
from => $return_mail,
subject => "$subject",
msg => $body_txt
} )
or die "Can't send mail: $Mailer::error";
print "Mail sent to $email";


Daniel Alexander