[PHP-CVS] cvs: php-src / NEWS

2003-12-16 Thread Jani Taskinen
sniper  Tue Dec 16 03:06:10 2003 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  BFN
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1537 php-src/NEWS:1.1538
--- php-src/NEWS:1.1537 Sun Dec 14 19:43:28 2003
+++ php-src/NEWSTue Dec 16 03:06:09 2003
@@ -38,6 +38,7 @@
 - Fixed bug #26534 (stream_get_meta_data() - Access Violation). (Wez)
 - Fixed bug #26528 (HTML entities are not being decoded by 
   xml_parse()/xml_parse_into_struct()). (Ilia)
+- Fixed bug #26182 (Object properties created redundantly). (Andi)
 - Fixed bug #26156 (REPLACE_ZVAL_VALUE works on uninit stack-based zvals).
   (Moriyoshi)
 - Fixed bug #26083 (Non-working write support in ext/dom). (Ilia)

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



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

2003-12-16 Thread Georg Richter
georg   Tue Dec 16 03:18:32 2003 EDT

  Modified files:  
/php-src/ext/mysqli mysqli_api.c mysqli_fe.c mysqli_prop.c 
  Log:
  added properties
- insert_id
- server_status
  fixed bug in mysqli_execute (report func)
  
  
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.54 php-src/ext/mysqli/mysqli_api.c:1.55
--- php-src/ext/mysqli/mysqli_api.c:1.54Sat Dec 13 11:08:13 2003
+++ php-src/ext/mysqli/mysqli_api.c Tue Dec 16 03:18:31 2003
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.54 2003/12/13 16:08:13 georg Exp $ 
+  $Id: mysqli_api.c,v 1.55 2003/12/16 08:18:31 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -620,6 +620,10 @@
MYSQLI_REPORT_STMT_ERROR(stmt-stmt);
RETURN_FALSE;
}
+   if (MyG(report_mode)  MYSQLI_REPORT_INDEX) {
+   php_mysqli_report_index(stmt-stmt-query, 
stmt-stmt-mysql-server_status TSRMLS_CC);
+   }
+   
RETURN_TRUE;
 }
 /* }}} */
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.22 php-src/ext/mysqli/mysqli_fe.c:1.23
--- php-src/ext/mysqli/mysqli_fe.c:1.22 Fri Dec 12 19:28:20 2003
+++ php-src/ext/mysqli/mysqli_fe.c  Tue Dec 16 03:18:31 2003
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_fe.c,v 1.22 2003/12/13 00:28:20 georg Exp $ 
+  $Id: mysqli_fe.c,v 1.23 2003/12/16 08:18:31 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -172,7 +172,6 @@
PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL)
PHP_FALIAS(init,mysqli_init,NULL)
PHP_FALIAS(info,mysqli_info,NULL)
-   PHP_FALIAS(insert_id,mysqli_insert_id,NULL)
PHP_FALIAS(kill,mysqli_kill,NULL)
PHP_FALIAS(master_query,mysqli_master_query,NULL)
PHP_FALIAS(mysqli, mysqli_connect, NULL)
@@ -242,6 +241,7 @@
PHP_FALIAS(get_metadata, mysqli_get_metadata,NULL)
PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL)
PHP_FALIAS(send_long_data,mysqli_send_long_data,NULL)
+   PHP_FALIAS(stmt,mysqli_prepare,NULL)
PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL)
{NULL, NULL, NULL}
 };
Index: php-src/ext/mysqli/mysqli_prop.c
diff -u php-src/ext/mysqli/mysqli_prop.c:1.1 php-src/ext/mysqli/mysqli_prop.c:1.2
--- php-src/ext/mysqli/mysqli_prop.c:1.1Sat Nov 22 16:20:07 2003
+++ php-src/ext/mysqli/mysqli_prop.cTue Dec 16 03:18:31 2003
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_prop.c,v 1.1 2003/11/22 21:20:07 georg Exp $ 
+  $Id: mysqli_prop.c,v 1.2 2003/12/16 08:18:31 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -76,10 +76,12 @@
 MYSQLI_MAP_PROPERTY_STRING(link_host_read, MYSQL, host);
 MYSQLI_MAP_PROPERTY_STRING(link_host_info_read, MYSQL, host_info);
 MYSQLI_MAP_PROPERTY_STRING(link_info_read, MYSQL, info);
+MYSQLI_MAP_PROPERTY_LONG(link_insert_id_read, MYSQL, last_used_con-insert_id);
 MYSQLI_MAP_PROPERTY_LONG(link_port_read, MYSQL, port);
 MYSQLI_MAP_PROPERTY_LONG(link_protocol_version_read, MYSQL, protocol_version);
 MYSQLI_MAP_PROPERTY_LONG(link_server_capabilities_read, MYSQL, server_capabilities);
 MYSQLI_MAP_PROPERTY_LONG(link_server_language_read, MYSQL, server_language);
+MYSQLI_MAP_PROPERTY_LONG(link_server_status_read, MYSQL, server_status);
 MYSQLI_MAP_PROPERTY_STRING(link_server_version_read, MYSQL, server_version);
 MYSQLI_MAP_PROPERTY_STRING(link_sqlstate_read, MYSQL, net.sqlstate);
 MYSQLI_MAP_PROPERTY_LONG(link_thread_id_read, MYSQL, thread_id);
@@ -148,7 +150,9 @@
{host, link_host_read, NULL},
{host_info, link_host_info_read, NULL},
{info, link_info_read, NULL},
+   {insert_id, link_insert_id_read, NULL},
{server_capabilities, link_server_capabilities_read, NULL},
+   {server_status, link_server_status_read, NULL},
{server_version, link_server_version_read, NULL},
{sqlstate, link_sqlstate_read, NULL},
{port, link_port_read, NULL},

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



[PHP-CVS] cvs: php-src /ext/oci8 oci8.dsp

2003-12-16 Thread Harald Radi
phanto  Tue Dec 16 05:27:48 2003 EDT

  Modified files:  
/php-src/ext/oci8   oci8.dsp 
  Log:
  fix include path
  
Index: php-src/ext/oci8/oci8.dsp
diff -u php-src/ext/oci8/oci8.dsp:1.11 php-src/ext/oci8/oci8.dsp:1.12
--- php-src/ext/oci8/oci8.dsp:1.11  Tue Aug 20 05:15:11 2002
+++ php-src/ext/oci8/oci8.dsp   Tue Dec 16 05:27:48 2003
@@ -43,8 +43,8 @@
 # PROP Intermediate_Dir Release_TS
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir 
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\..\Zend /I 
..\..\..\bindlib_w32 /I ..\..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D 
_MBCS /D _USRDLL /D ZTS=1 /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\..\\ /I ..\..\main /I ..\..\Zend /I 
..\..\..\bindlib_w32 /I ..\..\TSRM /I ..\..\..\php_build\oci805\include /D 
ZEND_DEBUG=0 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D ZTS=1 /D 
ZEND_WIN32 /D PHP_WIN32 /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D 
HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /YX /FD /c
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\..\ZendEngine2 /I 
..\..\..\bindlib_w32 /I ..\..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D 
_MBCS /D _USRDLL /D ZTS=1 /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\..\\ /I ..\..\main /I ..\..\ZendEngine2 
/I ..\..\..\bindlib_w32 /I ..\..\TSRM /I ..\..\..\php_build\oci805\include /D 
ZEND_DEBUG=0 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D ZTS=1 /D 
ZEND_WIN32 /D PHP_WIN32 /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D 
HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /YX /FD /c
 # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x406 /d NDEBUG
@@ -70,8 +70,8 @@
 # PROP Intermediate_Dir Debug_TS
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir 
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I 
..\..\..\bindlib_w32 /I ..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS 
/D _USRDLL /D ZTS=1 /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ..\..\\ /I ..\..\main /I ..\..\Zend 
/I ..\..\..\bindlib_w32 /I ..\..\TSRM /I ..\..\..\php_build\include\oci805 /D 
ZEND_DEBUG=1 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL /D 
FTP_EXPORTS /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_OCI8=1 /D 
HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /FR /YX /FD /c
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\ZendEngine2 /I 
..\..\..\bindlib_w32 /I ..\..\TSRM /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS 
/D _USRDLL /D ZTS=1 /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ..\..\\ /I ..\..\main /I 
..\..\ZendEngine2 /I ..\..\..\bindlib_w32 /I ..\..\TSRM /I 
..\..\..\php_build\include\oci805 /D ZEND_DEBUG=1 /D WIN32 /D NDEBUG /D 
_WINDOWS /D _MBCS /D _USRDLL /D FTP_EXPORTS /D ZTS=1 /D ZEND_WIN32 /D 
PHP_WIN32 /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D 
COMPILE_DL_OCI8=1 /FR /YX /FD /c
 # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x406 /d NDEBUG

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



[PHP-CVS] cvs: php-src /ext/oci8 CREDITS

2003-12-16 Thread Harald Radi
phanto  Tue Dec 16 05:28:01 2003 EDT

  Modified files:  
/php-src/ext/oci8   CREDITS 
  Log:
  add myself
  
Index: php-src/ext/oci8/CREDITS
diff -u php-src/ext/oci8/CREDITS:1.4 php-src/ext/oci8/CREDITS:1.5
--- php-src/ext/oci8/CREDITS:1.4Wed Jan 29 13:31:48 2003
+++ php-src/ext/oci8/CREDITSTue Dec 16 05:28:00 2003
@@ -1,2 +1,2 @@
 OCI8
-Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky
+Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi

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



[PHP-CVS] cvs: php-src /ext/oci8 oci8.c php_oci8.h

