diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-02-17 12:10:08 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-02-17 12:10:08 +0100 |
| commit | f89bb30da3cd51ee2deb566a08e318d6c3995324 (patch) | |
| tree | b402687176685db240a0043af98b91f8f8b3737f /sapi/cgi | |
| parent | 5292df2401c781de56fd04835c18e11162152626 (diff) | |
| download | php-f89bb30da3cd51ee2deb566a08e318d6c3995324.tar.gz | |
Imported Upstream version 5.4.0~rc8upstream/5.4.0_rc8
Diffstat (limited to 'sapi/cgi')
| -rw-r--r-- | sapi/cgi/cgi_main.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 8b4fc1f69..defb21ca3 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c 321634 2012-01-01 13:15:04Z felipe $ */ +/* $Id: cgi_main.c 323212 2012-02-14 13:31:23Z dmitry $ */ #include "php.h" #include "php_globals.h" @@ -1860,6 +1860,15 @@ int main(int argc, char *argv[]) php_optind = orig_optind; php_optarg = orig_optarg; + if (fastcgi || bindpath) { + /* Override SAPI callbacks */ + cgi_sapi_module.ub_write = sapi_fcgi_ub_write; + cgi_sapi_module.flush = sapi_fcgi_flush; + cgi_sapi_module.read_post = sapi_fcgi_read_post; + cgi_sapi_module.getenv = sapi_fcgi_getenv; + cgi_sapi_module.read_cookies = sapi_fcgi_read_cookies; + } + #ifdef ZTS SG(request_info).path_translated = NULL; #endif @@ -1929,13 +1938,6 @@ consult the installation file that came with this distribution, or visit \n\ fastcgi = fcgi_is_fastcgi(); } if (fastcgi) { - /* Override SAPI callbacks */ - sapi_module.ub_write = sapi_fcgi_ub_write; - sapi_module.flush = sapi_fcgi_flush; - sapi_module.read_post = sapi_fcgi_read_post; - sapi_module.getenv = sapi_fcgi_getenv; - sapi_module.read_cookies = sapi_fcgi_read_cookies; - /* How many times to run PHP scripts before dying */ if (getenv("PHP_FCGI_MAX_REQUESTS")) { max_requests = atoi(getenv("PHP_FCGI_MAX_REQUESTS")); |
