summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/session/mod_files.c2
-rw-r--r--main/fopen_wrappers.c4
-rw-r--r--sapi/cgi/cgi_main.c2
4 files changed, 7 insertions, 4 deletions
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) {