2003-12-16 Thread Harald Radi
phanto  Tue Dec 16 05:29:12 2003 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c php_oci8.h 
  Log:
  @- fixed #20006, #22674 and #24531 (harald)
  @- added ZTS connection pooling support to the oci extension
  @  connections will now be pooled per process and not
  @  per thread anymore. the number of persistent and active
  @  connections is now also shown in the phpinfo() output (harald)
  
  Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.219 php-src/ext/oci8/oci8.c:1.220
--- php-src/ext/oci8/oci8.c:1.219   Mon Dec 15 08:53:01 2003
+++ php-src/ext/oci8/oci8.c Tue Dec 16 05:29:11 2003
@@ -18,15 +18,20 @@
|  |
| Collection support by Andy Sautins [EMAIL PROTECTED]   |
| Temporary LOB support by David Benson [EMAIL PROTECTED]  |
+   | ZTS per process OCIPLogon by Harald Radi [EMAIL PROTECTED]|
+--+
  */
 
-/* $Id: oci8.c,v 1.219 2003/12/15 13:53:01 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.220 2003/12/16 10:29:11 phanto Exp $ */
 
 /* TODO list:
  *
  * - php.ini flags 
  *   especialliy important for things like oci_ping
+ * allowpconns
+ * timeout
+ * maxlifetime
+ * maxpconns
  * - Change return-value for OCIFetch*() (1-row read, 0-Normal end, false-error) 
  * - Error mode (print or shut up?)
  * - binding of arrays
@@ -37,7 +42,6 @@
  * - make OCIInternalDebug accept a mask of flags
  * - have one ocifree() call.
  * - make it possible to have persistent statements?
- * - implement connection pooling in ZTS mode.
  * - failover
  * - change all the lob stuff to work without classes (optional)! 
  * - make sure that the callbacks terminate the strings with \0
@@ -60,6 +64,7 @@
 
 #include php.h
 #include ext/standard/info.h
+#include php_ini.h
 
 /* #define HAVE_OCI8_TEMP_LOB 1 */
 #define WITH_COLLECTIONS 1
@@ -68,6 +73,13 @@
 
 #include php_oci8.h
 
+/* True globals, only used by thread safe functions */
+static TsHashTable *persistent_servers;
+static TsHashTable *persistent_sessions;
+
+static long num_persistent = 0;
+static long num_links = 0;
+
 /* True globals, no need for thread safety */
 static int le_conn;
 static int le_stmt;
@@ -91,6 +103,21 @@
 
 #define SAFE_STRING(s) ((s)?(s):)
 
+#ifdef ZTS
+MUTEX_T mx_lock;
+
+#define mutex_alloc() tsrm_mutex_alloc()
+#define mutex_free(mutex) tsrm_mutex_free(mutex)
+#define mutex_lock(mutex) tsrm_mutex_lock(mutex)
+#define mutex_unlock(mutex) tsrm_mutex_unlock(mutex)
+#define thread_id()tsrm_thread_id()
+#else
+#define mutex_alloc()
+#define mutex_free(mutex)
+#define mutex_lock(mutex)
+#define mutex_unlock(mutex)
+#define thread_id() 1
+#endif
 
 /* dirty marcos to make sure we _never_ call oracle-functions recursivly 
  *
@@ -462,35 +489,6 @@
 };
 
 /* }}} */
-/* {{{ debug malloc/realloc/free */
-
-#define OCI_USE_EMALLOC 0  /* set this to 1 if you want to use the php 
memory manager! */
-
-#if OCI_USE_EMALLOC
-CONST dvoid *ocimalloc(dvoid *ctx, size_t size)
-{
-   dvoid *ret;
-   ret = (dvoid *)malloc(size);
-   oci_debug(ocimalloc(%d) = %08x, size,ret);
-   return ret;
-}
-
-CONST dvoid *ocirealloc(dvoid *ctx, dvoid *ptr, size_t size)
-{
-   dvoid *ret;
-   oci_debug(ocirealloc(%08x, %d), ptr, size);
-   ret = (dvoid *)realloc(ptr, size);
-   return ptr;
-}
-
-CONST void ocifree(dvoid *ctx, dvoid *ptr)
-{
-   oci_debug(ocifree(%08x), ptr);
-   free(ptr);
-}
-#endif
-
-/* }}} */
 /* {{{ startup, shutdown and info functions */
 
 static void php_oci_init_globals(php_oci_globals *oci_globals_p TSRMLS_DC)
@@ -498,12 +496,6 @@
OCI(shutdown)   = 0;
OCI(in_call)= 0;
 
-   OCI(user) = malloc(sizeof(HashTable));
-   zend_hash_init(OCI(user), 13, NULL, NULL, 1);
-
-   OCI(server) = malloc(sizeof(HashTable));
-   zend_hash_init(OCI(server), 13, NULL, NULL, 1); 
-
CALL_OCI(OCIEnvInit(
OCI(pEnv), 
OCI_DEFAULT, 
@@ -518,6 +510,27 @@
NULL));
 }
 
