mirror of
https://github.com/php/php-src.git
synced 2026-04-11 18:13:00 +02:00
Move some initialization code from php_execute_script() to
php_request_startup() where it should be. AFAICT, it does not cause any problems, but please it test it with your favorite SAPI module.
This commit is contained in:
@@ -595,6 +595,7 @@ static void sigchld_handler(int apar)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int php_hash_environment(ELS_D SLS_DC PLS_DC);
|
||||
|
||||
int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
|
||||
{
|
||||
@@ -631,6 +632,10 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
|
||||
/* We turn this off in php_execute_script() */
|
||||
/* PG(during_request_startup) = 0; */
|
||||
|
||||
php_hash_environment(ELS_C SLS_CC PLS_CC);
|
||||
zend_activate_modules();
|
||||
PG(modules_activated)=1;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1135,10 +1140,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
|
||||
char *old_cwd;
|
||||
SLS_FETCH();
|
||||
|
||||
php_hash_environment(ELS_C SLS_CC PLS_CC);
|
||||
|
||||
zend_activate_modules();
|
||||
PG(modules_activated)=1;
|
||||
|
||||
if (SG(request_info).query_string && SG(request_info).query_string[0]=='='
|
||||
&& PG(expose_php)) {
|
||||
|
||||
Reference in New Issue
Block a user