dmitry          Thu Mar 16 16:53:10 2006 UTC

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       basic_functions.c dl.c dl.h 
    /php-src/main       main.c php_globals.h php_main.h 
    /php-src/sapi/cgi   cgi_main.c 
    /php-src/sapi/cli   php_cli.c 
    /php-src/sapi/embed php_embed.c 
  Log:
  Disabled dl(). Now it is enabled only when a SAPI layer registers it 
explicitly. Only CLI, CGI and EMBED do this.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2106&r2=1.2107&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2106 php-src/NEWS:1.2107
--- php-src/NEWS:1.2106 Thu Mar 16 15:35:26 2006
+++ php-src/NEWS        Thu Mar 16 16:53:09 2006
@@ -2,6 +2,8 @@
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? ????, PHP 6.0
 - Unicode support. (Andrei, Dmitry, et al)
+- Disabled dl(). Now it is enabled only when a SAPI layer registers it
+  explicitly. Only CLI, CGI and EMBED do this. (Dmitry).
 - Return "new" by reference now throws an E_STRICT error. (Dmitry)
 - Added E_STRICT to E_ALL. (Dmitry)
 - Dropped safe_mode support (Ilia, Andi)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.761&r2=1.762&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.761 
php-src/ext/standard/basic_functions.c:1.762
--- php-src/ext/standard/basic_functions.c:1.761        Wed Mar  8 14:41:45 2006
+++ php-src/ext/standard/basic_functions.c      Thu Mar 16 16:53:09 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.761 2006/03/08 14:41:45 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.762 2006/03/16 16:53:09 dmitry Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -548,9 +548,6 @@
        PHP_FALIAS(join,                                implode,                
                                                NULL)
        PHP_FE(sql_regcase,                                                     
                                                        NULL)
 
-       /* functions from dl.c */
-       PHP_FE(dl,                                                              
                                                                NULL)
-
        /* functions from file.c */
        PHP_FE(pclose,                                                          
                                                        NULL)
        PHP_FE(popen,                                                           
                                                        NULL)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dl.c?r1=1.108&r2=1.109&diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.108 php-src/ext/standard/dl.c:1.109
--- php-src/ext/standard/dl.c:1.108     Sun Feb 19 18:19:33 2006
+++ php-src/ext/standard/dl.c   Thu Mar 16 16:53:09 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: dl.c,v 1.108 2006/02/19 18:19:33 iliaa Exp $ */
+/* $Id: dl.c,v 1.109 2006/03/16 16:53:09 dmitry Exp $ */
 
 #include "php.h"
 #include "dl.h"
@@ -65,22 +65,6 @@
 
        convert_to_string_ex(file);
 
-       if (!PG(enable_dl)) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dynamically loaded 
extensions aren't enabled");
-               RETURN_FALSE;
-       }
-
-       if ((strncmp(sapi_module.name, "cgi", 3)!=0) && 
-               (strcmp(sapi_module.name, "cli")!=0) &&
-               (strncmp(sapi_module.name, "embed", 5)!=0)) {
-#ifdef ZTS
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in 
multithreaded Web servers - use extension=%s in your php.ini", 
Z_STRVAL_PP(file));
-               RETURN_FALSE;
-#else
-               php_error_docref(NULL TSRMLS_CC, E_STRICT, "dl() is deprecated 
- use extension=%s in your php.ini", Z_STRVAL_PP(file));
-#endif
-       }
-
        php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
        EG(full_tables_cleanup) = 1;
 }
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dl.h?r1=1.24&r2=1.25&diff_format=u
Index: php-src/ext/standard/dl.h
diff -u php-src/ext/standard/dl.h:1.24 php-src/ext/standard/dl.h:1.25
--- php-src/ext/standard/dl.h:1.24      Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/dl.h   Thu Mar 16 16:53:09 2006
@@ -18,15 +18,15 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: dl.h,v 1.24 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: dl.h,v 1.25 2006/03/16 16:53:09 dmitry Exp $ */
 
 #ifndef DL_H
 #define DL_H
 
-PHPAPI void php_dl(zval *file,int type, zval *return_value, int start_now 
TSRMLS_DC);
+void php_dl(zval *file,int type, zval *return_value, int start_now TSRMLS_DC);
 
 /* dynamic loading functions */