+static int _sessions_pcleanup(zend_llist *session_list TSRMLS_DC)
+{
+   zend_llist_destroy(session_list);
+
+   return 1;
+}
+
+static int _session_pcleanup(oci_session *session TSRMLS_DC)
+{
+   _oci_close_session(session);
+
+   return 1;
+}
+
+static int _server_pcleanup(oci_server *server TSRMLS_DC)
+{
+   _oci_close_server(server);
+
+   return 1;
+}
+
 PHP_MINIT_FUNCTION(oci)
 {
zend_class_entry oci_lob_class_entry;
@@ -543,11 +556,14 @@
 
 #endif
 
-#if OCI_USE_EMALLOC
-   OCIInitialize(PHP_OCI_INIT_MODE, NULL, ocimalloc, ocirealloc, ocifree);
-#else
+   mx_lock = mutex_alloc();
+
+   persistent_servers = malloc(sizeof(TsHashTable));
+   persistent_sessions = malloc(sizeof(TsHashTable));
+   

[PHP-CVS] cvs: php-src /ext/xml/tests bug26614.phpt

2003-12-16 Thread Dmitry Stogov
dmitry  Tue Dec 16 05:41:41 2003 EDT

  Modified files:  
/php-src/ext/xml/tests  bug26614.phpt 
  Log:
  Improper test file was fixed.
  
  
Index: php-src/ext/xml/tests/bug26614.phpt
diff -u php-src/ext/xml/tests/bug26614.phpt:1.1 php-src/ext/xml/tests/bug26614.phpt:1.2
--- php-src/ext/xml/tests/bug26614.phpt:1.1 Sat Dec 13 10:42:39 2003
+++ php-src/ext/xml/tests/bug26614.phpt Tue Dec 16 05:41:40 2003
@@ -21,7 +21,7 @@
 
 $xml_parser = xml_parser_create();
 xml_set_element_handler($xml_parser, startElement, endElement);
-xml_parse($xml_parser, file_get_contents(test.xml, true));
+xml_parse($xml_parser, $xml);
 xml_parser_free($xml_parser);
 ?
 --EXPECT--

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



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

2003-12-16 Thread Harald Radi
phanto  Tue Dec 16 06:15:56 2003 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  fix non-zts build errors
  
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.220 php-src/ext/oci8/oci8.c:1.221
--- php-src/ext/oci8/oci8.c:1.220   Tue Dec 16 05:29:11 2003
+++ php-src/ext/oci8/oci8.c Tue Dec 16 06:15:55 2003
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.220 2003/12/16 10:29:11 phanto Exp $ */
+/* $Id: oci8.c,v 1.221 2003/12/16 11:15:55 phanto Exp $ */
 
 /* TODO list:
  *
@@ -106,13 +106,13 @@
 #ifdef ZTS
 MUTEX_T mx_lock;
 
-#define mutex_alloc() tsrm_mutex_alloc()
+#define mutex_alloc(mutex) mutex = tsrm_mutex_alloc()
 #define mutex_free(mutex) tsrm_mutex_free(mutex)
 #define mutex_lock(mutex) tsrm_mutex_lock(mutex)
 #define mutex_unlock(mutex) tsrm_mutex_unlock(mutex)
 #define thread_id()tsrm_thread_id()
 #else
-#define mutex_alloc()
+#define mutex_alloc(mutex)
 #define mutex_free(mutex)
 #define mutex_lock(mutex)
 #define mutex_unlock(mutex)
@@ -556,7 +556,7 @@
 
 #endif
 
-   mx_lock = mutex_alloc();
+   mutex_alloc(mx_lock);
 
persistent_servers = malloc(sizeof(TsHashTable));
persistent_sessions = malloc(sizeof(TsHashTable));
@@ -712,7 +712,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.220 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.221 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -2481,11 +2481,11 @@
smart_str_0(hashed_details);
 
if (! exclusive) {
-   if (zend_ts_hash_find(persistent_sessions, hashed_details.c, 
hashed_details.len+1, session_list) != SUCCESS) {
+   if (zend_ts_hash_find(persistent_sessions, hashed_details.c, 
hashed_details.len+1, (void **) session_list) != SUCCESS) {
zend_llist tmp;
/* first session, set up a session list */
zend_llist_init(tmp, sizeof(oci_session), (llist_dtor_func_t) 
_session_pcleanup, 1);
-   zend_ts_hash_update(persistent_sessions, hashed_details.c, 
hashed_details.len+1, tmp, sizeof(zend_llist), session_list);
+   zend_ts_hash_update(persistent_sessions, hashed_details.c, 
hashed_details.len+1, tmp, sizeof(zend_llist), (void **) session_list);
} else {
mutex_lock(mx_lock);
 
@@ -2683,8 +2683,11 @@
 /* {{{ _oci_close_session()
  */
 
-static int _session_compare(oci_session *sess1, oci_session *sess2)
+static int _session_compare(void *a, void *b)
 {
+   oci_session *sess1 = (oci_session*) a;
+   oci_session *sess2 = (oci_session*) b;
+   
return sess1-num = sess2-num;
 }
 

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



[PHP-CVS] cvs: php-src /ext/session/tests 014.phpt

2003-12-16 Thread Dmitry Stogov
dmitry  Tue Dec 16 06:19:22 2003 EDT

  Modified files:  
/php-src/ext/session/tests  014.phpt 
  Log:
  Incorrect test file was fixed. (Use pattern insted of absolute filename)
  
  
Index: php-src/ext/session/tests/014.phpt
diff -u php-src/ext/session/tests/014.phpt:1.5 php-src/ext/session/tests/014.phpt:1.6
--- php-src/ext/session/tests/014.phpt:1.5  Sun Dec 14 18:27:32 2003
+++ php-src/ext/session/tests/014.phpt  Tue Dec 16 06:19:20 2003
@@ -31,11 +31,11 @@
 ?php
 session_destroy();
 ?
---EXPECT--
+--EXPECTF--
 a href=/link?PHPSESSID=abtest
 
-Warning: ini_set(): A session is active. You cannot change the session module's ini 
settings at this time. in /home/rei/PHP_CVS/php5/ext/session/tests/014.php on line 10
+Warning: ini_set(): A session is active. You cannot change the session module's ini 
settings at this time. in %s on line %d
 a href=/link?PHPSESSID=abtest
 
-Warning: ini_set(): A session is active. You cannot change the session module's ini 
settings at this time. in /home/rei/PHP_CVS/php5/ext/session/tests/014.php on line 14
+Warning: ini_set(): A session is active. You cannot change the session module's ini 
settings at this time. in %s on line %d
 a href=/link?PHPSESSID=abtest

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



Re: [PHP-CVS] cvs: php-src /ext/session/tests 014.phpt

2003-12-16 Thread Derick Rethans
Dmitry,

On Tue, 16 Dec 2003, Dmitry Stogov wrote:

   Modified files:
 /php-src/ext/session/tests014.phpt
   Log:
   Incorrect test file was fixed. (Use pattern insted of absolute filename)


 -Warning: ini_set(): A session is active. You cannot change the session module's ini 
 settings at this time. in /home/rei/PHP_CVS/php5/ext/session/tests/014.php on line 10
 +Warning: ini_set(): A session is active. You cannot change the session module's ini 
 settings at this time. in %s on line %d

We usually use something like %s/014.php instead of just %s here.

regards,
Derick

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



[PHP-CVS] cvs: php-src / run-tests.php

2003-12-16 Thread Derick Rethans
derick  Tue Dec 16 09:53:43 2003 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  - Added %e modifier which gets replaced by the current value of
DIRECTORY_SEPARATOR.
  
  
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.181 php-src/run-tests.php:1.182
--- php-src/run-tests.php:1.181 Fri Dec  5 08:45:00 2003
+++ php-src/run-tests.php   Tue Dec 16 09:53:43 2003
@@ -843,6 +843,8 @@
if (isset($section_text['EXPECTF'])) {
$wanted_re = preg_quote($wanted_re, '/');
// Stick to basics
+   $wanted_re = str_replace(%e, '\\' . DIRECTORY_SEPARATOR, 
$wanted_re);
+   echo $wanted_re;
$wanted_re = str_replace(%s, .+?, $wanted_re); //not greedy
$wanted_re = str_replace(%i, [+\-]?[0-9]+, $wanted_re);
$wanted_re = str_replace(%d, [0-9]+, $wanted_re);

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



[PHP-CVS] cvs: php-src / run-tests.php

2003-12-16 Thread Derick Rethans
derick  Tue Dec 16 10:00:26 2003 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  - Remove debug info :)
  
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.182 php-src/run-tests.php:1.183
--- php-src/run-tests.php:1.182 Tue Dec 16 09:53:43 2003
+++ php-src/run-tests.php   Tue Dec 16 10:00:24 2003
@@ -844,7 +844,6 @@
$wanted_re = preg_quote($wanted_re, '/');
// Stick to basics
$wanted_re = str_replace(%e, '\\' . DIRECTORY_SEPARATOR, 
$wanted_re);
-   echo $wanted_re;
$wanted_re = str_replace(%s, .+?, $wanted_re); //not greedy
$wanted_re = str_replace(%i, [+\-]?[0-9]+, $wanted_re);
$wanted_re = str_replace(%d, [0-9]+, $wanted_re);

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



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

2003-12-16 Thread Antony Dovgal
tony2001Tue Dec 16 10:48:22 2003 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  fix warning, concerned to second _oci_close_server() call
  
  
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.221 php-src/ext/oci8/oci8.c:1.222
--- php-src/ext/oci8/oci8.c:1.221   Tue Dec 16 06:15:55 2003
+++ php-src/ext/oci8/oci8.c Tue Dec 16 10:48:20 2003
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.221 2003/12/16 11:15:55 phanto Exp $ */
+/* $Id: oci8.c,v 1.222 2003/12/16 15:48:20 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -712,7 +712,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.221 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.222 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -990,11 +990,13 @@
 static void 
 _oci_server_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
+#if 0
oci_server *server = (oci_server *)rsrc-ptr;
if (server-persistent)
return;
 
_oci_close_server(server);
+#endif
 }
 
 /* }}} */

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



[PHP-CVS] cvs: php-src /ext/oci8 config.m4 oci8.c

2003-12-16 Thread Antony Dovgal
tony2001Tue Dec 16 10:58:11 2003 EDT

  Modified files:  
/php-src/ext/oci8   config.m4 oci8.c 
  Log:
  fix bug #26133 (thanks to Harald)
  rename constant and add library check to config.m4
  add info lines to see if Collection  Temp Lob support enabled or not
  add OCI_THREADED to use thread safe OCI mode with ZTS (should fix bug #26558)
  
  Index: php-src/ext/oci8/config.m4
diff -u php-src/ext/oci8/config.m4:1.47 php-src/ext/oci8/config.m4:1.48
--- php-src/ext/oci8/config.m4:1.47 Fri Oct  3 01:24:25 2003
+++ php-src/ext/oci8/config.m4  Tue Dec 16 10:58:10 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.47 2003/10/03 05:24:25 sniper Exp $
+dnl $Id: config.m4,v 1.48 2003/12/16 15:58:10 tony2001 Exp $
 dnl
 
 AC_DEFUN(PHP_OCI_IF_DEFINED,[
@@ -138,10 +138,22 @@
 -L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
   ])
 
+  dnl
+  dnl Check if we have collections
+  dnl
+  PHP_CHECK_LIBRARY(clntsh, OCICollAssign,
+  [
+AC_DEFINE(HAVE_OCI8_COLLECTIONS,1,[ ])
+  ], [], [
+-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+  ])
+
+
   PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
   AC_DEFINE(HAVE_OCI8,1,[ ])
 
   PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
   PHP_SUBST_OLD(OCI8_DIR)
   PHP_SUBST_OLD(OCI8_VERSION)
+  
 fi
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.222 php-src/ext/oci8/oci8.c:1.223
--- php-src/ext/oci8/oci8.c:1.222   Tue Dec 16 10:48:20 2003
+++ php-src/ext/oci8/oci8.c Tue Dec 16 10:58:10 2003
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.222 2003/12/16 15:48:20 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.223 2003/12/16 15:58:10 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -66,9 +66,6 @@
 #include ext/standard/info.h
 #include php_ini.h
 
-/* #define HAVE_OCI8_TEMP_LOB 1 */
-#define WITH_COLLECTIONS 1
-
 #if HAVE_OCI8
 
 #include php_oci8.h
@@ -84,13 +81,13 @@
 static int le_conn;
 static int le_stmt;
 static int le_desc;
-#ifdef WITH_COLLECTIONS 
+#ifdef PHP_OCI8_HAVE_COLLECTIONS 
 static int le_coll;
 #endif
 static int le_server;
 static int le_session;
 static zend_class_entry *oci_lob_class_entry_ptr;
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 static zend_class_entry *oci_coll_class_entry_ptr;
 #endif
 
@@ -193,7 +190,7 @@
 static void _oci_conn_list_dtor(oci_connection *connection TSRMLS_DC);
 static void _oci_stmt_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
 static void _oci_descriptor_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 static void _oci_coll_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
 #endif
 static void _oci_server_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
@@ -207,7 +204,7 @@
 static oci_connection *oci_get_conn(zval ** TSRMLS_DC);
 static oci_statement *oci_get_stmt(zval ** TSRMLS_DC);
 static oci_descriptor *oci_get_desc(int TSRMLS_DC);
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 /* Questionable name.  Very close to oci_get_col */
 static oci_collection *oci_get_coll(int TSRMLS_DC);
 #endif
@@ -297,7 +294,7 @@
 PHP_FUNCTION(ociwritetemporarylob);
 PHP_FUNCTION(ocicloselob);
 #endif
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 PHP_FUNCTION(ocinewcollection);
 PHP_FUNCTION(ocifreecollection);
 PHP_FUNCTION(ocicollappend);
@@ -327,7 +324,7 @@
RETURN_FALSE; \
}
 
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 #define OCI_GET_COLL(collection,index) \
collection = oci_get_coll(index TSRMLS_CC); \
if (collection == NULL) { \
@@ -418,7 +415,7 @@
PHP_FE(ocinewdescriptor,   NULL)
PHP_FE(ocisetprefetch, NULL)
PHP_FE(ocipasswordchange,  NULL)
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
PHP_FE(ocifreecollection,  NULL)
PHP_FE(ocicollappend,  NULL)
PHP_FE(ocicollgetelem, NULL)
@@ -461,7 +458,7 @@
{NULL,NULL,NULL}
 };
 
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
 static zend_function_entry php_oci_coll_class_functions[] = {
PHP_FALIAS(append,ocicollappend,NULL)
PHP_FALIAS(getelem,   ocicollgetelem,   NULL)
@@ -534,28 +531,34 @@
 PHP_MINIT_FUNCTION(oci)
 {
zend_class_entry oci_lob_class_entry;
-#ifdef WITH_COLLECTIONS
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
zend_class_entry oci_coll_class_entry;
 #endif
 
 #ifdef HAVE_OCI8_SHARED_MODE
 
-#ifdef WITH_COLLECTIONS
-#define PHP_OCI_INIT_MODE OCI_SHARED | OCI_OBJECT
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
+#define PHP_OCI_INIT_MODE_TMP OCI_SHARED | OCI_OBJECT
 #else
-#define PHP_OCI_INIT_MODE OCI_SHARED
+#define PHP_OCI_INIT_MODE_TMP OCI_SHARED
 #endif
 
 #else
 
-#ifdef WITH_COLLECTIONS
-#define PHP_OCI_INIT_MODE OCI_DEFAULT | OCI_OBJECT
+#ifdef PHP_OCI8_HAVE_COLLECTIONS
+#define PHP_OCI_INIT_MODE_TMP OCI_DEFAULT | OCI_OBJECT
 #else
-#define PHP_OCI_INIT_MODE OCI_DEFAULT
+#define 

Re: [PHP-CVS] cvs: php-src /ext/oci8 config.m4 oci8.c

2003-12-16 Thread Ilia Alshanetsky
On December 16, 2003 10:58 am, Antony Dovgal wrote:
 tony2001  Tue Dec 16 10:58:11 2003 EDT

Please don't forget to MFH (backport the fix into the 4.3 tree).

Ilia

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



Re: [PHP-CVS] cvs: php-src /ext/oci8 oci8.c php_oci8.h

2003-12-16 Thread Ilia Alshanetsky
On December 16, 2003 05:29 am, Harald Radi wrote:
 phantoTue Dec 16 05:29:12 2003 EDT
   @- fixed #20006, #22674 and #24531 (harald)

Please don't forget to MFH the fixes to 4.3 tree.

Ilia

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



Re: [PHP-CVS] cvs: php-src /ext/oci8 config.m4 oci8.c

2003-12-16 Thread Antony Dovgal
On Tue, 16 Dec 2003 11:18:53 -0500
Ilia Alshanetsky [EMAIL PROTECTED] wrote:

 On December 16, 2003 10:58 am, Antony Dovgal wrote:
  tony2001Tue Dec 16 10:58:11 2003 EDT
 
 Please don't forget to MFH (backport the fix into the 4.3 tree).

should I port all changes to PHP_4_3 branch or only bugfixes?

---
WBR,
Antony Dovgal aka tony2001
[EMAIL PROTECTED]

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



[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/simplexml simplexml.c /ext/xml xml.c

2003-12-16 Thread Ilia Alshanetsky
iliaa   Tue Dec 16 12:14:07 2003 EDT

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/xmlxml.c 
/php-src/ext/domphp_dom.c 
  Log:
  Removed duplicate php_libxml_(init|shutdown) they are already done by
  ext/libxml.
  
  
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.91 php-src/ext/simplexml/simplexml.c:1.92
--- php-src/ext/simplexml/simplexml.c:1.91  Tue Dec  9 11:29:51 2003
+++ php-src/ext/simplexml/simplexml.c   Tue Dec 16 12:14:05 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.91 2003/12/09 16:29:51 sniper Exp $ */
+/* $Id: simplexml.c,v 1.92 2003/12/16 17:14:05 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1533,8 +1533,6 @@
sxe_object_handlers.get_class_entry = 
zend_get_std_object_handlers()-get_class_entry;
sxe_object_handlers.get_class_name = 
zend_get_std_object_handlers()-get_class_name;
 
-   php_libxml_initialize();
-
return SUCCESS;
 }
 /* }}} */
@@ -1543,8 +1541,6 @@
  */
 PHP_MSHUTDOWN_FUNCTION(simplexml)
 {
-   php_libxml_shutdown();
-
return SUCCESS;
 }
 /* }}} */
@@ -1571,7 +1567,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.91 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.92 $);
php_info_print_table_row(2, Schema support, 
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.143 php-src/ext/xml/xml.c:1.144
--- php-src/ext/xml/xml.c:1.143 Mon Dec  8 02:15:32 2003
+++ php-src/ext/xml/xml.c   Tue Dec 16 12:14:05 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.143 2003/12/08 07:15:32 moriyoshi Exp $ */
+/* $Id: xml.c,v 1.144 2003/12/16 17:14:05 iliaa Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -247,10 +247,7 @@
 #else
REGISTER_STRING_CONSTANT(XML_SAX_IMPL, expat, CONST_CS|CONST_PERSISTENT);
 #endif
-   
-#ifdef LIBXML_EXPAT_COMPAT
-   php_libxml_initialize();
-#endif
+
return SUCCESS;
 }
 
@@ -263,9 +260,6 @@
 
 PHP_MSHUTDOWN_FUNCTION(xml)
 {
-#ifdef LIBXML_EXPAT_COMPAT
-   php_libxml_shutdown();
-#endif
return SUCCESS;
 }
 
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.44 php-src/ext/dom/php_dom.c:1.45
--- php-src/ext/dom/php_dom.c:1.44  Mon Dec  8 12:08:10 2003
+++ php-src/ext/dom/php_dom.c   Tue Dec 16 12:14:06 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.44 2003/12/08 17:08:10 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.45 2003/12/16 17:14:06 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -631,8 +631,6 @@
REGISTER_LONG_CONSTANT(DOM_INVALID_ACCESS_ERR,INVALID_ACCESS_ERR,
 CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(DOM_VALIDATION_ERR,VALIDATION_ERR,
 CONST_CS | CONST_PERSISTENT);
 
-   php_libxml_initialize();
-
return SUCCESS;
 }
 /* }}} */
@@ -663,8 +661,6 @@
 
 PHP_MSHUTDOWN_FUNCTION(dom)
 {
-   php_libxml_shutdown();
-
zend_hash_destroy(dom_domstringlist_prop_handlers);
zend_hash_destroy(dom_namelist_prop_handlers);
zend_hash_destroy(dom_domimplementationlist_prop_handlers);

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



[PHP-CVS] cvs: php-src /ext/gd/libgd gdft.c

2003-12-16 Thread Ilia Alshanetsky
iliaa   Tue Dec 16 12:23:16 2003 EDT

  Modified files:  
/php-src/ext/gd/libgd   gdft.c 
  Log:
  ZTS fix.
  
  
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.26 php-src/ext/gd/libgd/gdft.c:1.27
--- php-src/ext/gd/libgd/gdft.c:1.26Tue Dec 16 01:29:01 2003
+++ php-src/ext/gd/libgd/gdft.c Tue Dec 16 12:23:15 2003
@@ -349,7 +349,7 @@
   return (strcmp (a-fontlist, b-fontlist) == 0);
 }
 
-static void *fontFetch (char **error, void *key TSRMLS_DC)
+static void *fontFetch (char **error, void *key)
 {
font_t *a;
fontkey_t *b = (fontkey_t *) key;
@@ -394,6 +394,7 @@
}
for (dir = strtok (path, PATHSEPARATOR); dir; dir = strtok (0, 
PATHSEPARATOR)) {
if (!strcmp(dir, .)) {
+   TSRMLS_FETCH();
 #if HAVE_GETCWD
dir = VCWD_GETCWD(cur_dir, MAXPATHLEN);
 #elif HAVE_GETWD

-- 
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) /ext/gd/libgd gdft.c

2003-12-16 Thread Ilia Alshanetsky
iliaa   Tue Dec 16 12:23:27 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/gd/libgd   gdft.c 
  Log:
  ZTS fix.
  
  
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.11.2.12 php-src/ext/gd/libgd/gdft.c:1.11.2.13
--- php-src/ext/gd/libgd/gdft.c:1.11.2.12   Mon Dec 15 15:34:57 2003
+++ php-src/ext/gd/libgd/gdft.c Tue Dec 16 12:23:27 2003
@@ -395,6 +395,7 @@
}
for (dir = strtok (path, PATHSEPARATOR); dir; dir = strtok (0, 
PATHSEPARATOR)) {
if (!strcmp(dir, .)) {
+   TSRMLS_FETCH();
 #if HAVE_GETCWD
dir = VCWD_GETCWD(cur_dir, MAXPATHLEN);
 #elif HAVE_GETWD

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



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

2003-12-16 Thread Sara Golemon
pollita Tue Dec 16 14:41:27 2003 EDT

  Modified files:  
/php-src/ext/ftpftp.c 
  Log:
  Fail loudly, silence bogus bugs.
  
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.95 php-src/ext/ftp/ftp.c:1.96
--- php-src/ext/ftp/ftp.c:1.95  Sat Dec  6 11:12:10 2003
+++ php-src/ext/ftp/ftp.c   Tue Dec 16 14:41:26 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.95 2003/12/06 16:12:10 wez Exp $ */
+/* $Id: ftp.c,v 1.96 2003/12/16 19:41:26 pollita Exp $ */
 
 #include php.h
 
@@ -1615,6 +1615,7 @@
 
 
if ((tmpfp = tmpfile()) == NULL) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to create 
temporary file.  Check permissions in temporary files directory.);
return NULL;
}
 

-- 
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/ftp ftp.c

2003-12-16 Thread Sara Golemon
pollita Tue Dec 16 14:45:35 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/ftpftp.c 
  Log:
  MFH: Fail loudly. This is too often reported as a bug.
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.504 php-src/NEWS:1.1247.2.505
--- php-src/NEWS:1.1247.2.504   Mon Dec 15 20:00:44 2003
+++ php-src/NEWSTue Dec 16 14:45:34 2003
@@ -5,6 +5,7 @@
   (Edin)
 - Added support for --program-prefix and --program-suffix configure options.
   (Jani)
+- Added warning when unable to create temp stream for ftp_(n)list(). (Sara)
 - Fixed header handler in NSAPI SAPI module (header-replace was ignored,
   send_default_content_type now sends value from php.ini). (Uwe Schindler)
 - Fixed bug #26635 (fixed look up for fonts in the current directory w/ZTS).
Index: php-src/ext/ftp/ftp.c
diff -u php-src/ext/ftp/ftp.c:1.68.2.10 php-src/ext/ftp/ftp.c:1.68.2.11
--- php-src/ext/ftp/ftp.c:1.68.2.10 Tue Sep  9 17:15:20 2003
+++ php-src/ext/ftp/ftp.c   Tue Dec 16 14:45:35 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.68.2.10 2003/09/09 21:15:20 pollita Exp $ */
+/* $Id: ftp.c,v 1.68.2.11 2003/12/16 19:45:35 pollita Exp $ */
 
 #include php.h
 
@@ -1460,8 +1460,10 @@
char**entry;
char*text;
 
-   if ((tmpfp = tmpfile()) == NULL)
+   if ((tmpfp = tmpfile()) == NULL) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to create 
temporary file.  Check permissions in temporary files directory.);
return NULL;
+   }
 
if (!ftp_type(ftp, FTPTYPE_ASCII))
goto bail;

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



[PHP-CVS] cvs: php-src /ext/simplexml/tests 011.phpt

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 14:49:34 2003 EDT

  Added files: 
/php-src/ext/simplexml/tests011.phpt 
  Log:
  Add test for string conversion capabilities when used with echo/print.
  
  

Index: php-src/ext/simplexml/tests/011.phpt
+++ php-src/ext/simplexml/tests/011.phpt
--TEST--
SimpleXML and echo/print
--SKIPIF--
?php 
if (!extension_loaded('simplexml')) print 'skip';
if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
?
--FILE--
?php 

$xml =EOF
?xml version=1.0 encoding=ISO-8859-1 ?
foo
  barbar/bar
  bazbaz1/baz
  bazbaz2/baz
/foo
EOF;

$sxe = simplexml_load_string($xml);

echo ===BAR===\n;
echo $sxe-bar;
echo \n;

echo ===BAZ===\n;
echo $sxe-baz;
echo \n;

echo ===BAZ0===\n;
echo $sxe-baz[0];
echo \n;

echo ===BAZ1===\n;
print $sxe-baz[1];
echo \n;
?
===DONE===
--EXPECT--
===BAR===
bar
===BAZ===
Array
===BAZ0===
baz1
===BAZ1===
baz2
===DONE===

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



[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c /ext/simplexml/tests 012.phpt

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:34:20 2003 EDT

  Added files: 
/php-src/ext/simplexml/tests012.phpt 

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  Add error handling for element/attribute creation/changing
  
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.92 php-src/ext/simplexml/simplexml.c:1.93
--- php-src/ext/simplexml/simplexml.c:1.92  Tue Dec 16 12:14:05 2003
+++ php-src/ext/simplexml/simplexml.c   Tue Dec 16 15:34:18 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.92 2003/12/16 17:14:05 iliaa Exp $ */
+/* $Id: simplexml.c,v 1.93 2003/12/16 20:34:18 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -28,6 +28,7 @@
 
 #include php_ini.h
 #include ext/standard/info.h
+#include ext/standard/php_string.h
 #include php_simplexml.h
 
 #if HAVE_SPL
@@ -279,13 +280,32 @@
xmlAttrPtr  attr = NULL;
int counter = 0;
int is_attr = 0;
-   zvaltmp_zv;
+   zvaltmp_zv, trim_zv;
+
+   if (!member) {
+   /* this happens when the user did: $sxe[] = $value
+* and could also be E_PARSE, but use this only during parsing
+* but this is during runtime.
+*/
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, Cannot create unnamed 
attribute);
+   return;
+   }
 
if (Z_TYPE_P(member) != IS_STRING) {
-   tmp_zv = *member;
-   zval_copy_ctor(tmp_zv);
+   trim_zv = *member;
+   zval_copy_ctor(trim_zv);
+   convert_to_string(trim_zv);
+   php_trim(Z_STRVAL(trim_zv), Z_STRLEN(trim_zv), NULL, 0, tmp_zv, 3 
TSRMLS_CC);
+   zval_dtor(trim_zv);
member = tmp_zv;
-   convert_to_string(member);
+   }
+
+   if (!Z_STRLEN_P(member)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot write or create 
unnamed %s, attribs ? attribute : element);
+   if (member == tmp_zv) {
+   zval_dtor(tmp_zv);
+   }
+   return;
}
 
