@@ -516,7 +516,21 @@ static void cgi_php_load_env_var(const char *var, unsigned int var_len, char *va
516
516
}
517
517
/* }}} */
518
518
519
- void cgi_php_import_environment_variables (zval * array_ptr ) /* {{{ */
519
+ static void cgi_php_load_env_var_unfilterd (const char * var , unsigned int var_len , char * val , unsigned int val_len , void * arg )
520
+ {
521
+ zval * array_ptr = (zval * ) arg ;
522
+ php_register_variable_safe (var , val , val_len , array_ptr );
523
+ }
524
+
525
+ static void cgi_php_load_environment_variables (zval * array_ptr )
526
+ {
527
+ php_php_import_environment_variables (array_ptr );
528
+
529
+ fcgi_request * request = (fcgi_request * ) SG (server_context );
530
+ fcgi_loadenv (request , cgi_php_load_env_var_unfilterd , array_ptr );
531
+ }
532
+
533
+ static void cgi_php_import_environment_variables (zval * array_ptr )
520
534
{
521
535
fcgi_request * request = NULL ;
522
536
@@ -542,7 +556,6 @@ void cgi_php_import_environment_variables(zval *array_ptr) /* {{{ */
542
556
request = (fcgi_request * ) SG (server_context );
543
557
fcgi_loadenv (request , cgi_php_load_env_var , array_ptr );
544
558
}
545
- /* }}} */
546
559
547
560
static void sapi_cgi_register_variables (zval * track_vars_array ) /* {{{ */
548
561
{
@@ -1840,6 +1853,7 @@ consult the installation file that came with this distribution, or visit \n\
1840
1853
/* make php call us to get _ENV vars */
1841
1854
php_php_import_environment_variables = php_import_environment_variables ;
1842
1855
php_import_environment_variables = cgi_php_import_environment_variables ;
1856
+ php_load_environment_variables = cgi_php_load_environment_variables ;
1843
1857
1844
1858
/* library is already initialized, now init our request */
1845
1859
request = fpm_init_request (fcgi_fd );
0 commit comments