ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: php4+php5



umask wrote:
> Иначе как апач будет определять какими функциями из какой библиотеки 
> пользоваться? :)
>   
В Аттаче патч, который накладывается под линуксом на apache2 для
поддержки двух модулей php.
Кому интересно - может посмотреть.

-- 
С уважением, Vasiliy Tolstov
http://www.selfip.ru

--- sapi/apache2handler/sapi_apache2.c  2006-06-26 12:23:36.000000000 +0200
+++ sapi/apache2handler/sapi_apache2.c  2006-06-26 12:23:50.000000000 +0200
@@ -59,8 +59,8 @@
  */
 #undef shutdown
 
-#define PHP_MAGIC_TYPE "application/x-httpd-php"
-#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source"
+#define PHP_MAGIC_TYPE "application/x-httpd-php5"
+#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php5-source"
 #define PHP_SCRIPT "php5-script"
 
 /* A way to specify the location of the php.ini dir in an apache directive */
--- sapi/apache2handler/apache_config.c 2006-07-06 01:19:59.000000000 +0200
+++ sapi/apache2handler/apache_config.c 2006-07-06 01:20:21.000000000 +0200
@@ -178,11 +178,11 @@
 
 const command_rec php_dir_cmds[] =
 {
-       AP_INIT_TAKE2("php_value", php_apache_value_handler, NULL, OR_OPTIONS, 
"PHP Value Modifier"),
-       AP_INIT_TAKE2("php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, 
"PHP Flag Modifier"),
-       AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, 
ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"),
-       AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, 
ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"),
-       AP_INIT_TAKE1("PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF, 
"Directory containing the php.ini file"),
+       AP_INIT_TAKE2("php5_value", php_apache_value_handler, NULL, OR_OPTIONS, 
"PHP Value Modifier"),
+       AP_INIT_TAKE2("php5_flag", php_apache_flag_handler, NULL, OR_OPTIONS, 
"PHP Flag Modifier"),
+       AP_INIT_TAKE2("php5_admin_value", php_apache_admin_value_handler, NULL, 
ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"),
+       AP_INIT_TAKE2("php5_admin_flag", php_apache_admin_flag_handler, NULL, 
ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"),
+       AP_INIT_TAKE1("PHP5INIDir", php_apache_phpini_set, NULL, RSRC_CONF, 
"Directory containing the php.ini file"),
        {NULL}
 };
 
--- Zend/zend.h 2006-12-08 23:47:10.000000000 +0100
+++ Zend/zend.h 2006-12-08 23:48:02.000000000 +0100
@@ -101,6 +101,10 @@
 #  define RTLD_GLOBAL 0
 # endif
 
+extern void *dlvsym (void *__restrict __handle,
+             __const char *__restrict __name,
+             __const char *__restrict __version);
+
 # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
 #  define DL_LOAD(libname)                     dlopen(libname, RTLD_LAZY | 
RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
 # elif defined(RTLD_DEEPBIND)
@@ -110,9 +114,9 @@
 # endif
 # define DL_UNLOAD                                     dlclose
 # if defined(DLSYM_NEEDS_UNDERSCORE)
-#  define DL_FETCH_SYMBOL(h,s)         dlsym((h), "_" s)
+#  define DL_FETCH_SYMBOL(h,s)         dlvsym((h), "_" s, "PHP_5")
 # else
-#  define DL_FETCH_SYMBOL                      dlsym
+#  define DL_FETCH_SYMBOL(h,s)         dlvsym((h), s, "PHP_5")
 # endif
 # define DL_ERROR                                      dlerror
 # define DL_HANDLE                                     void *


 




Copyright © Lexa Software, 1996-2009.