mod_perl not loading on Linux

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mod_perl not loading on Linux

Postby alain_desilets » 03. December 2012 22:48

I am using XAMPP v1.8.1 on Linux CentOS 5.8, and am trying to run some perl cgi scripts in mod_perl mode. But I am simply not able to get mod_perl to load.

I installed XAMPP the normal way (wget the file, then untar it to /opt/lampp), and then modified /opt/lampp/etc/httpd.conf to add the following statement:
Code: Select all
   PerlSwitches -I/home/webitext/src/WeBiText

where /home/webitext/src/WeBiText is a directory where my CGI application's libraries are located (and the directory exists). I put that statement
right under the 'Listen 80' statement.

When I do /opt/lampp startapache, I get:

Code: Select all
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum

If I put the PerlSwitches line in comment and try again to start Apache, it works, and I am able to load the cgi-bin/printenv script. When I inspect the output of that script, I don't see an ENV variable for MOD_PERL, which I believe is an indication that the script is running in mod_cgi, not in mod_perl.

Next, I tried putting this line under the 'Listen 80'

Code: Select all
   LoadModule perl_module modules/

When I stop apache and restart it, I get error

Code: Select all
XAMPP: Stopping Apache with SSL...
httpd: Syntax error on line 55 of /opt/lampp/etc/httpd.conf: Cannot load modules/ into server:
/opt/lampp/modules/ undefined symbol: ap_log_rerror

Any suggestions for how to solve this problem would be greatly appreciated.

Best regards,

Alain Désilets
Posts: 1
Joined: 03. December 2012 22:23
Operating System: Linux, CentOS

Re: mod_perl not loading on Linux

Postby JonB » 05. December 2012 18:39

I see that Apache does not like that LoadModule directive.

Look in opt/lampp/etc/httpd-xampp.conf and see if that might be the right place to add your PerlSwitches directive.

Do you have shebang lines in your code?

Are they (your Perl scripts) named and called as ".pl" objects????

Good Luck
User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests