[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2005-05-21 Thread changelog
changelog   Sat May 21 20:33:30 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1989r2=1.1990ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.1989 php-src/ChangeLog:1.1990
--- php-src/ChangeLog:1.1989Fri May 20 20:33:59 2005
+++ php-src/ChangeLog   Sat May 21 20:33:30 2005
@@ -1,3 +1,56 @@
+2005-05-21  Rasmus Lerdorf  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  NEWS
+  ext/session/session.c:
+  Fixed bug #33072 - Add a safemode/open_basedir check for runtime 
save_path
+  change
+
+* (PHP_5_0)
+  NEWS
+  ext/session/session.c:
+  MFH Fixed bug 33072 - safemode/open_basedir check for runtime save_path
+  change
+
+* acinclude.m4:
+  Avoid syntax errors on some operating systems
+
+* (PHP_5_0)
+  main/main.c:
+  Ah, never mind.  Didn't notice a conflict on my last checkout.  Jani's 
MFH
+  was fine.
+
+* (PHP_5_0)
+  main/main.c:
+  Roll back Jani's blind MFH here.  zend_call_destructors() is PHP 5.1 
only.
+
+* ext/session/session.c:
+  Fixed bug 33072 - safemode/open_basedir check for runtime save_path 
change
+
+2005-05-21  Georg Richter  [EMAIL PROTECTED]
+
+* (PHP_5_0)
+  NEWS
+  ext/mysqli/mysqli_api.c
+  ext/mysqli/php_mysqli.h
+  ext/mysqli/tests/bug33090.phpt:
+  MFH:
+  - fix for bug #33090 (mysqli_prepare doesn't return an error)
+  - mysql_set_charset now works for MySQL = 5.0.6
+
+* ext/mysqli/tests/bug33090.phpt
+  ext/mysqli/tests/bug33090.phpt:
+  
+  enabled set_charset for MySQL Versions = 5.0.6
+  added testcase for bug #33090
+
+* ext/mysqli/php_mysqli.h:
+  enabled set_charset for MySQL Versions = 5.0.6
+  added testcase for bug #33090
+
+* ext/mysqli/mysqli_api.c:
+  fix for bug #33090 (mysql_prepare doesn't return error)
+
 2005-05-20  Grant Croker  [EMAIL PROTECTED]
 
 * (PHP_4_3)
@@ -2479,7 +2532,7 @@
 
 * (PHP_4_3)
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.1989 2005/05/21 00:33:59 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.1990 2005/05/22 00:33:30 changelog Exp $ tag
 
 * (PHP_5_0)
   ext/standard/url_scanner_ex.c:
@@ -5880,7 +5933,7 @@
   ext/session/mod_mm.h
   ext/session/mod_user.h
   ext/session/php_session.h:
-  - Missing $Id: ChangeLog,v 1.1989 2005/05/21 00:33:59 changelog Exp $ 
tags
+  - Missing $Id: ChangeLog,v 1.1990 2005/05/22 00:33:30 changelog Exp $ 
tags
 
 * (PHP_4_3)
   ext/session/session.c:
@@ -6361,7 +6414,7 @@
 
 * (PHP_4_3)
   Zend/zend_ini_scanner.l:
-  Missing $Id: ChangeLog,v 1.1989 2005/05/21 00:33:59 changelog Exp $ tag 
+ ws fix
+  Missing $Id: ChangeLog,v 1.1990 2005/05/22 00:33:30 changelog Exp $ tag 
+ ws fix
 
 * ZendEngine2/zend_ini_scanner.l
   ZendEngine2/zend_ini_scanner.l:
@@ -7835,7 +7888,7 @@
   ext/standard/url_scanner_ex.c
   ext/standard/url_scanner_ex.h
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.1989 2005/05/21 00:33:59 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.1990 2005/05/22 00:33:30 changelog Exp $ tag
 
 * ext/standard/credits_ext.h
   ext/standard/credits_sapi.h:


[PHP-CVS] cvs: php-src /ext/mysqli php_mysqli.h /ext/mysqli/tests bug33090.phpt

2005-05-21 Thread Georg Richter
georg   Sat May 21 04:46:47 2005 EDT

  Added files: 
/php-src/ext/mysqli/tests   bug33090.phpt 

  Modified files:  
/php-src/ext/mysqli php_mysqli.h 
  Log:
  enabled set_charset for MySQL Versions = 5.0.6
  added testcase for bug #33090
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/php_mysqli.h?r1=1.47r2=1.48ty=u
Index: php-src/ext/mysqli/php_mysqli.h
diff -u php-src/ext/mysqli/php_mysqli.h:1.47 
php-src/ext/mysqli/php_mysqli.h:1.48
--- php-src/ext/mysqli/php_mysqli.h:1.47Fri May 13 09:30:22 2005
+++ php-src/ext/mysqli/php_mysqli.h Sat May 21 04:46:45 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: php_mysqli.h,v 1.47 2005/05/13 13:30:22 georg Exp $ 
+  $Id: php_mysqli.h,v 1.48 2005/05/21 08:46:45 georg Exp $ 
 */
 
 /* A little hack to prevent build break, when mysql is used together with
@@ -103,7 +103,7 @@
 #define PHP_MYSQLI_API
 #endif
 
-#if MYSQL_VERSION_ID  40112  MYSQL_VERSION_ID  5
+#if (MYSQL_VERSION_ID  40112  MYSQL_VERSION_ID  5) || MYSQL_VERSION_ID 
 50005
 #define HAVE_MYSQLI_SET_CHARSET
 #endif
 

http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug33090.phpt?r=1.1p=1
Index: php-src/ext/mysqli/tests/bug33090.phpt
+++ php-src/ext/mysqli/tests/bug33090.phpt
--TEST--
Bug #33090
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php
include (connect.inc);

/*** test mysqli_connect 127.0.0.1 ***/
$link = mysqli_connect($host, $user, $passwd);
mysqli_select_db($link, test);

if (!($link-prepare(this makes no sense))) {
printf(%d\n, $link-errno);
printf(%s\n, $link-sqlstate);
}   
$link-close();
?
--EXPECT--
1064
42000

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/mysqli mysqli_api.c php_mysqli.h /ext/mysqli/tests bug33090.phpt

2005-05-21 Thread Georg Richter
georg   Sat May 21 04:54:57 2005 EDT

  Added files: (Branch: PHP_5_0)
/php-src/ext/mysqli/tests   bug33090.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/mysqli php_mysqli.h mysqli_api.c 
  Log:
  MFH:
  - fix for bug #33090 (mysqli_prepare doesn't return an error)
  - mysql_set_charset now works for MySQL = 5.0.6
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.391r2=1.1760.2.392ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.391 php-src/NEWS:1.1760.2.392
--- php-src/NEWS:1.1760.2.391   Fri May 20 10:24:16 2005
+++ php-src/NEWSSat May 21 04:54:50 2005
@@ -11,6 +11,7 @@
 - Fixed ext/mysqli to allocate less memory when fetching bound params
   of type (MEDIUM|LONG)BLOB/(MEDIUM|LONG)TEXT. (Andrey)
 - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey)
