patch-sapi_apache_mod_php5_c 792 B

123456789101112131415161718192021222324
  1. $OpenBSD: patch-sapi_apache_mod_php5_c,v 1.1.1.1 2013/08/07 16:46:56 robert Exp $
  2. --- sapi/apache/mod_php5.c.orig.port Wed Jul 3 08:10:53 2013
  3. +++ sapi/apache/mod_php5.c Sat Jul 27 18:39:50 2013
  4. @@ -952,12 +952,19 @@ static void php_child_exit_handler(server_rec *s, pool
  5. */
  6. static void php_init_handler(server_rec *s, pool *p)
  7. {
  8. + char *ini;
  9. +
  10. register_cleanup(p, NULL, (void (*)(void *))apache_php_module_shutdown_wrapper, (void (*)(void *))php_module_shutdown_for_exec);
  11. if (!apache_php_initialized) {
  12. apache_php_initialized = 1;
  13. #ifdef ZTS
  14. tsrm_startup(1, 1, 0, NULL);
  15. #endif
  16. +
  17. + if ((ini = getenv("PHP_INI_PATH"))) {
  18. + apache_sapi_module.php_ini_path_override = ini;
  19. + }
  20. +
  21. sapi_startup(&apache_sapi_module);
  22. php_apache_startup(&apache_sapi_module);
  23. }