Mod Perl

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

Mod Perl

Postby therainmaker » 06. August 2007 14:20

Hi Guys,

I've just recently installed Xampp onto an Ubuntu machine. The installation went fine but I am trying to port a web application from Windows (which used xampp too). The windows installation had the modperl directory installed in the htdocs root folder. The files that I placed in that folder did not need the shebang and worked great.

However no there no modperl folder in this linux installation. So I made my own in htdocs and created a simple hello world script to test it. That worked fine however, when I place the files that I am porting from windows to linux in the directory the screen is blank and the error log has the following:

[Mon Aug 06 13:29:41 2007] [error] [client] (8)Exec format error: exec of '/opt/lampp/htdocs/modperl/' failed, referer: http://localhost/modStaff.html
[Mon Aug 06 13:29:42 2007] [error] [client] Premature end of script headers:, referer: http://localhost/modStaff.html

The code for is:

Code: Select all
use CGI ':standard';

$email = param('email');

print "Content-Type: text/plain \n\n"; 

if ($email =~ /^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/)
        print "OK";
        print "Invalid";

This perl code is part of an AJAX application called by a HTML page using JavaScript. All of which works fine on Windows with the already present modperl directory.

If I was to add the shebang to look at the perl binary the script works fine. But this obviously defeats the purpose of modperl.

Do I need to change any config file or how do I solve this to allow my modperl scripts to work?

Thanks for you help!

Posts: 1
Joined: 06. August 2007 13:23

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests