diff --git a/main/php_variables.c b/main/php_variables.c index 6f6bd6e2066..73e19a856a0 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -28,6 +28,9 @@ #include "zend_globals.h" +/* for systems that need to override reading of environment variables */ +void _php_import_environment_variables(zval *array_ptr TSRMLS_DC); +PHPAPI void (*php_import_environment_variables)(zval *array_ptr TSRMLS_DC) = _php_import_environment_variables; PHPAPI void php_register_variable(char *var, char *strval, zval *track_vars_array TSRMLS_DC) { @@ -318,8 +321,7 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) } } - -void php_import_environment_variables(zval *array_ptr TSRMLS_DC) +void _php_import_environment_variables(zval *array_ptr TSRMLS_DC) { char **env, *p, *t; diff --git a/main/php_variables.h b/main/php_variables.h index 8321c57d1cd..38d3d3ec440 100644 --- a/main/php_variables.h +++ b/main/php_variables.h @@ -31,7 +31,7 @@ #define PARSE_STRING 3 void php_treat_data(int arg, char *str, zval* destArray TSRMLS_DC); -PHPAPI void php_import_environment_variables(zval *array_ptr TSRMLS_DC); +extern PHPAPI void (*php_import_environment_variables)(zval *array_ptr TSRMLS_DC); PHPAPI void php_register_variable(char *var, char *val, pval *track_vars_array TSRMLS_DC); /* binary-safe version */ PHPAPI void php_register_variable_safe(char *var, char *val, int val_len, pval *track_vars_array TSRMLS_DC);