From: Andi Gutmans Date: Sat, 27 May 2000 16:38:49 +0000 (+0000) Subject: - Fix problem in sessions module under Win32. Need to use ; as an options X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c82566b48fc4ca837d83e1980f5cb681bb435ce;p=php - Fix problem in sessions module under Win32. Need to use ; as an options - delimiter in save_path instead of :. --- diff --git a/NEWS b/NEWS index 1a541675bc..0fb582bc6b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2000, Version 4.0.1 +- Fixed sessions on Win32. When setting the directory depth parameter in + save_path you need to now delimit it with a ';' instead of ':', e.g + "5;/tmp" instead of "5:/tmp" (Andi) - Changed the Apache handler's return status to 'Declined' when a requested PHP file could not be found. Returning 'Not Found' caused problems in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 32f511d18a..dc6d9081cd 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -199,7 +199,7 @@ PS_OPEN_FUNC(files) PS_SET_MOD_DATA(data); data->fd = -1; - if ((p = strchr(save_path, ':'))) { + if ((p = strchr(save_path, ';'))) { data->dirdepth = strtol(save_path, NULL, 10); save_path = p + 1; } diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 31760126a5..4ae7b2f77d 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -1015,7 +1015,7 @@ PHPAPI char *expand_filepath(char *filepath) if (filepath[1] == '.') { /* parent directory - .. */ /* erase the last directory name from the path */ -#if PHP_WIN32 +#ifdef PHP_WIN32 while (*cwd_end != '/' || *cwd_end != '\\') { #else while (*cwd_end != '/') { @@ -1024,7 +1024,7 @@ PHPAPI char *expand_filepath(char *filepath) } filepath++; /* make filepath appear as a current directory path */ } -#if PHP_WIN32 +#ifdef PHP_WIN32 if (cwd_end > cwd && (*cwd_end == '/' || *cwd_end == '\\')) { /* remove trailing slashes */ #else if (cwd_end > cwd && *cwd_end == '/') { /* remove trailing slashes */ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b1a1df722f..9230f736f1 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -86,7 +86,7 @@ extern int ap_php_optind; static int sapi_cgibin_ub_write(const char *str, uint str_length) { - int ret; + size_t ret; ret = fwrite(str, 1, str_length, stdout); if (ret != str_length) {