name = Z_STRVAL_P(member);
@@ -1567,7 +1587,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.92 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.93 $);
php_info_print_table_row(2, Schema support, 
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

Index: php-src/ext/simplexml/tests/012.phpt
+++ php-src/ext/simplexml/tests/012.phpt
--TEST--
SimpleXML and Attribute creation
--SKIPIF--
?php 
if (!extension_loaded('simplexml')) print 'skip';
if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
?
--FILE--
?php 

$xml =EOF
?xml version=1.0 encoding=ISO-8859-1 ?
foo/
EOF;

$sxe = simplexml_load_string($xml);


$sxe[] = warning;
$sxe[attr] = value;

echo $sxe-to_xml_string();

$sxe[attr] = new value;

echo $sxe-to_xml_string();

$sxe[] = error;

?
===DONE===
--EXPECTF--

Warning: main(): Cannot write or create unnamed attribute in %s012.php on line %d
?xml version=1.0 encoding=ISO-8859-1?
foo attr=value/
?xml version=1.0 encoding=ISO-8859-1?
foo attr=new value/

Fatal error: main(): Cannot create unnamed attribute in %s012.php on line %d

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



[PHP-CVS] cvs: php-src /ext/simplexml CREDITS

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:36:47 2003 EDT

  Modified files:  
/php-src/ext/simplexml  CREDITS 
  Log:
  Add myself
  
Index: php-src/ext/simplexml/CREDITS
diff -u php-src/ext/simplexml/CREDITS:1.2 php-src/ext/simplexml/CREDITS:1.3
--- php-src/ext/simplexml/CREDITS:1.2   Fri Jul 11 03:44:56 2003
+++ php-src/ext/simplexml/CREDITS   Tue Dec 16 15:36:46 2003
@@ -1,2 +1,2 @@
 simplexml
-Sterling Hughes
+Sterling Hughes, Marcus Boerger

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



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

2003-12-16 Thread Jani Taskinen
sniper  Tue Dec 16 15:39:41 2003 EDT

  Modified files:  
/php-src/ext/socketssockets.c 
  Log:
  nuke unused code
  
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.156 php-src/ext/sockets/sockets.c:1.157
--- php-src/ext/sockets/sockets.c:1.156 Fri Dec  5 19:00:29 2003
+++ php-src/ext/sockets/sockets.c   Tue Dec 16 15:39:40 2003
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.156 2003/12/06 00:00:29 wez Exp $ */
+/* $Id: sockets.c,v 1.157 2003/12/16 20:39:40 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -111,17 +111,6 @@
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
 
-static 
-   ZEND_BEGIN_ARG_INFO(third_through_seventh_args_force_ref, 0)
-   ZEND_ARG_PASS_INFO(0)
-   ZEND_ARG_PASS_INFO(0)
-   ZEND_ARG_PASS_INFO(1)
-   ZEND_ARG_PASS_INFO(1)
-   ZEND_ARG_PASS_INFO(1)
-   ZEND_ARG_PASS_INFO(1)
-   ZEND_ARG_PASS_INFO(1)
-   ZEND_END_ARG_INFO();
-
 /* {{{ sockets_functions[]
  */
 function_entry sockets_functions[] = {

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



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

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:40:25 2003 EDT

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  Better comment
  
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.93 php-src/ext/simplexml/simplexml.c:1.94
--- php-src/ext/simplexml/simplexml.c:1.93  Tue Dec 16 15:34:18 2003
+++ php-src/ext/simplexml/simplexml.c   Tue Dec 16 15:40:24 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.93 2003/12/16 20:34:18 helly Exp $ */
+/* $Id: simplexml.c,v 1.94 2003/12/16 20:40:24 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -283,9 +283,9 @@
zvaltmp_zv, trim_zv;
 
if (!member) {
-   /* this happens when the user did: $sxe[] = $value
-* and could also be E_PARSE, but use this only during parsing
-* but this is during runtime.
+   /* This happens when the user did: $sxe[] = $value
+* and could also be E_PARSE, but we use this only during parsing
+* and this is during runtime.
 */
php_error_docref(NULL TSRMLS_CC, E_ERROR, Cannot create unnamed 
attribute);
return;
@@ -1587,7 +1587,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.93 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.94 $);
php_info_print_table_row(2, Schema support, 
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

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



[PHP-CVS] cvs: php-src /ext/simplexml/tests 013.phpt

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:50:21 2003 EDT

  Added files: 
/php-src/ext/simplexml/tests013.phpt 
  Log:
  Add a test to check split text content collecting
  

Index: php-src/ext/simplexml/tests/013.phpt
+++ php-src/ext/simplexml/tests/013.phpt
--TEST--
SimpleXML and Split text content
--SKIPIF--
?php 
if (!extension_loaded('simplexml')) print 'skip';
if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
?
--FILE--
?php 

$xml =EOF
?xml version=1.0 encoding=ISO-8859-1 ?
foobarbaz/bar/foo
EOF;

$sxe = simplexml_load_string($xml);

var_dump((string)$sxe);

?
===DONE===
--EXPECT--
string(6) barbar
===DONE===

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



[PHP-CVS] cvs: php-src /sapi/tests .cvsignore

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:54:52 2003 EDT

  Added files: 
/php-src/sapi/tests .cvsignore 
  Log:
  Add missing .cvsignore
  

Index: php-src/sapi/tests/.cvsignore
+++ php-src/sapi/tests/.cvsignore
phpt.*
*.diff
*.log
*.exp
*.out
*.php

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



[PHP-CVS] cvs: php-src /ext/tokenizer/tests .cvsignore

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 15:55:41 2003 EDT

  Added files: 
/php-src/ext/tokenizer/tests.cvsignore 
  Log:
  Add missing .cvsignore
  

Index: php-src/ext/tokenizer/tests/.cvsignore
+++ php-src/ext/tokenizer/tests/.cvsignore
phpt.*
*.diff
*.log
*.exp
*.out
*.php

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



[PHP-CVS] cvs: php-src /ext/xmlrpc/libxmlrpc simplestring.c xml_element.c xmlrpc.c xmlrpc_introspection.c

2003-12-16 Thread Jani Taskinen
sniper  Tue Dec 16 16:00:22 2003 EDT

  Modified files:  
/php-src/ext/xmlrpc/libxmlrpc   simplestring.c xml_element.c xmlrpc.c 
xmlrpc_introspection.c 
  Log:
  Fix some compile warnings (patch by Joe Orton)
  
Index: php-src/ext/xmlrpc/libxmlrpc/simplestring.c
diff -u php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 
php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.4
--- php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 Wed Aug 21 21:25:50 2002
+++ php-src/ext/xmlrpc/libxmlrpc/simplestring.c Tue Dec 16 16:00:21 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: simplestring.c,v 1.3 2002/08/22 01:25:50 
sniper Exp $;
+static const char rcsid[] = #(@) $Id: simplestring.c,v 1.4 2003/12/16 21:00:21 
sniper Exp $;
 
 
 #define SIMPLESTRING_INCR 32
@@ -45,6 +45,9 @@
  *   06/2000
  * HISTORY
  *   $Log: simplestring.c,v $
+ *   Revision 1.4  2003/12/16 21:00:21  sniper
+ *   Fix some compile warnings (patch by Joe Orton)
+ *
  *   Revision 1.3  2002/08/22 01:25:50  sniper
  *   kill some compile warnings
  *
@@ -79,6 +82,7 @@
  **/
 
 #include stdlib.h
+#include string.h
 #include simplestring.h
 
 #define my_free(thing)  if(thing) {free(thing); thing = 0;}
Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.4 
php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.5
--- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.4  Tue Nov 26 18:01:16 2002
+++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c  Tue Dec 16 16:00:21 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xml_element.c,v 1.4 2002/11/26 23:01:16 fmk 
Exp $;
+static const char rcsid[] = #(@) $Id: xml_element.c,v 1.5 2003/12/16 21:00:21 sniper 
Exp $;
 
 
 
@@ -44,6 +44,9 @@
  *   06/2000
  * HISTORY
  *   $Log: xml_element.c,v $
+ *   Revision 1.5  2003/12/16 21:00:21  sniper
+ *   Fix some compile warnings (patch by Joe Orton)
+ *
  *   Revision 1.4  2002/11/26 23:01:16  fmk
  *   removing unused variables
  *
@@ -98,6 +101,7 @@
 #endif
 #include stdlib.h
 #include string.h
+#include ctype.h
 
 #include xml_element.h
 #include queue.h
@@ -471,18 +475,20 @@
 }
 
 /* print buf to file */
-static file_out_fptr(void *f, const char *text, int size)
+static int file_out_fptr(void *f, const char *text, int size)
 {
fputs(text, (FILE *)f);
+   return 0;
 }
 
 /* print buf to simplestring */
-static simplestring_out_fptr(void *f, const char *text, int size)
+static int simplestring_out_fptr(void *f, const char *text, int size)
 {
simplestring* buf = (simplestring*)f;
if(buf) {
   simplestring_addn(buf, text, size);
}
+   return 0;
 }
 
 /f* xml_element/xml_elem_serialize_to_string
@@ -696,7 +702,7 @@
  if(byte_idx = 0) {
  snprintf(buf, 
   sizeof(buf),
-  \n\tdata beginning %i before byte index: %s\n,
+  \n\tdata beginning %ld before byte index: %s\n,
   byte_idx  10  ? 10 : byte_idx,
   in_buf + (byte_idx  10 ? byte_idx - 10 : byte_idx));
  }
@@ -705,7 +711,7 @@
 \tdescription: %s\n
 \tline: %i\n
 \tcolumn: %i\n
-\tbyte index: %i\n
+\tbyte index: %ld\n
 \ttotal bytes: %i\n%s ,
 err_code, error_str, line_num, 
 col_num, byte_idx, byte_total, buf);
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.5
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4   Fri Jul  5 00:43:53 2002
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Tue Dec 16 16:00:21 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.4 2002/07/05 04:43:53 danda Exp 
$;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.5 2003/12/16 21:00:21 sniper Exp 
$;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.5  2003/12/16 21:00:21  sniper
+ *   Fix some compile warnings (patch by Joe Orton)
+ *
  *   Revision 1.4  2002/07/05 04:43:53  danda
  *   merged in updates from SF project.  bring php repository up to date with 
xmlrpc-epi version 0.51
  *
@@ -122,6 +125,7 @@
 #include string.h
 #include stdarg.h
 #include time.h
+#include ctype.h
 
 #include queue.h
 #include xmlrpc.h
@@ -704,7 +708,7 @@
   XMLRPC_ERROR_CODE code;
   char buf[1024];
   snprintf(buf, sizeof(buf), 
-   error occurred at line %i, column %i, byte index %i, 
+   error occurred at line %ld, column %ld, byte index %ld, 
 error-line, error-column, 
error-byte_index);
 
   /* expat specific errors */
@@ -815,13 +819,6 @@
return v;
 }
 
-static const char* get_string(const char* buf, int bDup) {
-   if(bDup) {
-  return strdup(buf);
-   }
-   return 

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/xmlrpc/libxmlrpc simplestring.c xml_element.c xmlrpc.c xmlrpc_introspection.c

2003-12-16 Thread Jani Taskinen
sniper  Tue Dec 16 16:00:36 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/xmlrpc/libxmlrpc   simplestring.c xml_element.c xmlrpc.c 
xmlrpc_introspection.c 
  Log:
  MFH: fix compile warnings
  
Index: php-src/ext/xmlrpc/libxmlrpc/simplestring.c
diff -u php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 
php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3.4.1
--- php-src/ext/xmlrpc/libxmlrpc/simplestring.c:1.3 Wed Aug 21 21:25:50 2002
+++ php-src/ext/xmlrpc/libxmlrpc/simplestring.c Tue Dec 16 16:00:35 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: simplestring.c,v 1.3 2002/08/22 01:25:50 
sniper Exp $;
+static const char rcsid[] = #(@) $Id: simplestring.c,v 1.3.4.1 2003/12/16 21:00:35 
sniper Exp $;
 
 
 #define SIMPLESTRING_INCR 32
@@ -45,6 +45,9 @@
  *   06/2000
  * HISTORY
  *   $Log: simplestring.c,v $
+ *   Revision 1.3.4.1  2003/12/16 21:00:35  sniper
+ *   MFH: fix compile warnings
+ *
  *   Revision 1.3  2002/08/22 01:25:50  sniper
  *   kill some compile warnings
  *
@@ -79,6 +82,7 @@
  **/
 
 #include stdlib.h
+#include string.h
 #include simplestring.h
 
 #define my_free(thing)  if(thing) {free(thing); thing = 0;}
Index: php-src/ext/xmlrpc/libxmlrpc/xml_element.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.3.4.1 
php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.3.4.2
--- php-src/ext/xmlrpc/libxmlrpc/xml_element.c:1.3.4.1  Tue Nov 26 23:07:00 2002
+++ php-src/ext/xmlrpc/libxmlrpc/xml_element.c  Tue Dec 16 16:00:35 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xml_element.c,v 1.3.4.1 2002/11/27 04:07:00 
fmk Exp $;
+static const char rcsid[] = #(@) $Id: xml_element.c,v 1.3.4.2 2003/12/16 21:00:35 
sniper Exp $;
 
 
 
@@ -44,6 +44,9 @@
  *   06/2000
  * HISTORY
  *   $Log: xml_element.c,v $
+ *   Revision 1.3.4.2  2003/12/16 21:00:35  sniper
+ *   MFH: fix compile warnings
+ *
  *   Revision 1.3.4.1  2002/11/27 04:07:00  fmk
  *   MFH
  *
@@ -98,6 +101,7 @@
 #endif
 #include stdlib.h
 #include string.h
+#include ctype.h
 
 #include xml_element.h
 #include queue.h
@@ -471,18 +475,20 @@
 }
 
 /* print buf to file */
