webserver/perl newbie

liunx

Guest
hello guys ... can someone help me out.. i'm tryin' to
study perl or mebe tryin' to modify some perl sccripts ...
the prob is that i cant get to run any of the scripts on my
pc.. i've installed Apache Webserver under the dir
C:\Program Files\Apache Group\Apache and
Active Perl in C:\Perl ... on my Windows ME

so far all i could go ahead was getting the default apache
page at <!-- m --><a class="postlink" href="http://localhost">http://localhost</a><!-- m --> ... i even tried httpd.conf by specifying the
serverroots an' names ..etc as specified in the documentation ..

i cant even figure out where Apache is pointing to when i
type in <!-- m --><a class="postlink" href="http://localhost/cgi-bin/hello.pl">http://localhost/cgi-bin/hello.pl</a><!-- m -->
where hello.pl has the fioll. simple code..

#!/usr/bin/perl
print "Content-type: text/html\r\n\r\n";
print "Hello, World.";


do help ...Hi,
I'm not sure about this but maybe the path to perl is wrong. Try #!C:\Perl. Again I might be competely wrong but you never know.
Good Luck,
PaulDID YoU Place pearl in the right dirctory, double check. God info. <!-- m --><a class="postlink" href="http://perl.about.com/compute/perl/cs/perlinstallation/index.htmi">http://perl.about.com/compute/perl/cs/p ... index.htmi</a><!-- m --> did try using #!C:\Perl but that didnt wor k..

i'll try out whether i've placed it in right directory .. thanx for the info ..quote
"i cant even figure out where Apache is pointing to when i
type in <!-- m --><a class="postlink" href="http://localhost/cgi-bin/hello.pl">http://localhost/cgi-bin/hello.pl</a><!-- m -->"

Apache will access the file hello.pl from cgi-bin which is in your C:\Program Files\Apache Group\Apache. This is where you save your scripts so that they can be accessed at run time.

quote
"so far all i could go ahead was getting the default apache
page at <!-- m --><a class="postlink" href="http://localhost">http://localhost</a><!-- m -->"

This at least lets you know that apache is up and running, usualy the problem at this point is the url being incorrectly spelt or addressed, ensure that the file you want is indeed in C:\Program Files\Apache Group\Apache\cgi-bin and the spelling is correct.

Also I use #!c:\perl\bin\perl as the first line in my scripts... ok the when i run the script it works but i cant execute it on the webserver ... i get the error message that server is not configured properly...

has it got something to do with the file httpd.conf & the ScriptAlias .. of Apache webserver

can someone post an httpd.conf file of a working apache server on a home pc... please include ur perl as well as apache installation directories too ...

thanxi did find an error when i checked the error log
of apache server ... it gave the same error for all of them ...

couldn't spawn child process: c:/.../hello.pl

well ... does this mean i have to change the default values of MaxRequestsPerChild or anything of the sort in httpd.conf ... ?No.

First of all uninstall apache and install it to the root directory of C: eg C:/apache.

Apache goes in the root directory of C. Sorry I didn't notice this before.

Secondly make sure these variables are set in the configuration files
in C:\Apache\conf\http.conf - SeverName localhost
in C:\Apache\conf\srm.conf - ScriptAlias /cgi-bin/ "C:apps/cgi-bin"

Thirdly in the attached zip file is a html file and 2 perl scripts. Put the scripts in C:\Apache\cgi-bin and the html anywhere. Run the html and test to see if the scripts are working. This should do so.

I would send you my http.conf and srm.conf files but my apache machine is in for repairs at the moment. It will be back tomorrow night so if this isn't sorted out by then for you let me know and I will send them up to you.

Good LuckPS:
I found the best way to find out what was wrong with apache itself was to run it from DOS and get the error messages from there.

<!-- w --><a class="postlink" href="http://www.apache.com">www.apache.com</a><!-- w --> are really good at telling you how to fix these.thanx dear annette ..

i can run perl smoothly on my pc now ...
ur perl scripts did work out on re-configuring apache

thankz again for all the help ..

bye ...
 
Top