-PHP_FUNCTION(dl);
+PHPAPI PHP_FUNCTION(dl);
 
 PHP_MINFO_FUNCTION(dl);
 
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.677&r2=1.678&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.677 php-src/main/main.c:1.678
--- php-src/main/main.c:1.677   Thu Mar 16 11:32:00 2006
+++ php-src/main/main.c Thu Mar 16 16:53:09 2006
@@ -1,4 +1,4 @@
-/* 
+/*
    +----------------------------------------------------------------------+
    | PHP Version 5                                                        |
    +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.677 2006/03/16 11:32:00 dmitry Exp $ */
+/* $Id: main.c,v 1.678 2006/03/16 16:53:09 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -251,14 +251,14 @@
        if (stage == PHP_INI_STAGE_RUNTIME && !SG(request_info).no_headers) {
                sapi_header_line ctr = {0};
                int mimetype_len;
-                        
+
                PHP_INI_OPTION_HEADERS_SENT(default_charset)
-       
+
                mimetype_len = SG(default_mimetype) ? 
strlen(SG(default_mimetype)) : 0;
-               
+
                if (new_value_length) {
                        ctr.line = emalloc( sizeof("Content-type: ")-1 + 
mimetype_len + sizeof("; charset=")-1 + new_value_length + 1);
-               
+
                        memcpy(ctr.line, "Content-type: ", 
sizeof("Content-type: "));
                        memcpy(ctr.line + sizeof("Content-type: ")-1, 
SG(default_mimetype), mimetype_len);
                        memcpy(ctr.line + sizeof("Content-type: ")-1 + 
mimetype_len, "; charset=", sizeof("; charset="));
@@ -267,14 +267,14 @@
                        ctr.line_len = sizeof("Content-type: ")-1 + 
mimetype_len + sizeof("; charset=")-1 + new_value_length;
                } else {
                        ctr.line = emalloc( sizeof("Content-type: ")-1 + 
mimetype_len + 1);
-                       
+
                        memcpy(ctr.line, "Content-type: ", 
sizeof("Content-type: "));
                        memcpy(ctr.line + sizeof("Content-type: ")-1, 
SG(default_mimetype), mimetype_len);
 
                        ctr.line_len = sizeof("Content-type: ")-1 + 
mimetype_len;
                }
                ctr.line[ctr.line_len] = 0;
-               
+
                sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
                efree(ctr.line);
        }
@@ -291,14 +291,14 @@
        if (stage == PHP_INI_STAGE_RUNTIME && !SG(request_info).no_headers) {
                sapi_header_line ctr = {0};
                int charset_len;
-               
+
                PHP_INI_OPTION_HEADERS_SENT(default_mimetype)
-               
+
                charset_len = SG(default_charset) ? strlen(SG(default_charset)) 
: 0;
-               
+
                if (charset_len) {
                        ctr.line = emalloc( sizeof("Content-type: ")-1 + 
new_value_length + sizeof("; charset=")-1 + charset_len + 1);
-               
+
                        memcpy(ctr.line, "Content-type: ", 
sizeof("Content-type: "));
                        memcpy(ctr.line + sizeof("Content-type: ")-1, 
new_value, new_value_length);
                        memcpy(ctr.line + sizeof("Content-type: ")-1 + 
new_value_length, "; charset=", sizeof("; charset="));
@@ -307,14 +307,14 @@
                        ctr.line_len = sizeof("Content-type: ")-1 + 
new_value_length + sizeof("; charset=")-1 + new_value_length;
                } else {
                        ctr.line = emalloc( sizeof("Content-type: ")-1 + 
new_value_length + 1);
-                       
+
                        memcpy(ctr.line, "Content-type: ", 
sizeof("Content-type: "));
                        memcpy(ctr.line + sizeof("Content-type: ")-1, 
new_value, new_value_length);
 
                        ctr.line_len = sizeof("Content-type: ")-1 + 
new_value_length;
                }
                ctr.line[ctr.line_len] = 0;
-               
+
                sapi_header_op(SAPI_HEADER_REPLACE, &ctr TSRMLS_CC);
                efree(ctr.line);
        }
@@ -341,7 +341,7 @@
 /* {{{ PHP_INI
  */
 PHP_INI_BEGIN()
-       PHP_INI_ENTRY_EX("define_syslog_variables",     "0",                    
        PHP_INI_ALL,    NULL,                   php_ini_boolean_displayer_cb)   
                
