Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Apache2 and Perl tips upgrading from Wheezy to Jessie

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
waldo22
Posts: 21
Joined: 2012-06-19 00:09

Apache2 and Perl tips upgrading from Wheezy to Jessie

#1 Post by waldo22 »

When upgrading from Wheezy to Jessie last night, things went pretty smoothly, with the following exceptions.

Apache2 no longer loaded any of my vhosts. Since at least Lenny, vhosts in /etc/apache2/sites-available/ could be named anything.
In Apache 2.4 the vhost "include" in /etc/apache2/apache2.conf was changed from:

Code: Select all

# Include the virtual host configurations:
IncludeOptional sites-enabled/*
to:

Code: Select all

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
This causes vhosts in /etc/apache2/sites-available/ to not load unless they end with a .conf extension.

Trying to enable using a2ensite filename gives a "not found" error.

The solution to this is to either rename all conf files in /etc/apache2/sites-available/ with a .conf extension, or change /etc/apache2/apache2.conf to remove the ".conf" from IncludeOptional sites-enabled/

Another issue is that Apache 2.4 vhost conf files no longer accept directory options with a mixture of + and nothing. I had:

Code: Select all

Options Indexes MultiViews FollowSymLinks +ExecCGI
but had to remove the "+" to get Apache to reload. You have to either use all +/- or nothing at all.

In addition to the Apache2 problems, Perl > 5.14 (I think) now spams my error logs with warnings.
CGI.pm spams the Apache error log with

Code: Select all

CGI::param called in list context from package main line 40, this can lead to vulnerabilities.
when you access a CGI parameter thusly:

Code: Select all

my $formInput = param('inputName');
This requires either adding the word "scalar" before param('inputName') like

Code: Select all

my $formInput = scalar param('inputName');
or setting

Code: Select all

$LIST_CONTEXT_WARN   = 0;
in /usr/share/perl5/CGI.pm

Perl also now warns

Code: Select all

AH01215: push on reference is experimental
when pushing a scalar into an array like so:

Code: Select all

push($hashWithArrayRef{'key1'},\@array);
It still works, but to make the warnings stop you have to use the following syntax:

Code: Select all

push(@{$hashWithArrayRef{'key1'}},\@array);
This is probably a good thing, since this is the proper syntax anyway.

Some Perl modules installed from CPAN don't seem to make the upgrade.
I had to re-install Net::APNS (for Apple Push notifications; libnet-apns-perl seems to be un-maintained since ~2010?) and WWW::Google::Cloud::Messaging for Android push.
Unfortunately there are no Debian packages for these modules.

Finally, a really cool package for using Webkit to make PDFs (WKHTMLtoPDF) doesn't seem to work with version 0.12.1 in the Jessie repository. Installing the stable 0.12.2.1 .deb from the project homepage fixes the issue.

I know some of these things are esoteric and specific to my oddball use cases (or my poor Perl style), but the 2 Apache conf issues and the CGI.pm warnings probably show up for a lot of people, so hopefully this will help someone.

-Wes

Post Reply