The mod_perl 2.0.9 documentation mentions that:
"Add support for Apache httpd-2.4.x."
Testing mod_perl with Bugzilla indeed shows that 2.0.8 and older do not work with Apache 2.4.x. But Mageia 5 released Apache 2.4.10 and mod_perl 2.0.7-17.20130221svn... i.e a snapshot which looks like to be 2.5 years old. It really needs to be updated to be usable.
This was discussed on IRC when 2.0.9 was released. I was told that 2.0.9 still doesn't support perl 5.22, which is what we have in Cauldron. It may have been that it doesn't support perl 5.20 either (Mageia 5), but I can't remember for sure.
Perl 5.20 is supported, per their changelog.
mod_perl 2.0.10 RC1 is just around the corner:
Its changelog mentions support for perl 5.22:
Automatically select the appropriate c89 option when modperl is being
built with either gcc 5 or clang.
Fix non-threaded Perl 5.22.x build and tests.
Add support for Perl 5.22.x.
mod_perl 2.0.9 is required to work with Apache 2.4.x =>
mod_perl 2.0.10 is required to work with Apache 2.4 and perl 5.22
Assigning to apache-mod_perl maintainer, Shlomi Fish
mod_perl 2.0.10 final has been released two days ago:
It would be good to add a note about this in the Errata, thus I'm adding the
Once added to https://wiki.mageia.org/en/Mageia_6_Errata please replace
FOR_ERRATA6 with IN_ERRATA6.
Created attachment 9614 [details]
patch for the mod_perl RPM
I tested mod_perl 2.0.10 locally using Bugzilla 5.0.3 on Mageia 6, and it's working fine.
The patch doesn't include the new binary. Here is the link to download it:
Someone please commit and push. :)
(In reply to Frédéric Buclin from comment #8)
> Created attachment 9614 [details]
> patch for the mod_perl RPM
> I tested mod_perl 2.0.10 locally using Bugzilla 5.0.3 on Mageia 6, and it's
> working fine.
> The patch doesn't include the new binary. Here is the link to download it:
You can put a similar URL in the .spec. I was able to build the mgarepo checkout, but noticed that it didn't complain about the PGP .asc file being missing. It should have. Anyway, I am going to submit it for now.
> Someone please commit and push. :)
Thank you for the commit on cauldron. Could you push it to mga6 too, please? :)
Should it be pushed to mga5 too?
Mageia 6 =>
@shlomif: ping? See comment 11. If not, then please put apache-mod_perl-2.0.10-1.mga6 in QA queue.
I tested apache-mod_perl-2.0.10-1.mga6.x86_64.rpm a bit, and it's working fine.
Starting to look at this on mga6::x86_64 with very little knowledge of apache and none of perl or CGI.
Before updating I consulted the guide at https://perl.apache.org/docs/1.0/guide/getwet.html.
Wrote the suggested HelloWorld type perl script and attempted to configure apache to run user scripts by adding the following stanza to /etc/httpd/conf/httpd.conf:
# Added by lcl for QA testing
Alias /perl/ /home/lcl/modperl/
allow from all
Failed to restart apache but cannot find an explanation for the failure in the status report or the journal. There is an error log which shows:
[Wed Oct 11 07:35:54.295537 2017] [perl:error] [pid 3635] Can't locate Apache/Registry.pm in @INC (you may need to install the Apache::Registry module) (@INC contains:
Is this module in an RPM somewhere or does it have to be fetched from CPAN?
Looking for answers online I found an install command and adapted it:
$ perl -MCPAN -e 'install Apache::Registry'
but that failed badly, throwing up a stack of warnings and errors, attempting to compile some C code and finally wanting to know where the apache source could be found. ??
Discovered the cpan command and tried that, with similar results.
$ sudo cpan Apache::Registry
This entered an endless loop, again asking where the apache source code was:
Please tell me where I can find your apache src
Can't stat `../apache_x.x/src'
Please tell me where I can fin^CWarning: No success on command[/usr/bin/perl5.22.3 Makefile.PL]
/usr/bin/perl5.22.3 Makefile.PL -- NOT OK
Lightbulb! -> installed apache-devel
It still wants to know where the source code is.
I also don't know much about it but a few points:
- The documentation you use seems to be for mod_perl 1.0, which is why it is not working
- Please do not install anything with cpan when testing, if something is missing from the package or its dependencies it should be fixed not manually installed with cpan
Thanks Pascal for the sound advice. There is a big difference.
At least now the server restarts.
The helloworld script fails to execute though. I tried various places to store it in the user home directory, editing httpd.conf and restarting the server every time. 0744 permissions should be OK but I am having exactly the same trouble I always have with web programming - Object not found - error 404.
localhost/perl/<perl script name>
If I take advantage of the perl alias in the conf file it returns
Access forbidden! - error 403
No package available to test M5.
(In reply to Herman Viaene from comment #17)
> No package available to test M5.
I doubt there will be one so close from Mageia 5 EOL.
OK for me, but then it should not be on the update testing list.
(In reply to Herman Viaene from comment #19)
> OK for me, but then it should not be on the update testing list.
But it has an update for Mageia 6. :)
But it is in the M5 list as well, and in the whiteboard it has MGATOO.
MGA6-32 on Asus A6000VM MATE
No installation issues
First checked httpd starts after the installation: OK
Followed example in https://perl.apache.org/docs/2.0/user/intro/start_fast.html
Only changed location of the test file rock.pl to /var/www/html and consequently the first line of the added item in the httpd.conf file to:
Alias /perl/ /var/www/html/
stopped httpd, and restarted it and got the "mod_perl 2.0 rocks!" answer in the browser.
OK for this test.
Re comment 22:
Congratulations Herman. Maybe I should try that but it is still a puzzle why it did not work from a personal directory. Later.
I tested mod_perl with Bugzilla and it's working fine.
@ Len: access rights???
@Herman: could be.
Validated, but it needs an advisory please. The bug history is too fuzzy for me to invent one.
The goal of upgrading to mod_perl 2.0.10 is to support Apache 2.4 together with Perl 5.22 and newer.
mod_perl 2.0.8 and older support neither Apache 2.4 nor Perl 5.22 and newer.
mod_perl 2.0.9 added support for Apache 2.4, but did not support Perl 5.22.
mod_perl 2.0.10 also added support for Perl 5.22 and newer. This is the version we want for Mageia 6 as it has Perl 5.22.3 and Apache 2.4.27.
Is it enough information to write an advisory? :)
An update for this issue has been pushed to the Mageia Updates repository.