]> granicus.if.org Git - php/commitdiff
- Fix problem in sessions module under Win32. Need to use ; as an options
authorAndi Gutmans <andi@php.net>
Sat, 27 May 2000 16:38:49 +0000 (16:38 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 27 May 2000 16:38:49 +0000 (16:38 +0000)
- delimiter in save_path instead of :.

NEWS
ext/session/mod_files.c
main/fopen_wrappers.c
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index 1a541675bcb410912df04f98208cff6deea07765..0fb582bc6b193ebd659d8ff2b2aa2bda8302f71a 100644 (file)
--- 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
index 32f511d18a2cdf06169d4036d348afb5fe606097..dc6d9081cdc8734989cae0bc0108b96be58d2c65 100644 (file)
@@ -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;
        }
index 31760126a5b96b6ae0009ceb43ca7e64c9ad91db..4ae7b2f77d37c853d81855a6db511a7271559572 100644 (file)
@@ -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 */
index b1a1df722f40d1fb3ae2a93eec90995116989e3e..9230f736f1ef0829d715b32437dbf53ad6b2a9d6 100644 (file)
@@ -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) {