Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

XAMPP and Perl

by zhouzhen (Novice)
on May 21, 2008 at 18:44 UTC ( #687825=perlquestion: print w/replies, xml ) Need Help??

zhouzhen has asked for the wisdom of the Perl Monks concerning the following question:

Hey hey, I'm having trouble getting XAMPP and Perl to play nicely together. I've installed the mod_perl addon for XAMPP and Activeperl; I think it's probably some kind of communication error with XAMPP. I'm running XAMPP (Apache 2.2.8) on a Windows 2000 PC, with Activeperl 5.8.8.

When I try to run a perl script, all I get is the code of the script (i.e.: #!/usr/bin/perl ...etc.) and nothing happens. Any ideas? I hope I'm not making a dumb newbie mistake. Also, please ask for more info if necessary, I'll respond ASAP.

Replies are listed 'Best First'.
Re: XAMPP and Perl
by mwah (Hermit) on May 21, 2008 at 19:33 UTC
    I'm having trouble getting XAMPP and Perl to play nicely together.

    In my opinion, you should drop the XAMPP altogether if you are doing significant stuff in Perl. The newer XAMPPs are PHP centered and Perl is just an appendix - to be installed afterwards. The XAMMP system throws a lot of stuff on your computer and there are several versions and version extensions around. Don't do that. Install Apache 2.2.8 on a system w/Activeperl 5.10 or so. XAMPP has it's own 'builtin' Perl, I don't know if you may use your Activeperl easily (I think it's not worth the effort) with XAMPP.

    Apache 2.2.8 + Activeperl 5.10 + mod_perl 2.0.4 works nicely, without XAMMP. Even adding a PHP 5.2.5 into your system poses no problems. I did this a million times on several Win-XP boxes.

    Update:
    The OP did get it to work (at least as external Perl-CGI process), so my above rants may be considered as anti-XAMPP advocacy ;-) ... But I'd consider it difficult to load an external mod_perl (non XAMPP - mod_perl => installed into Activestate Perl) into the XAMPP-Apache process (but might work too).

    Regards

    mwa

Re: XAMPP and Perl
by hesco (Deacon) on May 21, 2008 at 19:07 UTC
    I hardly ever work in windows anymore, so this is only a SWAG. But that usually means, in a linux environment, either that the script is not executable, or that the directory from which it is served, is not one enabled in the apache configuration as permitting the execution of cgi scripts. I have no idea whether that advice might translate to your environment.

    -- Hugh

    if( $lal && $lol ) { $life++; }
      It might be a directory problem... Any way (direct or roundabout) that I can check where the proper directory might be? Since it's a home server, I don't have a cgi-bin file structure... maybe in Apache's httpd.conf?
        Checking the config file is a good start. Another place would be the defaults, usually found by executing the main executable with a -v option (win32 might call it /verbose or somesuch). Documentation is a third place. Apache's is unusually good.

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re: XAMPP and Perl
by zhouzhen (Novice) on May 21, 2008 at 19:52 UTC
    UPDATE: Got it to work by making my own cgi-bin directory (strange that there wasn't one already) and fiddling with some settings in the XAMPP CP. Thanks for the quick response and help, everyone. : )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://687825]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2021-05-09 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (100 votes). Check out past polls.

    Notices?