Skip to content

Instantly share code, notes, and snippets.

@SpiceMan
Created November 7, 2019 04:12
Show Gist options
  • Save SpiceMan/cfbc6d1cd3743abf65e8c35da1619a0e to your computer and use it in GitHub Desktop.
Save SpiceMan/cfbc6d1cd3743abf65e8c35da1619a0e to your computer and use it in GitHub Desktop.
PHP 5.2.17 patch to use with httpd 2.4 (unixd_config variable name change)
--- sapi/apache2handler/php_functions.c 2010-01-03 18:23:27.000000000 +0900
+++ sapi/apache2handler/php_functions2.4.c 2019-11-07 13:08:30.966214824 +0900
@@ -383,7 +383,7 @@
char *p;
server_rec *serv = ((php_struct *) SG(server_context))->r->server;
#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
- AP_DECLARE_DATA extern unixd_config_rec unixd_config;
+ AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
#endif
for (n = 0; ap_loaded_modules[n]; ++n) {
@@ -414,7 +414,7 @@
php_info_print_table_row(2, "Hostname:Port", tmp);
#if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
- snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
+ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
php_info_print_table_row(2, "User/Group", tmp);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment