summaryrefslogtreecommitdiff
path: root/sapi/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cgi')
-rw-r--r--sapi/cgi/cgi_main.c2
-rw-r--r--sapi/cgi/fastcgi.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f06787543e..2d67321773 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2280,7 +2280,7 @@ consult the installation file that came with this distribution, or visit \n\
/* all remaining arguments are part of the query string
* this section of code concatenates all remaining arguments
- * into a single string, seperating args with a &
+ * into a single string, separating args with a &
* this allows command lines like:
*
* test.php v1=test v2=hello+world!
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 0cd3096e4d..7925f87562 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -435,7 +435,11 @@ int fcgi_init(void)
str = getenv("_FCGI_SHUTDOWN_EVENT_");
if (str != NULL) {
- HANDLE shutdown_event = (HANDLE) atoi(str);
+ zend_long ev;
+ HANDLE shutdown_event;
+
+ ZEND_ATOL(ev, str);
+ shutdown_event = (HANDLE) ev;
if (!CreateThread(NULL, 0, fcgi_shutdown_thread,
shutdown_event, 0, NULL)) {
return -1;
@@ -443,7 +447,9 @@ int fcgi_init(void)
}
str = getenv("_FCGI_MUTEX_");
if (str != NULL) {
- fcgi_accept_mutex = (HANDLE) atoi(str);
+ zend_long mt;
+ ZEND_ATOL(mt, str);
+ fcgi_accept_mutex = (HANDLE) mt;
}
return is_fastcgi = 1;
} else {