-static file_out_fptr(void *f, const char *text, int size)
+static int file_out_fptr(void *f, const char *text, int size)
 {
fputs(text, (FILE *)f);
+   return 0;
 }
 
 /* print buf to simplestring */
-static simplestring_out_fptr(void *f, const char *text, int size)
+static int simplestring_out_fptr(void *f, const char *text, int size)
 {
simplestring* buf = (simplestring*)f;
if(buf) {
   simplestring_addn(buf, text, size);
}
+   return 0;
 }
 
 /f* xml_element/xml_elem_serialize_to_string
@@ -696,7 +702,7 @@
  if(byte_idx = 0) {
  snprintf(buf, 
   sizeof(buf),
-  \n\tdata beginning %i before byte index: %s\n,
+  \n\tdata beginning %ld before byte index: %s\n,
   byte_idx  10  ? 10 : byte_idx,
   in_buf + (byte_idx  10 ? byte_idx - 10 : byte_idx));
  }
@@ -705,7 +711,7 @@
 \tdescription: %s\n
 \tline: %i\n
 \tcolumn: %i\n
-\tbyte index: %i\n
+\tbyte index: %ld\n
 \ttotal bytes: %i\n%s ,
 err_code, error_str, line_num, 
 col_num, byte_idx, byte_total, buf);
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4.4.1
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.4   Fri Jul  5 00:43:53 2002
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Tue Dec 16 16:00:36 2003
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.4 2002/07/05 04:43:53 danda Exp 
$;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.4.4.1 2003/12/16 21:00:36 sniper 
Exp $;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.4.4.1  2003/12/16 21:00:36  sniper
+ *   MFH: fix compile warnings
+ *
  *   Revision 1.4  2002/07/05 04:43:53  danda
  *   merged in updates from SF project.  bring php repository up to date with 
xmlrpc-epi version 0.51
  *
@@ -122,6 +125,7 @@
 #include string.h
 #include stdarg.h
 #include time.h
+#include ctype.h
 
 #include queue.h
 #include xmlrpc.h
@@ -704,7 +708,7 @@
   XMLRPC_ERROR_CODE code;
   char buf[1024];
   snprintf(buf, sizeof(buf), 
-   error occurred at line %i, column %i, byte index %i, 
+   error occurred at line %ld, column %ld, byte index %ld, 
 error-line, error-column, 
error-byte_index);
 
   /* expat specific errors */
@@ -815,13 +819,6 @@
return v;
 }
 
-static const char* get_string(const char* buf, int bDup) {
-   if(bDup) {
-  return strdup(buf);
-   }
-   return buf;
-}
-
 /***/
 
 /f* 

[PHP-CVS] cvs: php-src /ext/simplexml/tests 011.phpt 012.phpt 013.phpt

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 16:02:55 2003 EDT

  Modified files:  
/php-src/ext/simplexml/tests011.phpt 012.phpt 013.phpt 
  Log:
  Not needed here (copy'n'paste)
  
Index: php-src/ext/simplexml/tests/011.phpt
diff -u php-src/ext/simplexml/tests/011.phpt:1.1 
php-src/ext/simplexml/tests/011.phpt:1.2
--- php-src/ext/simplexml/tests/011.phpt:1.1Tue Dec 16 14:49:33 2003
+++ php-src/ext/simplexml/tests/011.phptTue Dec 16 16:02:54 2003
@@ -3,7 +3,6 @@
 --SKIPIF--
 ?php 
if (!extension_loaded('simplexml')) print 'skip';
-   if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
 ?
 --FILE--
 ?php 
Index: php-src/ext/simplexml/tests/012.phpt
diff -u php-src/ext/simplexml/tests/012.phpt:1.1 
php-src/ext/simplexml/tests/012.phpt:1.2
--- php-src/ext/simplexml/tests/012.phpt:1.1Tue Dec 16 15:34:19 2003
+++ php-src/ext/simplexml/tests/012.phptTue Dec 16 16:02:54 2003
@@ -3,7 +3,6 @@
 --SKIPIF--
 ?php 
if (!extension_loaded('simplexml')) print 'skip';
-   if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
 ?
 --FILE--
 ?php 
Index: php-src/ext/simplexml/tests/013.phpt
diff -u php-src/ext/simplexml/tests/013.phpt:1.1 
php-src/ext/simplexml/tests/013.phpt:1.2
--- php-src/ext/simplexml/tests/013.phpt:1.1Tue Dec 16 15:50:20 2003
+++ php-src/ext/simplexml/tests/013.phptTue Dec 16 16:02:54 2003
@@ -3,7 +3,6 @@
 --SKIPIF--
 ?php 
if (!extension_loaded('simplexml')) print 'skip';
-   if (!class_exists('RecursiveIteratorIterator')) print 'skip 
RecursiveIteratorIterator not available';
 ?
 --FILE--
 ?php 

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



[PHP-CVS] cvs: php-src /ext/dba dba_flatfile.c

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 16:40:20 2003 EDT

  Modified files:  
/php-src/ext/dbadba_flatfile.c 
  Log:
  Fix winbuild
  
Index: php-src/ext/dba/dba_flatfile.c
diff -u php-src/ext/dba/dba_flatfile.c:1.14 php-src/ext/dba/dba_flatfile.c:1.15
--- php-src/ext/dba/dba_flatfile.c:1.14 Sun Dec 14 17:08:18 2003
+++ php-src/ext/dba/dba_flatfile.c  Tue Dec 16 16:40:19 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_flatfile.c,v 1.14 2003/12/14 22:08:18 helly Exp $ */
+/* $Id: dba_flatfile.c,v 1.15 2003/12/16 21:40:19 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -48,8 +48,13 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not cast 
stream);
return FAILURE;
}
+#ifdef F_SETFL
+   /* Needed becasue some systems do not allow to write to the original 
+* file contents with O_APPEND being set.
+*/
flags = fcntl(fd, F_SETFL);
fcntl(fd, F_SETFL, flags  ~O_APPEND);
+#endif
}
 
info-dbf = pemalloc(sizeof(flatfile), info-flagsDBA_PERSISTENT);

-- 
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) /ext/dba dba_flatfile.c

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 16:41:57 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_flatfile.c 
  Log:
  MFH: Fix winbuild
  
Index: php-src/ext/dba/dba_flatfile.c
diff -u php-src/ext/dba/dba_flatfile.c:1.8.2.4 php-src/ext/dba/dba_flatfile.c:1.8.2.5
--- php-src/ext/dba/dba_flatfile.c:1.8.2.4  Sun Dec 14 17:20:04 2003
+++ php-src/ext/dba/dba_flatfile.c  Tue Dec 16 16:41:57 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_flatfile.c,v 1.8.2.4 2003/12/14 22:20:04 helly Exp $ */
+/* $Id: dba_flatfile.c,v 1.8.2.5 2003/12/16 21:41:57 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -48,8 +48,13 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not cast 
stream);
return FAILURE;
}
+#ifdef F_SETFL
+   /* Needed becasue some systems do not allow to write to the original 
+* file contents with O_APPEND being set.
+*/
flags = fcntl(fd, F_SETFL);
fcntl(fd, F_SETFL, flags  ~O_APPEND);
+#endif
}
 
info-dbf = pemalloc(sizeof(flatfile), info-flagsDBA_PERSISTENT);

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



[PHP-CVS] cvs: php-src /ext/dba dba.dsp

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 16:50:03 2003 EDT

  Modified files:  
/php-src/ext/dbadba.dsp 
  Log:
  Add inifile
  
Index: php-src/ext/dba/dba.dsp
diff -u php-src/ext/dba/dba.dsp:1.5 php-src/ext/dba/dba.dsp:1.6
--- php-src/ext/dba/dba.dsp:1.5 Sun Aug 31 12:28:19 2003
+++ php-src/ext/dba/dba.dsp Tue Dec 16 16:50:03 2003
@@ -44,7 +44,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir 
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I ..\..\TSRM /I 
..\..\main /D ZEND_DEBUG=0 /D WIN32 /D NDEBUG /D _WINDOWS /D COMPILE_DL_DBA 
/D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D DBA_DB3=1 /D 
DB3_INCLUDE_FILE=db.h /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I ..\..\TSRM /I 
..\..\main /D ZEND_DEBUG=0 /D DBA_DB3=1 /D WIN32 /D NDEBUG /D _WINDOWS /D 
COMPILE_DL_DBA /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D 
DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I ..\..\TSRM /I 
..\..\main /D ZEND_DEBUG=0 /D DBA_DB3=1 /D WIN32 /D NDEBUG /D _WINDOWS /D 
COMPILE_DL_DBA /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D 
DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 
/YX /FD /c
 # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x407 /d NDEBUG
@@ -71,7 +71,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir 
 # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\Zend /I 
..\..\TSRM /I ..\..\main /D ZEND_DEBUG=1 /D WIN32 /D NDEBUG /D _WINDOWS /D 
COMPILE_DL_DBA /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D DBA_DB3 /D 
DB3_INCLUDE_FILE=db.h /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\Zend /I ..\..\TSRM 
/I ..\..\main /D ZEND_DEBUG=1 /D DBA_DB3 /D WIN32 /D NDEBUG /D _WINDOWS /D 
COMPILE_DL_DBA /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D 
DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\Zend /I ..\..\TSRM 
/I ..\..\main /D ZEND_DEBUG=1 /D DBA_DB3 /D WIN32 /D NDEBUG /D _WINDOWS /D 
COMPILE_DL_DBA /D ZTS=1 /D ZEND_WIN32 /D PHP_WIN32 /D HAVE_DBA=1 /D 
DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /D DBA_INIFILE=1 
/YX /FD /GZ /c
 # ADD BASE MTL /nologo /D _DEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D _DEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x407 /d _DEBUG
