1234567891011121314151617181920212223242526 |
- $OpenBSD: patch-sapi_cgi_cgi_main_c,v 1.6 2016/12/19 20:35:09 martijn Exp $
- --- sapi/cgi/cgi_main.c.orig.port Wed Nov 9 02:22:57 2016
- +++ sapi/cgi/cgi_main.c Thu Dec 8 10:55:27 2016
- @@ -1749,6 +1749,7 @@ int main(int argc, char *argv[])
- char *orig_optarg = php_optarg;
- char *script_file = NULL;
- int ini_entries_len = 0;
- + char *ini;
- /* end of temporary locals */
-
- #ifdef ZTS
- @@ -1809,7 +1810,12 @@ int main(int argc, char *argv[])
-
- sapi_startup(&cgi_sapi_module);
- fastcgi = fcgi_is_fastcgi();
- - cgi_sapi_module.php_ini_path_override = NULL;
- +
- + if ((ini = getenv("PHP_INI_PATH"))) {
- + cgi_sapi_module.php_ini_path_override = ini;
- + } else {
- + cgi_sapi_module.php_ini_path_override = NULL;
- + }
-
- #ifdef PHP_WIN32
- _fmode = _O_BINARY; /* sets default for file streams to binary */
|