+- Fixed bug #33090 (mysqli_prepare doesn't return an error). (Georg)
 - Fixed bug #33076 (str_ireplace() incorrectly counts result string length 
   and may cause segfault). (Tony)
 - Fixed bug #33059 (crash when moving xml attribute set in dtd). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/mysqli/php_mysqli.h?r1=1.38.2.5r2=1.38.2.6ty=u
Index: php-src/ext/mysqli/php_mysqli.h
diff -u php-src/ext/mysqli/php_mysqli.h:1.38.2.5 
php-src/ext/mysqli/php_mysqli.h:1.38.2.6
--- php-src/ext/mysqli/php_mysqli.h:1.38.2.5Fri May 13 09:53:08 2005
+++ php-src/ext/mysqli/php_mysqli.h Sat May 21 04:54:56 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: php_mysqli.h,v 1.38.2.5 2005/05/13 13:53:08 georg Exp $ 
+  $Id: php_mysqli.h,v 1.38.2.6 2005/05/21 08:54:56 georg Exp $ 
 */
 
 /* A little hack to prevent build break, when mysql is used together with
@@ -95,7 +95,7 @@
 #define PHP_MYSQLI_API
 #endif
 
-#if MYSQL_VERSION_ID  40112  MYSQL_VERSION_ID  5
+#if (MYSQL_VERSION_ID  40112  MYSQL_VERSION_ID  5) || MYSQL_VERSION_ID 
 50005
 #define HAVE_MYSQLI_SET_CHARSET
 #endif
 
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.87.2.19r2=1.87.2.20ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.87.2.19 
php-src/ext/mysqli/mysqli_api.c:1.87.2.20
--- php-src/ext/mysqli/mysqli_api.c:1.87.2.19   Mon May  9 18:31:52 2005
+++ php-src/ext/mysqli/mysqli_api.c Sat May 21 04:54:56 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.87.2.19 2005/05/09 22:31:52 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.87.2.20 2005/05/21 08:54:56 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1074,7 +1074,7 @@
 }
 /* }}} */
 