@@ -130,6 +130,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\dba_inifile.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\dba_ndbm.c
 # End Source File
 # Begin Source File
@@ -138,6 +142,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\libinifile\inifile.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\libcdb\uint32.c
 # End Source File
 # End Group
@@ -186,12 +194,20 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\php_inifile.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\php_ndbm.h
 # End Source File
 # Begin Source File
 
 SOURCE=.\libcdb\uint32.h
 # End Source File
+# Begin Source File
+
+SOURCE=.\libinifile\inifile.h
+# End Source File
 # End Group
 # End Target
 # End Project

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



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c

2003-12-16 Thread Andrei Zmievski
andrei  Tue Dec 16 16:53:27 2003 EDT

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
  Log:
  
  
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.147 php-src/ext/pcre/php_pcre.c:1.148
--- php-src/ext/pcre/php_pcre.c:1.147   Tue Nov 25 15:02:22 2003
+++ php-src/ext/pcre/php_pcre.c Tue Dec 16 16:53:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.147 2003/11/25 20:02:22 sniper Exp $ */
+/* $Id: php_pcre.c,v 1.148 2003/12/16 21:53:27 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -428,7 +428,7 @@
subpat_names = (char **)safe_emalloc(num_subpats, sizeof(char *), 0);
memset(subpat_names, 0, sizeof(char *) * num_subpats);
{
-   int name_cnt, name_size, ni = 0;
+   int name_cnt = 0, name_size, ni = 0;
char *name_table;
unsigned short name_idx;
 

-- 
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) /ext/pcre php_pcre.c

2003-12-16 Thread Andrei Zmievski
andrei  Tue Dec 16 16:55:22 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/pcre   php_pcre.c 
  Log:
  Fix function name.
  
  
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.132.2.12 php-src/ext/pcre/php_pcre.c:1.132.2.13
--- php-src/ext/pcre/php_pcre.c:1.132.2.12  Tue Dec 16 16:52:12 2003
+++ php-src/ext/pcre/php_pcre.c Tue Dec 16 16:55:22 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.132.2.12 2003/12/16 21:52:12 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.132.2.13 2003/12/16 21:55:22 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -112,7 +112,7 @@
 
 #ifdef NO_RECURSE
pcre_stack_malloc = php_pcre_malloc;
-   pcre_stack_free = php_pcre_stack_free;
+   pcre_stack_free = php_pcre_free;
 #endif

return SUCCESS;

-- 
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/pcre config.m4

2003-12-16 Thread Andrei Zmievski
andrei  Tue Dec 16 17:14:56 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/pcre   config.m4 
  Log:
  Umm, let's not enable NO_RECURSE by default. The matches on some
  patterns can be more than twice as slow as before.
  # Maybe we should add a --disable-pcre-stack-recursion compile option
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.506 php-src/NEWS:1.1247.2.507
--- php-src/NEWS:1.1247.2.506   Tue Dec 16 16:52:11 2003
+++ php-src/NEWSTue Dec 16 17:14:54 2003
@@ -1,9 +1,7 @@
 PHP 4  NEWS
 |||
 ?? ??? 2003, Version 4.3.5
-- Upgraded PCRE library to version 4.5. The bundled version now comes with
-  non-recursive matching functions which should help with some regular
-  expressions that ran into the stack limit. (Andrei)
+- Upgraded PCRE library to version 4.5. (Andrei)
 - Updated bundled PostgreSQL library to version 7.4 in Windows distribution.
   (Edin)
 - Added support for --program-prefix and --program-suffix configure options.
Index: php-src/ext/pcre/config.m4
diff -u php-src/ext/pcre/config.m4:1.29.2.4 php-src/ext/pcre/config.m4:1.29.2.5
--- php-src/ext/pcre/config.m4:1.29.2.4 Tue Dec 16 16:52:12 2003
+++ php-src/ext/pcre/config.m4  Tue Dec 16 17:14:55 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.29.2.4 2003/12/16 21:52:12 andrei Exp $
+dnl $Id: config.m4,v 1.29.2.5 2003/12/16 22:14:55 andrei Exp $
 dnl
 
 dnl By default we'll compile and link against the bundled PCRE library
@@ -50,7 +50,7 @@
 
 AC_DEFINE(HAVE_PCRE, 1, [ ])
 PHP_ADD_INCLUDE($PCRE_INCDIR)
-PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 
-DPOSIX_MALLOC_THRESHOLD=10 -DNO_RECURSE)
+PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2 
-DPOSIX_MALLOC_THRESHOLD=10)
   fi
   PHP_SUBST(PCRE_SHARED_LIBADD)
 fi

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



[PHP-CVS] cvs: php-src / NEWS /ext/standard datetime.c /ext/standard/tests/time date.phpt

2003-12-16 Thread Derick Rethans
derick  Tue Dec 16 17:52:49 2003 EDT

  Added files: 
/php-src/ext/standard/tests/timedate.phpt 

  Modified files:  
/php-src/ext/standard   datetime.c 
/php-srcNEWS 
  Log:
  - Added 'c' modifier to date() which returns the date in ISO 8601 format.
  
  
Index: php-src/ext/standard/datetime.c
diff -u php-src/ext/standard/datetime.c:1.111 php-src/ext/standard/datetime.c:1.112
--- php-src/ext/standard/datetime.c:1.111   Sun Sep 14 20:07:51 2003
+++ php-src/ext/standard/datetime.c Tue Dec 16 17:52:47 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: datetime.c,v 1.111 2003/09/15 00:07:51 iliaa Exp $ */
+/* $Id: datetime.c,v 1.112 2003/12/16 22:52:47 derick Exp $ */
 
 #include php.h
 #include zend_operators.h
@@ -331,6 +331,9 @@
case 'r':   /* rfc822 format */
size += 31;
break;
+   case 'c':   /* iso8601 date (Dublin Core Date) */
+   size += 25;
+   break;
case 'U':   /* seconds since the epoch */
size += 10;
break;
@@ -557,8 +560,8 @@
strcat(Z_STRVAL_P(return_value), tmp_buff);
break;
case 'r':
-#if HAVE_TM_GMTOFF 
-   sprintf(tmp_buff, %3s, %2d %3s %04d %02d:%02d:%02d 
%c%02d%02d, 
+#if HAVE_TM_GMTOFF
+   sprintf(tmp_buff, %3s, %2d %3s %04d %02d:%02d:%02d 
%c%02d%02d,
day_short_names[ta-tm_wday],
ta-tm_mday,
mon_short_names[ta-tm_mon],
@@ -571,7 +574,7 @@
abs( (ta-tm_gmtoff % 3600) / 60 )
);
 #else
-   sprintf(tmp_buff, %3s, %2d %3s %04d %02d:%02d:%02d 
%c%02d%02d, 
+   sprintf(tmp_buff, %3s, %2d %3s %04d %02d:%02d:%02d 
%c%02d%02d,
day_short_names[ta-tm_wday],
ta-tm_mday,
mon_short_names[ta-tm_mon],
@@ -586,6 +589,34 @@
 #endif
strcat(Z_STRVAL_P(return_value), tmp_buff);
break;
+   case 'c':
+#if HAVE_TM_GMTOFF
+   sprintf(tmp_buff, 
%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d,
+   ta-tm_year + YEAR_BASE,
+   ta-tm_mon + 1,
+   ta-tm_mday,
+   ta-tm_hour,
+   ta-tm_min,
+   ta-tm_sec,
+   (ta-tm_gmtoff  0) ? '-' : '+',
+   abs(ta-tm_gmtoff / 3600),
+   abs( (ta-tm_gmtoff % 3600) / 60 )
+   );
+#else
+   sprintf(tmp_buff, 
%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d,
+   ta-tm_year + YEAR_BASE,
+   ta-tm_mon + 1,
+   ta-tm_mday,
+   ta-tm_hour,
+   ta-tm_min,
+   ta-tm_sec,
+   ((ta-tm_isdst ? tzone - 3600 : tzone)  0) ? 
'-' : '+',
+   abs((ta-tm_isdst ? tzone - 3600 : tzone) / 
3600),
+   abs( ((ta-tm_isdst ? tzone - 3600 : tzone) % 
3600) / 60 )
+   );
+#endif
+   strcat(Z_STRVAL_P(return_value), tmp_buff);
+   break;
case 'W':   /* ISO-8601 week number of year, weeks 
starting on Monday */
wd = ta-tm_wday == 0 ? 6 : ta-tm_wday - 1; /* 
weekday */
yd = ta-tm_yday + 1;  
 /* days since January 1st */
Index: php-src/NEWS
diff -u php-src/NEWS:1.1539 php-src/NEWS:1.1540
--- php-src/NEWS:1.1539 Tue Dec 16 17:20:27 2003
+++ php-src/NEWSTue Dec 16 17:52:48 2003
@@ -8,6 +8,8 @@
   . ext/db (Jani, Derick)
   . ext/mcal (Jani, Derick)
   . ext/qtdom (Jani, Derick)
+- Added 'c' modifier to date() which returns the date in the ISO 8601 format.
+  (Derick, Manuzhai)
 - Added MacRoman encoding support to htmlentities(). (Derick, Marcus Bointon)
 - Added