XAMPP - Change @INC path to direct to Activeperl 5.12.2 LIB

1.5k views Asked by At

I currently have XAMPP installed at C:\xampp. I currently have Activeperl installed at C:\Perl64.

How can I get my XAMPP server to utilize the library in activeperl instead of the built in library in xampp when executing perl scripts?

4

There are 4 answers

0
Len Jaffe On

set your PERL5LIB environment variable to point into the ActivePerl lib directory. I don't have the exact incantation for you. I switched from ActivePerl to Strawberry Perl this summer right after YAPC::NA.

0
bvr On

If you have cgi/fastcgi application, it is good to point to your AP installation with shebang at the script top:

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

The libraries will go along.

It might get more complicated if you have perl built into Apache with mod_perl, though.

0
Albert On

Set the environment variable in httpd.conf. Like described in this post. Settings take effect after restarting Apache. I put this line:

SetEnv PERL5LIB=C:\Strawberry\perl\lib;C:\Strawberry\perl\site\lib

Worked great with Strawberry Perl.

0
SS Sid On
  1. Add environment variable PERL5LIB -> your lib path in user variables.Follow the below steps:
    • Right click on my computer and go to property
    • Click advanced system settings
    • Click Environment variables
    • In system variables click new
    • In variable name type PERL5LIB
    • In variable value type path to lib folder

Or run following for windows in command prompt: set PERL5LIB=c:\code\lib

Or run following for Linux: export PERL5LIB=/home/code/lib

Now open apache2\conf\httpd.conf in Notepad++ and do following changes

  • Add Perl library folder paths anywhere in the file. SetEnv PERL5LIB C:/code/lib;C:/usr/site/lib;C:/usr/lib
  • save the config and restart the apache service.