summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorMatt Wilmas <mattwil@php.net>2008-12-07 10:55:16 +0000
committerMatt Wilmas <mattwil@php.net>2008-12-07 10:55:16 +0000
commita31c7ebdff02984990f157e465ead51fff26248b (patch)
treef1f457eac63e50166690628dd2c719ae20329370 /sapi
parente5e17578bf76419d17b59f784aff93d247072ef6 (diff)
downloadphp-git-a31c7ebdff02984990f157e465ead51fff26248b.tar.gz
MFH: Fixed bug #46782 (fastcgi.c parse error)
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cgi/fastcgi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 03921995f7..5b0f736045 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -183,8 +183,14 @@ int fcgi_in_shutdown(void)
int fcgi_init(void)
{
if (!is_initialized) {
+#ifndef _WIN32
+ sa_t sa;
+ socklen_t len = sizeof(sa);
+#endif
zend_hash_init(&fcgi_mgmt_vars, 0, NULL, fcgi_free_mgmt_var_cb, 1);
fcgi_set_mgmt_var("FCGI_MPXS_CONNS", sizeof("FCGI_MPXS_CONNS")-1, "0", sizeof("0")-1);
+
+ is_initialized = 1;
#ifdef _WIN32
# if 0
/* TODO: Support for TCP sockets */
@@ -195,8 +201,6 @@ int fcgi_init(void)
return 0;
}
# endif
- is_initialized = 1;
-
if ((GetStdHandle(STD_OUTPUT_HANDLE) == INVALID_HANDLE_VALUE) &&
(GetStdHandle(STD_ERROR_HANDLE) == INVALID_HANDLE_VALUE) &&
(GetStdHandle(STD_INPUT_HANDLE) != INVALID_HANDLE_VALUE)) {
@@ -223,10 +227,6 @@ int fcgi_init(void)
return is_fastcgi = 0;
}
#else
- sa_t sa;
- socklen_t len = sizeof(sa);
-
- is_initialized = 1;
errno = 0;
if (getpeername(0, (struct sockaddr *)&sa, &len) != 0 && errno == ENOTCONN) {
fcgi_setup_signals();