-/* {{{ proto mysqli_set_local_infile_default(object link)
+/* {{{ proto void mysqli_set_local_infile_default(object link)
unsets user defined handler for load local infile command */
 PHP_FUNCTION(mysqli_set_local_infile_default)
 {
@@ -1279,14 +1279,22 @@
 
if ((stmt-stmt = mysql_stmt_init(mysql-mysql))) {
if (mysql_stmt_prepare(stmt-stmt, query, query_len)) {
-   if (stmt-stmt-last_errno) {
-   /* if we close the statement handle, we have to 
copy the errors to connection handle */
-   mysql-mysql-net.last_errno = 
stmt-stmt-last_errno;
-   strcpy(mysql-mysql-net.last_error, 
stmt-stmt-last_error);
-   strcpy(mysql-mysql-net.sqlstate, 
stmt-stmt-sqlstate);
-   }
+   char  last_error[MYSQL_ERRMSG_SIZE];
+   char  sqlstate[SQLSTATE_LENGTH+1];  
+   unsigned int last_errno;
+
+   /* mysql_stmt_close clears errors, so we have to store 
them temporarily */
+   last_errno = stmt-stmt-last_errno;
+   memcpy(last_error, stmt-stmt-last_error, 
MYSQL_ERRMSG_SIZE);
+   memcpy(sqlstate, mysql-mysql-net.sqlstate, 
SQLSTATE_LENGTH+1);
+
mysql_stmt_close(stmt-stmt);
stmt-stmt = NULL;
+
+   /* restore error messages */
+   mysql-mysql-net.last_errno = last_errno;
+   memcpy(mysql-mysql-net.last_error, last_error, 
MYSQL_ERRMSG_SIZE);
+   memcpy(mysql-mysql-net.sqlstate, sqlstate, 
SQLSTATE_LENGTH+1);
}
} 


http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug33090.phpt?r=1.1p=1
Index: php-src/ext/mysqli/tests/bug33090.phpt
+++ php-src/ext/mysqli/tests/bug33090.phpt
--TEST--
Bug #33090
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php
include (connect.inc);

/*** test mysqli_connect 127.0.0.1 ***/
$link = mysqli_connect($host, $user, 

[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c

2005-05-21 Thread Georg Richter
georg   Sat May 21 04:38:56 2005 EDT

  Modified files:  
/php-src/ext/mysqli mysqli_api.c 
  Log:
  fix for bug #33090 (mysql_prepare doesn't return error)
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.115r2=1.116ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.115 
php-src/ext/mysqli/mysqli_api.c:1.116
--- php-src/ext/mysqli/mysqli_api.c:1.115   Mon May  9 18:29:54 2005
+++ php-src/ext/mysqli/mysqli_api.c Sat May 21 04:38:53 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.115 2005/05/09 22:29:54 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.116 2005/05/21 08:38:53 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1278,14 +1278,22 @@
 
if ((stmt-stmt = mysql_stmt_init(mysql-mysql))) {
if (mysql_stmt_prepare(stmt-stmt, query, query_len)) {
-   if (stmt-stmt-last_errno) {
-   /* if we close the statement handle, we have to 
copy the errors to connection handle */
-   mysql-mysql-net.last_errno = 
stmt-stmt-last_errno;
-   strcpy(mysql-mysql-net.last_error, 
stmt-stmt-last_error);
-   strcpy(mysql-mysql-net.sqlstate, 
stmt-stmt-sqlstate);
-   }
+   char  last_error[MYSQL_ERRMSG_SIZE];
+   char  sqlstate[SQLSTATE_LENGTH+1];  
+   unsigned int last_errno;
+
+   /* mysql_stmt_close clears errors, so we have to store 
them temporarily */
+   last_errno = stmt-stmt-last_errno;
+   memcpy(last_error, stmt-stmt-last_error, 
MYSQL_ERRMSG_SIZE);
+   memcpy(sqlstate, mysql-mysql-net.sqlstate, 
SQLSTATE_LENGTH+1);
+
mysql_stmt_close(stmt-stmt);
stmt-stmt = NULL;
+
+   /* restore error messages */
+   mysql-mysql-net.last_errno = last_errno;
+   memcpy(mysql-mysql-net.last_error, last_error, 
MYSQL_ERRMSG_SIZE);
+   memcpy(mysql-mysql-net.sqlstate, sqlstate, 
SQLSTATE_LENGTH+1);
}
} 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /main main.c

2005-05-21 Thread Rasmus Lerdorf
rasmus  Sat May 21 14:26:27 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/main   main.c 
  Log:
  Ah, never mind.  Didn't notice a conflict on my last checkout.  Jani's MFH
  was fine.
  
  
http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.604.2.16r2=1.604.2.17ty=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.604.2.16 php-src/main/main.c:1.604.2.17
--- php-src/main/main.c:1.604.2.16  Sat May 21 14:11:17 2005
+++ php-src/main/main.c Sat May 21 14:26:27 2005
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.604.2.16 2005/05/21 18:11:17 rasmus Exp $ */
+/* $Id: main.c,v 1.604.2.17 2005/05/21 18:26:27 rasmus Exp $ */
 
 /* {{{ includes
  */
@@ -1197,6 +1197,10 @@
sapi_send_headers(TSRMLS_C);
} zend_end_try();
 
+   zend_try {
+   zend_call_destructors(TSRMLS_C);
+   } zend_end_try();
+
if (PG(modules_activated)) zend_try {
php_call_shutdown_functions(TSRMLS_C);
} zend_end_try();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / acinclude.m4

2005-05-21 Thread Rasmus Lerdorf
rasmus  Sat May 21 14:42:40 2005 EDT

  Modified files:  
/php-srcacinclude.m4 
  Log:
  Avoid syntax errors on some operating systems
  
  
http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.306r2=1.307ty=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.306 php-src/acinclude.m4:1.307
--- php-src/acinclude.m4:1.306  Fri May  6 22:51:50 2005
+++ php-src/acinclude.m4Sat May 21 14:42:39 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.306 2005/05/07 02:51:50 sniper Exp $
+dnl $Id: acinclude.m4,v 1.307 2005/05/21 18:42:39 rasmus Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2363,7 +2363,7 @@
 done 
   else
 header_path=$1
-for header_file in $2; do
+for header_file in $2; do
   hp_hf=$header_path/$header_file
   PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
 INSTALL_EXT_HEADERS=$INSTALL_EXT_HEADERS $hp_hf

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/session session.c

2005-05-21 Thread Rasmus Lerdorf
rasmus  Sat May 21 14:54:58 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
/php-src/ext/sessionsession.c 
  Log:
  MFH Fixed bug 33072 - safemode/open_basedir check for runtime save_path
  change
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.392r2=1.1760.2.393ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.392 php-src/NEWS:1.1760.2.393
--- php-src/NEWS:1.1760.2.392   Sat May 21 04:54:50 2005
+++ php-src/NEWSSat May 21 14:54:57 2005
@@ -14,6 +14,8 @@
 - Fixed bug #33090 (mysqli_prepare doesn't return an error). (Georg)
 - Fixed bug #33076 (str_ireplace() incorrectly counts result string length 
   and may cause segfault). (Tony)
+- Fixed bug #33072 (Add a safemode/open_basedir check for runtime save_path 
+  change) (Rasmus)
 - Fixed bug #33059 (crash when moving xml attribute set in dtd). (Ilia)
 - Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
   RFC 2616 section 10.3.5) (Rasmus, Choitel)
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.391.2.12r2=1.391.2.13ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.391.2.12 
php-src/ext/session/session.c:1.391.2.13
--- php-src/ext/session/session.c:1.391.2.12Fri May 20 06:28:16 2005
+++ php-src/ext/session/session.c   Sat May 21 14:54:57 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.391.2.12 2005/05/20 10:28:16 tony2001 Exp $ */
+/* $Id: session.c,v 1.391.2.13 2005/05/21 18:54:57 rasmus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -131,13 +131,26 @@
return SUCCESS;
 }
 
+static PHP_INI_MH(OnUpdateSaveDir) {
+   /* Only do the safemode/open_basedir check at runtime */
+   if(stage == PHP_INI_STAGE_RUNTIME) {
+   if (PG(safe_mode)  (!php_checkuid(new_value, NULL, 
CHECKUID_ALLOW_ONLY_DIR))) {
+   return FAILURE;
+   }
+
+   if (php_check_open_basedir(new_value TSRMLS_CC)) {
+   return FAILURE;
+   }
+   }
+   OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, 
mh_arg3, stage TSRMLS_CC);
+}
 
 /* {{{ PHP_INI
  */
 PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN(session.bug_compat_42,1, 
PHP_INI_ALL, OnUpdateBool,   bug_compat, php_ps_globals,ps_globals)
STD_PHP_INI_BOOLEAN(session.bug_compat_warn,  1, 
PHP_INI_ALL, OnUpdateBool,   bug_compat_warn,php_ps_globals,ps_globals)
-   STD_PHP_INI_ENTRY(session.save_path,  ,  
PHP_INI_ALL, OnUpdateString, save_path,  php_ps_globals,ps_globals)
+   STD_PHP_INI_ENTRY(session.save_path,  ,  
PHP_INI_ALL, OnUpdateSaveDir,save_path,  php_ps_globals,ps_globals)
STD_PHP_INI_ENTRY(session.name,   PHPSESSID, 
PHP_INI_ALL, OnUpdateString, session_name,   php_ps_globals,ps_globals)
PHP_INI_ENTRY(session.save_handler,   files, 
PHP_INI_ALL, OnUpdateSaveHandler)
STD_PHP_INI_BOOLEAN(session.auto_start,   0, 
PHP_INI_ALL, OnUpdateBool,   auto_start, php_ps_globals,ps_globals)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c

2005-05-21 Thread Rasmus Lerdorf
rasmus  Sat May 21 15:46:35 2005 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/sessionsession.c 
  Log:
  Fixed bug #33072 - Add a safemode/open_basedir check for runtime save_path 
  change
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.908r2=1.1247.2.909ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.908 php-src/NEWS:1.1247.2.909
--- php-src/NEWS:1.1247.2.908   Fri May 20 07:15:33 2005
+++ php-src/NEWSSat May 21 15:46:32 2005
@@ -7,6 +7,8 @@
   them sort based on the current locale. (Derick)
 - Changed sha1_file() and md5_file() functions to use streams instead of 
   low level IO. (Uwe)
+- Fixed bug #33072 (Add a safemode/open_basedir check for runtime save_path 
+  change) (Rasmus)
 - Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
   RFC 2616 section 10.3.5) (Rasmus, Choitel)
 - Fixed bug #33019 (socket errors cause memory leaks in php_strerror()). 
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.51r2=1.336.2.52ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.51 
php-src/ext/session/session.c:1.336.2.52
--- php-src/ext/session/session.c:1.336.2.51Fri May 20 06:28:35 2005
+++ php-src/ext/session/session.c   Sat May 21 15:46:34 2005
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.51 2005/05/20 10:28:35 tony2001 Exp $ */
+/* $Id: session.c,v 1.336.2.52 2005/05/21 19:46:34 rasmus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -117,6 +117,19 @@
return SUCCESS;
 }
 
+static PHP_INI_MH(OnUpdateSaveDir) {
+   /* Only do the safemode/open_basedir check at runtime */
+   if(stage == PHP_INI_STAGE_RUNTIME) {
+   if (PG(safe_mode)  (!php_checkuid(new_value, NULL, 
CHECKUID_ALLOW_ONLY_DIR))) {
+   return FAILURE;
+   }
+
+   if (php_check_open_basedir(new_value TSRMLS_CC)) {
+   return FAILURE;
+   }
+   }
+   OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, 
mh_arg3, stage TSRMLS_CC);
+}
 
 /* {{{ PHP_INI
  */
