← Back to team overview

ius-coredev team mailing list archive

Re: [Question #188446]: Apache 2.4

 

Question #188446 on IUS Community Project changed:
https://answers.launchpad.net/ius/+question/188446

Piero Ottuzzi posted a new comment:
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

-- 
You received this question notification because you are a member of IUS
Core Development, which is an answer contact for IUS Community Project.