+       PHP_INI_ENTRY_EX("define_syslog_variables",     "0",                    
        PHP_INI_ALL,    NULL,                   php_ini_boolean_displayer_cb)
        PHP_INI_ENTRY_EX("highlight.bg",                        HL_BG_COLOR,    
        PHP_INI_ALL,    NULL,                   php_ini_color_displayer_cb)
        PHP_INI_ENTRY_EX("highlight.comment",           HL_COMMENT_COLOR,       
PHP_INI_ALL,    NULL,                   php_ini_color_displayer_cb)
        PHP_INI_ENTRY_EX("highlight.default",           HL_DEFAULT_COLOR,       
PHP_INI_ALL,    NULL,                   php_ini_color_displayer_cb)
@@ -352,7 +352,6 @@
        STD_PHP_INI_BOOLEAN("asp_tags",                         "0",            
PHP_INI_SYSTEM|PHP_INI_PERDIR,          OnUpdateBool,                   
asp_tags,                               zend_compiler_globals,  
compiler_globals)
        STD_PHP_INI_BOOLEAN("display_errors",           "1",            
PHP_INI_ALL,            OnUpdateBool,                   display_errors,         
        php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("display_startup_errors",   "0",    PHP_INI_ALL,    
        OnUpdateBool,                   display_startup_errors, 
php_core_globals,       core_globals)
-       STD_PHP_INI_BOOLEAN("enable_dl",                        "1",            
PHP_INI_SYSTEM,         OnUpdateBool,                   enable_dl,              
                php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("expose_php",                       "1",            
PHP_INI_SYSTEM,         OnUpdateBool,                   expose_php,             
                php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("docref_root",                        "",             
PHP_INI_ALL,            OnUpdateString,                 docref_root,            
        php_core_globals,       core_globals)
        STD_PHP_INI_ENTRY("docref_ext",                         "",             
        PHP_INI_ALL,            OnUpdateString,                 docref_ext,     
                        php_core_globals,       core_globals)
@@ -453,7 +452,7 @@
                log_file = VCWD_FOPEN(PG(error_log), "ab");
                if (log_file != NULL) {
                        time(&error_time);
-                       strftime(error_time_str, sizeof(error_time_str), 
"%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); 
+                       strftime(error_time_str, sizeof(error_time_str), 
"%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf));
                        fprintf(log_file, "[%s] ", error_time_str);
                        fprintf(log_file, "%s", log_message);
                        fprintf(log_file, "%s", PHP_EOL);
@@ -493,7 +492,7 @@
        ret = PHPWRITE(buffer, size);
        efree(buffer);
        va_end(args);
-       
+
        return ret;
 }
 /* }}} */
@@ -586,12 +585,12 @@
        /* if we still have memory then format the origin */
        if (function.v) {
                if (function_name_is_string) {
-                       origin_len = spprintf(&origin, 0, "%v%s%s(%s)", 
class_name, space, function.s, params); 
+                       origin_len = spprintf(&origin, 0, "%v%s%s(%s)", 
class_name, space, function.s, params);
                } else {
-                       origin_len = spprintf(&origin, 0, "%v%s%v(%s)", 
class_name, space, function, params);   
+                       origin_len = spprintf(&origin, 0, "%v%s%v(%s)", 
class_name, space, function, params);
                }
        } else {
-               origin_len = spprintf(&origin, 0, "%s", stage); 
+               origin_len = spprintf(&origin, 0, "%s", stage);
        }
 
        if (PG(html_errors)) {
@@ -687,7 +686,7 @@
 PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const 
char *format, ...)
 {
        va_list args;
-       
+
        va_start(args, format);
        php_verror(docref, "", type, format, args TSRMLS_CC);
        va_end(args);
@@ -699,7 +698,7 @@
 PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char 
*param1, int type, const char *format, ...)
 {
        va_list args;
-       
+
        va_start(args, format);
        php_verror(docref, param1, type, format, args TSRMLS_CC);
        va_end(args);
@@ -712,7 +711,7 @@
 {
        char *params;
        va_list args;
-       
+
        spprintf(&params, 0, "%s,%s", param1, param2);
        va_start(args, format);
        php_verror(docref, params ? params : "...", type, format, args 
TSRMLS_CC);
@@ -862,7 +861,7 @@
                }
                if (PG(display_errors)
                        && ((module_initialized && !PG(during_request_startup))
-                               || (PG(display_startup_errors) 
+                               || (PG(display_startup_errors)
                                        && 
(OG(php_body_write)==php_default_output_func || 
OG(php_body_write)==php_ub_body_write_no_header || 
OG(php_body_write)==php_ub_body_write)
                                        )
                                )
@@ -925,7 +924,7 @@
                        if (module_initialized) {
 #if MEMORY_LIMIT
                                /* restore memory limit */
-                               AG(memory_limit) = PG(memory_limit); 
+                               AG(memory_limit) = PG(memory_limit);
 #endif
                                efree(buffer);
                                
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
@@ -1171,14 +1170,14 @@
 
        zend_try {
                PG(during_request_startup) = 1;
-               
+
                php_output_activate(TSRMLS_C);
 
                /* initialize global variables */
                PG(modules_activated) = 0;
                PG(header_is_being_sent) = 0;
                PG(connection_status) = PHP_CONNECTION_NORMAL;
-               
+
                zend_activate(TSRMLS_C);
                sapi_activate(TSRMLS_C);
 
@@ -1220,7 +1219,7 @@
 }
 # else
 int php_request_startup(TSRMLS_D)
-{   
+{
        int retval = SUCCESS;
 
 #if PHP_SIGCHILD
@@ -1230,7 +1229,7 @@
        if (php_start_sapi() == FAILURE) {
                return FAILURE;
        }
-       
+
        php_output_activate(TSRMLS_C);
        sapi_activate(TSRMLS_C);
        php_hash_environment(TSRMLS_C);
@@ -1263,7 +1262,7 @@
        if (php_start_sapi(TSRMLS_C) == FAILURE) {
                return FAILURE;
        }
-       
+
        php_output_activate(TSRMLS_C);
        sapi_activate_headers_only(TSRMLS_C);
        php_hash_environment(TSRMLS_C);
@@ -1338,7 +1337,7 @@
        TSRMLS_FETCH();
 
        report_memleaks = PG(report_memleaks);
-       
+
        /* EG(opline_ptr) points into nirvana and therefore cannot be safely 
accessed
         * inside zend_executor callback functions.
         */
@@ -1354,7 +1353,7 @@
        if (PG(modules_activated)) zend_try {
                php_call_shutdown_functions(TSRMLS_C);
        } zend_end_try();
-       
+
        /* 3. Flush all output buffers */
        zend_try {
                
php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1) TSRMLS_CC);
@@ -1406,7 +1405,7 @@
        } zend_end_try();
 
        /* 12. Reset max_execution_time */
-       zend_try { 
+       zend_try {
                zend_unset_timeout(TSRMLS_C);
        } zend_end_try();
 
@@ -1528,7 +1527,7 @@
 #endif
        EG(bailout_set) = 0;
        EG(error_reporting) = E_ALL & ~E_NOTICE;
-       
+
        PG(header_is_being_sent) = 0;
        SG(request_info).headers_only = 0;
        SG(request_info).argv0 = NULL;
@@ -1562,7 +1561,7 @@
        le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index 
pointer", 0);
 
        /* this will read in php.ini, set up the configuration parameters,
-          load zend extensions and register php function extensions 
+          load zend extensions and register php function extensions
           to be loaded later */
        if (php_init_config(TSRMLS_C) == FAILURE) {
                return FAILURE;
@@ -1583,11 +1582,11 @@
                long val;
 
                while (*p) {
-                       if (cfg_get_long(*p, &val) == SUCCESS && val) {
+                       if (cfg_get_long((char*)*p, &val) == SUCCESS && val) {
                                zend_error(E_CORE_ERROR, "Directive '%s' is not 
longer supported in PHP-6 and above", *p);
                        }
                        ++p;
-               }          
+               }
        }
 
        /* Register PHP core ini entries */
@@ -1611,8 +1610,8 @@
                php_printf("PHP:  Unable to initialize stream url wrappers.\n");
                return FAILURE;
        }
-       
-       /* initialize registry for images to be used in phpinfo() 
+
+       /* initialize registry for images to be used in phpinfo()
           (this uses configuration parameters from php.ini)
         */
        if (php_init_info_logos() == FAILURE) {
@@ -1693,6 +1692,27 @@
 }
 /* }}} */
 
+/* {{{ php_enable_dl
+ */
+int php_enable_dl()
+{
+       zend_module_entry *module;
+       static zend_function_entry dl_functions[] = {
+               ZEND_FE(dl, NULL)
+               { NULL, NULL, NULL }
+       };
+       int ret = FAILURE;
+       TSRMLS_FETCH();
+
+       if (zend_hash_find(&module_registry, "standard", sizeof("standard"), 
(void**)&module)==SUCCESS) {
+               EG(current_module) = module;
+               ret = zend_register_functions(NULL, dl_functions, NULL, 
MODULE_PERSISTENT TSRMLS_CC);
+               EG(current_module) = NULL;
+       }
+       return ret;
+}
+/* }}} */
+
 void php_module_shutdown_for_exec()
 {
        /* used to close fd's in the range 3.255 here, but it's problematic */
@@ -1772,7 +1792,7 @@
 {
        zend_file_handle *prepend_file_p, *append_file_p;
        zend_file_handle prepend_file = {0}, append_file = {0};
-#if HAVE_BROKEN_GETCWD 
+#if HAVE_BROKEN_GETCWD
        int old_cwd_fd = -1;
 #else
        char *old_cwd;
@@ -1799,7 +1819,7 @@
 
                PG(during_request_startup) = 0;
 
-               if (primary_file->type == ZEND_HANDLE_FILENAME 
+               if (primary_file->type == ZEND_HANDLE_FILENAME
                                && primary_file->filename) {
 #if HAVE_BROKEN_GETCWD
                        /* this looks nasty to me */
@@ -1815,7 +1835,7 @@
                 */
                if (primary_file->filename &&
                    primary_file->opened_path == NULL &&
-                   primary_file->type != ZEND_HANDLE_FILENAME) {               
        
+                   primary_file->type != ZEND_HANDLE_FILENAME) {
                        int realfile_len;
                        int dummy = 1;
                        if (VCWD_REALPATH(primary_file->filename, realfile)) {
@@ -1848,7 +1868,7 @@
 #endif
                zend_set_timeout(INI_INT("max_execution_time"));
                retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);
-               
+
        } zend_end_try();
 
 #if HAVE_BROKEN_GETCWD
@@ -1876,7 +1896,7 @@
 #define OLD_CWD_SIZE 4096
        old_cwd = do_alloca(OLD_CWD_SIZE);
        old_cwd[0] = '\0';
-       
+
        zend_try {
 #ifdef PHP_WIN32
                UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
@@ -1890,7 +1910,7 @@
                }
                zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, ret, 1, 
primary_file);
        } zend_end_try();
-       
+
        if (old_cwd[0] != '\0') {
                VCWD_CHDIR(old_cwd);
        }
@@ -1944,7 +1964,7 @@
        } else {
                SG(request_info).auth_digest = NULL;
        }
-       
+
        if (ret == -1 && auth && auth[0] != '\0' && strncmp(auth, "Digest ", 7) 
== 0) {
                SG(request_info).auth_digest = estrdup(auth + 7);
                ret = 0;
http://cvs.php.net/viewcvs.cgi/php-src/main/php_globals.h?r1=1.105&r2=1.106&diff_format=u
Index: php-src/main/php_globals.h
diff -u php-src/main/php_globals.h:1.105 php-src/main/php_globals.h:1.106
--- php-src/main/php_globals.h:1.105    Thu Mar 16 11:32:00 2006
+++ php-src/main/php_globals.h  Thu Mar 16 16:53:09 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_globals.h,v 1.105 2006/03/16 11:32:00 dmitry Exp $ */
+/* $Id: php_globals.h,v 1.106 2006/03/16 16:53:09 dmitry Exp $ */
 
 #ifndef PHP_GLOBALS_H
 #define PHP_GLOBALS_H
@@ -55,7 +55,6 @@
        long output_buffering;
 
        zend_bool sql_safe_mode;
-       zend_bool enable_dl;
 
        char *output_handler;
 
http://cvs.php.net/viewcvs.cgi/php-src/main/php_main.h?r1=1.35&r2=1.36&diff_format=u
Index: php-src/main/php_main.h
diff -u php-src/main/php_main.h:1.35 php-src/main/php_main.h:1.36
--- php-src/main/php_main.h:1.35        Sun Jan  1 13:09:57 2006
+++ php-src/main/php_main.h     Thu Mar 16 16:53:09 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_main.h,v 1.35 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: php_main.h,v 1.36 2006/03/16 16:53:09 dmitry Exp $ */
 
 #ifndef PHP_MAIN_H
 #define PHP_MAIN_H
@@ -54,6 +54,10 @@
 /* environment module */
 extern int php_init_environ(void);
 extern int php_shutdown_environ(void);
+
+/* dl() support */
+PHPAPI int php_enable_dl(void);
+
 END_EXTERN_C()
 
 #endif
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.278&r2=1.279&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.278 php-src/sapi/cgi/cgi_main.c:1.279
--- php-src/sapi/cgi/cgi_main.c:1.278   Wed Mar  8 00:43:29 2006
+++ php-src/sapi/cgi/cgi_main.c Thu Mar 16 16:53:09 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.278 2006/03/08 00:43:29 pajoye Exp $ */
+/* $Id: cgi_main.c,v 1.279 2006/03/16 16:53:09 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -482,7 +482,8 @@
 
 static int php_cgi_startup(sapi_module_struct *sapi_module)
 {
-       if (php_module_startup(sapi_module, NULL, 0) == FAILURE) {
+       if (php_module_startup(sapi_module, NULL, 0) == FAILURE ||
+           php_enable_dl() == FAILURE) {
                return FAILURE;
        }
        return SUCCESS;
@@ -1018,7 +1019,8 @@
        cgi_sapi_module.executable_location = argv[0];
 
        /* startup after we get the above ini override se we get things right */
-       if (php_module_startup(&cgi_sapi_module, NULL, 0) == FAILURE) {
+       if (php_module_startup(&cgi_sapi_module, NULL, 0) == FAILURE ||
+           php_enable_dl() == FAILURE) {
 #ifdef ZTS
                tsrm_shutdown();
 #endif
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli.c?r1=1.147&r2=1.148&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.147 php-src/sapi/cli/php_cli.c:1.148
--- php-src/sapi/cli/php_cli.c:1.147    Tue Feb 21 21:14:36 2006
+++ php-src/sapi/cli/php_cli.c  Thu Mar 16 16:53:10 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.147 2006/02/21 21:14:36 johannes Exp $ */
+/* $Id: php_cli.c,v 1.148 2006/03/16 16:53:10 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -328,7 +328,8 @@
 
 static int php_cli_startup(sapi_module_struct *sapi_module)
 {
-       if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
+       if (php_module_startup(sapi_module, NULL, 0)==FAILURE ||
+           php_enable_dl()==FAILURE) {
                return FAILURE;
        }
        return SUCCESS;
@@ -681,7 +682,8 @@
 #endif
 
        /* startup after we get the above ini override se we get things right */
-       if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) {
+       if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE ||
+           php_enable_dl()==FAILURE) {
                /* there is no way to see if we must call zend_ini_deactivate()
                 * since we cannot check if EG(ini_directives) has been 
initialised
                 * because the executor's constructor does not set initialize 
it.
http://cvs.php.net/viewcvs.cgi/php-src/sapi/embed/php_embed.c?r1=1.12&r2=1.13&diff_format=u
Index: php-src/sapi/embed/php_embed.c
diff -u php-src/sapi/embed/php_embed.c:1.12 php-src/sapi/embed/php_embed.c:1.13
--- php-src/sapi/embed/php_embed.c:1.12 Sun Jan  1 13:09:58 2006
+++ php-src/sapi/embed/php_embed.c      Thu Mar 16 16:53:10 2006
@@ -15,7 +15,7 @@
    | Author: Edin Kadribasic <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 */
-/* $Id: php_embed.c,v 1.12 2006/01/01 13:09:58 sniper Exp $ */
+/* $Id: php_embed.c,v 1.13 2006/03/16 16:53:10 dmitry Exp $ */
 
 #include "php_embed.h"
 
@@ -93,7 +93,8 @@
 
 static int php_embed_startup(sapi_module_struct *sapi_module)
 {
-       if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
+       if (php_module_startup(sapi_module, NULL, 0)==FAILURE ||
+           php_enable_dl()==FAILURE) {
                return FAILURE;
        }
        return SUCCESS;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to