@@ -124,9 +137,9 @@
STD_PHP_INI_BOOLEAN(session.bug_compat_42,1, 
PHP_INI_ALL, OnUpdateBool,   bug_compat, php_ps_globals,ps_globals)
STD_PHP_INI_BOOLEAN(session.bug_compat_warn,  1, 
PHP_INI_ALL, OnUpdateBool,   bug_compat_warn,php_ps_globals,ps_globals)
 #ifdef PHP_WIN32
-   STD_PHP_INI_ENTRY(session.save_path,  ,  PHP_INI_ALL, 
OnUpdateString, save_path,  php_ps_globals,ps_globals)
+   STD_PHP_INI_ENTRY(session.save_path,  ,  
PHP_INI_ALL, OnUpdateSaveDir,save_path,  php_ps_globals,ps_globals)
 #else
-   STD_PHP_INI_ENTRY(session.save_path,  /tmp,  
PHP_INI_ALL, OnUpdateString, save_path,  php_ps_globals,ps_globals)
+   STD_PHP_INI_ENTRY(session.save_path,  /tmp,  
PHP_INI_ALL, OnUpdateSaveDir,save_path,  php_ps_globals,ps_globals)
 #endif
STD_PHP_INI_ENTRY(session.name,   PHPSESSID, 
PHP_INI_ALL, OnUpdateString, session_name,   php_ps_globals,ps_globals)
PHP_INI_ENTRY(session.save_handler,   files, 
PHP_INI_ALL, OnUpdateSaveHandler)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php