CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
active perl and apache2 in xp

 



uatt
User

Dec 12, 2003, 7:23 AM

Post #1 of 8 (1657 views)
active perl and apache2 in xp Can't Post

I have install the things and like to rum my simple script


Code
   

#!c:\user\bin\perl.exe

print "Content-type: text/plain\n\n";
print "hehe";

in my pc

However when I type

http://localhost/cgi-bin/hehe.pl

it shows up an download messge and just treat my .pl file as a zip file

any of you have such experience and here is the show up of error log


Code
   

[Fri Dec 12 23:11:12 2003] [notice] Parent: Received restart signal -- Restarting the server.
[Fri Dec 12 23:11:12 2003] [notice] Child 3708: Exit event signaled. Child process is ending.
[Fri Dec 12 23:11:12 2003] [notice] Parent: Created child process 1044
[Fri Dec 12 23:11:13 2003] [notice] Child 1044: Child process is running
[Fri Dec 12 23:11:13 2003] [notice] Child 3708: Released the start mutex
[Fri Dec 12 23:11:13 2003] [notice] Child 1044: Acquired the start mutex.
[Fri Dec 12 23:11:13 2003] [notice] Child 1044: Starting 250 worker threads.
[Fri Dec 12 23:11:14 2003] [notice] Child 3708: Waiting for 250 worker threads to exit.
[Fri Dec 12 23:11:14 2003] [notice] Child 3708: All worker threads have exited.
[Fri Dec 12 23:11:14 2003] [notice] Child 3708: Child process is exiting



Very grateful for any help and

ps

shebang is right

config seemingly right..


Recall
Novice

Dec 12, 2003, 8:50 AM

Post #2 of 8 (1656 views)
Re: [uatt] active perl and apache2 in xp [In reply to] Can't Post

I always use forward slashes in the shebang line on XP - I've never tried it backwards...I assume if that was the problem then you'd get an internal server error.

If perl and apache are both default installations you shouldn't have any problem - it sounds like your configuration is not treating .pl files as perl files - you need to checkout the AddHandler directive at httpd.apache.org


KevinR
Veteran


Dec 12, 2003, 10:18 AM

Post #3 of 8 (1652 views)
Re: [uatt] active perl and apache2 in xp [In reply to] Can't Post

sounds like you installed apache but maybe did not configure it to run pl/cgi scripts yet, see if this article helps you get it running:

http://www.lurkhere.com/apache768.html
-------------------------------------------------


uatt
User

Dec 13, 2003, 7:08 AM

Post #4 of 8 (1645 views)
Re: [KevinR] active perl and apache2 in xp [In reply to] Can't Post

Thank you for two

I had tried everything and the server cannot reconize my .pl or .cgi

...forward backward slash etc

Really trouble this moment....

any more suggestion


KevinR
Veteran


Dec 13, 2003, 1:39 PM

Post #5 of 8 (1638 views)
Re: [uatt] active perl and apache2 in xp [In reply to] Can't Post

have you configured the apache server like the link I posted show you? If you did and it still does not work, I don't know why.
-------------------------------------------------


uatt
User

Dec 13, 2003, 11:40 PM

Post #6 of 8 (1634 views)
Re: [KevinR] active perl and apache2 in xp [In reply to] Can't Post

I think I got the solution

it is

#!/user/bin/perl

a correct first line

and you have to click sereral times until apache( finally) recornise your .pl file

why?? I don't know....


KevinR
Veteran


Dec 14, 2003, 10:41 AM

Post #7 of 8 (1628 views)
Re: [uatt] active perl and apache2 in xp [In reply to] Can't Post

try using:

#!/perl/bin/perl.exe

as the first line in your Perl scripts run on your XP/Apache setup and see if it helps, it's just a guess. If everything else is setup correctly I really do not have a clue what is causing your problem.
-------------------------------------------------


uatt
User

Dec 15, 2003, 1:10 AM

Post #8 of 8 (1624 views)
Re: [KevinR] active perl and apache2 in xp [In reply to] Can't Post

It have to be

#!/user/bin/perl

as the perl compiler is in user folder...

anyway it can run ok now.....

thanks..................

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives