Apache 2.4

Asked by Nick Le Mouton on 2012-02-21

Are there any plans to release packages for Apache httpd 2.4? I don't foresee CentOS/RHEL releasing anything before 2014.

Question information

Language:
English Edit question
Status:
Answered
For:
IUS Community Project Edit question
Assignee:
No assignee Edit question
Last query:
2012-02-21
Last reply:
2012-04-19
Jeffrey Ness (jeffrey-ness) said : #1

Good Morning Nick,

I performed a quick source install to see the needed deps on EL5,
I've found the following will need to be repackaged as the EL5 versions are to outdated:

   apr 1.3.0 or greater
   apr-util-devel 1.4

I will look in to packaging httpd 2.4 for EL5 and possibly EL6.

Jeffrey-

Jeffrey Ness (jeffrey-ness) said : #2

Ok, so there is a bump which will probably stop httpd 2.4 from hitting IUS el5 or el6,
in the Apache 2.3 branch one of the API calls (unixd_config) was changed to ap_unixd_config:

  http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

This breaks libphp5.so (php52 and php53u) as they are built with stock Redhat
apr and apr-util, these two packages use the Apache 2.2 API.

As you can see, if we were to build a httpd24 package we would also need to maintain
a separate php package and any sub php module. At the moment this is not something
we will be able to maintain.

Piero Ottuzzi (ottuzzi) said : #3

Hi there,

   I'm not a C expert but in Java world you can overload a method: is it not possible to simply patch the 2.4 API to expose both unixd_config and ap_unixd_config? In the doc the state it was simply renamed.

Hope this helps
Bye
Piero

Jeffrey Ness (jeffrey-ness) said : #4

Hello Piero,

Unfortunately we are also not C developers, we merely packages upstream source code.
We do provide patches in many of our RPMs, however these patches are ones that copied from upstream bug trackers.

If you wanted to take some time to figure a solution, we would be more than happy to
test any patches and if valid add any packages to IUS.

Thanks
Jeffrey-

Piero Ottuzzi (ottuzzi) said : #5

Hi,

   after a quick search I found this patch[1] that I report here to prevent it from disappearing:

*** php-5.2.17/sapi/apache2handler/php_functions.c.orig 2012-01-18 12:55:15.000000000 +0200
--- php-5.2.17/sapi/apache2handler/php_functions.c 2012-01-18 12:55:12.000000000 +0200
***************
*** 383,390 ****
--- 383,394 ----
   char *p;
   server_rec *serv = ((php_struct *) SG(server_context))->r->server;
  #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
+ #if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
+ AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
+ #else
   AP_DECLARE_DATA extern unixd_config_rec unixd_config;
  #endif
+ #endif

   for (n = 0; ap_loaded_modules[n]; ++n) {
    char *s = (char *) ap_loaded_modules[n]->name;
***************
*** 414,420 ****
--- 418,428 ----
   php_info_print_table_row(2, "Hostname:Port", tmp);

  #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
+ #if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
+ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
+ #else
   snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
+ #endif
   php_info_print_table_row(2, "User/Group", tmp);
  #endif

As you may guess is for PHP 5.2.17 but it shows a possible path: do not redefine ap_unixd_config but use DEFINEs to handle special cases.

Bye
Piero

[1]http://files.directadmin.com/services/custombuild/php-5.2.17-apache24.patch

Jeffrey Ness (jeffrey-ness) said : #6

Ok, well this is a patch to PHP directly and not the apr and apr-utils source,
this will take a little more effort to put in and test as we would need to patch
all of our php5x packages (php52, php53u, and now php54).

I will see if I can set aside some time to test this out in the future.

Piero Ottuzzi (ottuzzi) said : #7

Hi,

   it looks like the proposed patch for PHP is alredy present in latest PHP version: the problem on how to compile the same PHP for Apache HTTPD 2.2 and 2.4 still remains though. Still loking for a solution...

Bye
Piero

Rares P (rarespamfil) said : #8

Amazon Linux (served on EC2) is the only Linux that currently has Apache 2.4, and they have gone around this issue by making Apache 2.4. work only with PHP5.4. I found that to be an acceptable solution.
https://forums.aws.amazon.com/thread.jspa?messageID=390496

Can you help with this problem?

Provide an answer of your own, or ask Nick Le Mouton for more information if necessary.

To post a message you must log in.