Re: patch making disable_functions actually work on php_function not just zend functions

From: Date: Thu, 13 Jul 2000 16:28:31 +0000
Subject: Re: patch making disable_functions actually work on php_function not just zend functions
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-24468@lists.php.net to get a copy of this message
Eh, that's not a bug fix. That's exactly what's in CVS right now. On Thu, 13 Jul 2000, Mathieu Kooiman (ggInternet) wrote: > > Result from: > [root@eleo main]# diff -u main.c ../../php4-200007120145/main/main.c > bug_fix.diff > > > I hope its any good:) > > Mathieu > > On Thu, 13 Jul 2000, Andrei Zmievski wrote: > > > On Thu, 13 Jul 2000, Mathieu Kooiman (ggInternet) wrote: > > > Dah, in what form :-) > > > > diff -u will do just fine. > > > > -Andrei > > * All of the above is my opinion, unless specified otherwise. * > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > > For additional commands, e-mail: php-dev-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > --- main.c Thu Jul 13 18:23:23 2000 > +++ ../../php4-200007120145/main/main.c Sun Jul 9 15:45:23 2000 > @@ -103,7 +103,6 @@ > /* True globals (no need for thread safety) */ > HashTable configuration_hash; > PHPAPI char *php_ini_path = NULL; > -static int module_initialized = 0; > > > #define SAFE_FILENAME(f) ((f)?(f):"-") > @@ -152,14 +151,6 @@ > * it's not a big deal as it's process-wide > */ > > - if (module_initialized==0) { > - if (php_startup_internal_extensions() == FAILURE) { > - php_printf("Unable to start builtin modules\n"); > - return FAILURE; > - } > - module_initialized = 1; > - } > - > func = strtok(new_value_dup, ", "); > while (func) { > zend_disable_function(func, strlen(func)); > @@ -272,6 +263,7 @@ > > > /* True global (no need for thread safety */ > +static int module_initialized = 0; > > void php_log_err(char *log_message) > { > @@ -807,6 +799,10 @@ > sapi_initialize_empty_request(SLS_C); > sapi_activate(SLS_C); > > + if (module_initialized) { > + return SUCCESS; > + } > + > sapi_module = *sf; > > php_output_startup(); > @@ -876,13 +872,11 @@ > return FAILURE; > } > > - if (module_initialized==0) { > - if (php_startup_internal_extensions() == FAILURE) { > - php_printf("Unable to start builtin modules\n"); > - return FAILURE; > - } > - module_initialized = 1; > + if (php_startup_internal_extensions() == FAILURE) { > + php_printf("Unable to start builtin modules\n"); > + return FAILURE; > } > + module_initialized = 1; > sapi_deactivate(SLS_C); > return SUCCESS; > } -Andrei * I don't have a solution but I admire the problem. *

« previous php.dev (#24468) next »