[PHP-CVS] cvs: php4 /ext/informix ifx.ec

2003-02-27 Thread Corne' Cornelius
nobbie  Thu Feb 27 03:56:15 2003 EDT

  Modified files:  
/php4/ext/informix  ifx.ec 
  Log:
  - Fixed possible Segfault in ifx_errormsg() using malloc() instead of emalloc()
  
  
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.84 php4/ext/informix/ifx.ec:1.85
--- php4/ext/informix/ifx.ec:1.84   Tue Feb 25 01:59:13 2003
+++ php4/ext/informix/ifx.ecThu Feb 27 03:56:14 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: ifx.ec,v 1.84 2003/02/25 06:59:13 nobbie Exp $ */
+/* $Id: ifx.ec,v 1.85 2003/02/27 08:56:14 nobbie Exp $ */
 
 /* ---
  * if you want a function reference : grep '^\*\*' ifx.ec will give
@@ -1650,15 +1650,14 @@
break;
}
 
-   maxmsglen = 255;
+   maxmsglen = 10;
msglen = maxmsglen; /* Some bug fix, rgetlmsg doesnt always set the value 
*/
-   ifx_errmsg = (char *)malloc(maxmsglen + 1);
+   ifx_errmsg = (char *)emalloc(maxmsglen + 1);
if (ifx_errorcode != 0) {
rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen);
if (msglen  maxmsglen) {
-   maxmsglen = msglen + 1;
-   free(ifx_errmsg);
-   ifx_errmsg = (char *)malloc(maxmsglen + 1);
+   maxmsglen = msglen;
+   ifx_errmsg = (char *)erealloc(ifx_errmsg, maxmsglen + 1);
rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen);
}
} else {
@@ -1667,7 +1666,7 @@

returnmsg = (char *) emalloc(strlen(ifx_errmsg) + 128);
sprintf(returnmsg, ifx_errmsg, sqlca.sqlerrm);
-   free(ifx_errmsg);
+   efree(ifx_errmsg);
RETURN_STRING(returnmsg,0); 
 }
 /* }}} */



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



[PHP-CVS] cvs: php4(PHP_4_3) /ext/informix ifx.ec

2003-02-27 Thread Corne' Cornelius
nobbie  Thu Feb 27 04:00:56 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/informix  ifx.ec 
  Log:
  - MFH: Segfault in ifx_errormsg()
  
  
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.69.2.11 php4/ext/informix/ifx.ec:1.69.2.12
--- php4/ext/informix/ifx.ec:1.69.2.11  Tue Feb 25 02:09:09 2003
+++ php4/ext/informix/ifx.ecThu Feb 27 04:00:51 2003
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: ifx.ec,v 1.69.2.11 2003/02/25 07:09:09 nobbie Exp $ */
+/* $Id: ifx.ec,v 1.69.2.12 2003/02/27 09:00:51 nobbie Exp $ */
 
 /* ---
  * if you want a function reference : grep '^\*\*' ifx.ec will give
@@ -1652,13 +1652,12 @@
 
maxmsglen = 255;
msglen = maxmsglen; /* Some bug fix, rgetlmsg doesnt always set the value 
*/
-   ifx_errmsg = (char *)malloc(maxmsglen + 1);
+   ifx_errmsg = (char *)emalloc(maxmsglen + 1);
if (ifx_errorcode != 0) {
rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen);
if (msglen  maxmsglen) {
-   maxmsglen = msglen + 1;
-   free(ifx_errmsg);
-   ifx_errmsg = (char *)malloc(maxmsglen + 1);
+   maxmsglen = msglen;
+   ifx_errmsg = (char *)erealloc(ifx_errmsg, maxmsglen + 1);
rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, msglen);
}
} else {
@@ -1667,7 +1666,7 @@

returnmsg = (char *) emalloc(strlen(ifx_errmsg) + 128);
sprintf(returnmsg, ifx_errmsg, sqlca.sqlerrm);
-   free(ifx_errmsg);
+   efree(ifx_errmsg);
RETURN_STRING(returnmsg,0); 
 }
 /* }}} */



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



[PHP-CVS] cvs: php4 /main php_streams.h

2003-02-27 Thread Sascha Schumann
sas Thu Feb 27 05:07:12 2003 EDT

  Modified files:  
/php4/main  php_streams.h 
  Log:
  rename macro argument so that it does not partially match the string.
  
  fixes a warning on unixware
  
  
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.73 php4/main/php_streams.h:1.74
--- php4/main/php_streams.h:1.73Mon Feb 24 20:39:06 2003
+++ php4/main/php_streams.h Thu Feb 27 05:07:12 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.73 2003/02/25 01:39:06 iliaa Exp $ */
+/* $Id: php_streams.h,v 1.74 2003/02/27 10:07:12 sas Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -234,8 +234,8 @@
 # define php_stream_to_zval(stream, zval)  { ZVAL_RESOURCE(zval, 
(stream)-rsrc_id); }
 #endif
 
-#define php_stream_from_zval(str, ppzval)  ZEND_FETCH_RESOURCE2((str), php_stream 
*, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
-#define php_stream_from_zval_no_verify(str, ppzval)(str) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval(xstr, ppzval) ZEND_FETCH_RESOURCE2((xstr), 
php_stream *, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval_no_verify(xstr, ppzval)   (xstr) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
 
 PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream 
**stream TSRMLS_DC);
 #define PHP_STREAM_PERSISTENT_SUCCESS  0 /* id exists */



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



[PHP-CVS] cvs: php4(PHP_4) /main php_streams.h

2003-02-27 Thread Sascha Schumann
sas Thu Feb 27 05:07:46 2003 EDT

  Modified files:  (Branch: PHP_4)
/php4/main  php_streams.h 
  Log:
  MFH
  
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.61.2.6 php4/main/php_streams.h:1.61.2.6.2.1
--- php4/main/php_streams.h:1.61.2.6Thu Jan  2 08:31:30 2003
+++ php4/main/php_streams.h Thu Feb 27 05:07:46 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.61.2.6 2003/01/02 13:31:30 derick Exp $ */
+/* $Id: php_streams.h,v 1.61.2.6.2.1 2003/02/27 10:07:46 sas Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -318,8 +318,8 @@
 # define php_stream_to_zval(stream, zval)  { ZVAL_RESOURCE(zval, 
(stream)-rsrc_id); }
 #endif
 
-#define php_stream_from_zval(str, ppzval)  ZEND_FETCH_RESOURCE2((str), php_stream 
*, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
-#define php_stream_from_zval_no_verify(str, ppzval)(str) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval(xstr, ppzval) ZEND_FETCH_RESOURCE2((xstr), 
php_stream *, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval_no_verify(xstr, ppzval)   (xstr) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
 
 PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream 
**stream TSRMLS_DC);
 #define PHP_STREAM_PERSISTENT_SUCCESS  0 /* id exists */



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



[PHP-CVS] cvs: php4(PHP_4_3) /main php_streams.h

2003-02-27 Thread Sascha Schumann
sas Thu Feb 27 05:07:59 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/main  php_streams.h 
  Log:
  MFH
  
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.61.2.7 php4/main/php_streams.h:1.61.2.8
--- php4/main/php_streams.h:1.61.2.7Fri Feb 21 21:43:58 2003
+++ php4/main/php_streams.h Thu Feb 27 05:07:59 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.61.2.7 2003/02/22 02:43:58 wez Exp $ */
+/* $Id: php_streams.h,v 1.61.2.8 2003/02/27 10:07:59 sas Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -318,8 +318,8 @@
 # define php_stream_to_zval(stream, zval)  { ZVAL_RESOURCE(zval, 
(stream)-rsrc_id); }
 #endif
 
-#define php_stream_from_zval(str, ppzval)  ZEND_FETCH_RESOURCE2((str), php_stream 
*, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
-#define php_stream_from_zval_no_verify(str, ppzval)(str) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval(xstr, ppzval) ZEND_FETCH_RESOURCE2((xstr), 
php_stream *, (ppzval), -1, stream, php_file_le_stream(), php_file_le_pstream())
+#define php_stream_from_zval_no_verify(xstr, ppzval)   (xstr) = 
(php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, stream, NULL, 2, 
php_file_le_stream(), php_file_le_pstream())
 
 PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream 
**stream TSRMLS_DC);
 #define PHP_STREAM_PERSISTENT_SUCCESS  0 /* id exists */



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



[PHP-CVS] cvs: php4 /ext/yp yp.c

2003-02-27 Thread Hartmut Holzgraefe
hholzgraThu Feb 27 05:21:32 2003 EDT

  Modified files:  
/php4/ext/ypyp.c 
  Log:
  changed from strncpy to strlcpy on request 
  
  
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.36 php4/ext/yp/yp.c:1.37
--- php4/ext/yp/yp.c:1.36   Wed Feb 26 11:06:06 2003
+++ php4/ext/yp/yp.cThu Feb 27 05:21:31 2003
@@ -16,7 +16,7 @@
|  Fredrik Ohrn|
+--+
  */
-/* $Id: yp.c,v 1.36 2003/02/26 16:06:06 hholzgra Exp $ */
+/* $Id: yp.c,v 1.37 2003/02/27 10:21:31 hholzgra Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -298,8 +298,7 @@
if (inkeylen) {
char *key = emalloc(inkeylen+1);
if(key) {
-   strncpy(key, inkey, inkeylen);
-   key[inkeylen] = '\0';
+   strlcpy(key, inkey, inkeylen+1);
add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, 
inval, invallen, 1);
efree(key);
} else {



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



Re: [PHP-CVS] cvs: php4 /ext/gd php_gd.h

2003-02-27 Thread Jani Taskinen

Don't forget to add this to NEWS file too..

--Jani


On Wed, 26 Feb 2003, Pierre-Alain Joye wrote:

pajoye Wed Feb 26 18:21:45 2003 EDT

  Modified files:  
/php4/ext/gd   php_gd.h 
  Log:
  add imagesavealpha wrapper (Jukka Holappa [EMAIL PROTECTED],
  Pierre-Alain Joye)
  
  
Index: php4/ext/gd/php_gd.h
diff -u php4/ext/gd/php_gd.h:1.51 php4/ext/gd/php_gd.h:1.52
--- php4/ext/gd/php_gd.h:1.51  Sat Jan 25 20:15:02 2003
+++ php4/ext/gd/php_gd.h   Wed Feb 26 18:21:44 2003
@@ -1,4 +1,4 @@
-/* 
+/*
+--+
| PHP Version 4|
+--+
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.51 2003/01/26 01:15:02 pollita Exp $ */
+/* $Id: php_gd.h,v 1.52 2003/02/26 23:21:44 pajoye Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -93,6 +93,7 @@
 PHP_FUNCTION(imagefilledellipse);
 PHP_FUNCTION(imagefilledarc);
 PHP_FUNCTION(imagealphablending);
+PHP_FUNCTION(imagesavealpha);
 PHP_FUNCTION(imagecolorallocatealpha);
 PHP_FUNCTION(imagecolorresolvealpha);
 PHP_FUNCTION(imagecolorclosestalpha);





-- 
- For Sale! -


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



Re: [PHP-CVS] cvs: php4 /ext/yp yp.c

2003-02-27 Thread Jani Taskinen

MFH!

On Thu, 27 Feb 2003, Hartmut Holzgraefe wrote:

hholzgra   Thu Feb 27 05:21:32 2003 EDT

  Modified files:  
/php4/ext/yp   yp.c 
  Log:
  changed from strncpy to strlcpy on request 
  
  
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.36 php4/ext/yp/yp.c:1.37
--- php4/ext/yp/yp.c:1.36  Wed Feb 26 11:06:06 2003
+++ php4/ext/yp/yp.c   Thu Feb 27 05:21:31 2003
@@ -16,7 +16,7 @@
|  Fredrik Ohrn|
+--+
  */
-/* $Id: yp.c,v 1.36 2003/02/26 16:06:06 hholzgra Exp $ */
+/* $Id: yp.c,v 1.37 2003/02/27 10:21:31 hholzgra Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -298,8 +298,7 @@
   if (inkeylen) {
   char *key = emalloc(inkeylen+1);
   if(key) {
-  strncpy(key, inkey, inkeylen);
-  key[inkeylen] = '\0';
+  strlcpy(key, inkey, inkeylen+1);
   add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, 
 inval, invallen, 1);
   efree(key);
   } else {





-- 
- For Sale! -


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



Re: [PHP-CVS] cvs: php4 /ext/gd php_gd.h

2003-02-27 Thread Pierre-Alain Joye
On Thu, 27 Feb 2003 17:42:06 +0200 (EET)
Jani Taskinen [EMAIL PROTECTED] wrote:

 
 Don't forget to add this to NEWS file too..

I do not have write permission to this part of the tree.

pierre

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



[PHP-CVS] cvs: php4 / NEWS

2003-02-27 Thread Jani Taskinen
sniper  Thu Feb 27 10:52:39 2003 EDT

  Modified files:  
/php4   NEWS 
  Log:
  ..if only all lakes were kossu..
  
Index: php4/NEWS
diff -u php4/NEWS:1.1360 php4/NEWS:1.1361
--- php4/NEWS:1.1360Wed Feb 26 20:44:34 2003
+++ php4/NEWS   Thu Feb 27 10:52:38 2003
@@ -1,10 +1,6 @@
 PHP 4  NEWS
 |||
 ? ? ??? 200?, Version 5.0.0
-- Added an extra ini setting (mail_force_extra_paramaters) which forces
-  the addition of the specified parameters to be passed as extra
-  parameters to the sendmail binary. These parameters will always replace
-  the value of the 5th parameter to mail(), even in safe mode. (Derick)
 - Moved extensions to PECL (http://pear.php.net/): (James, Tal)
   . ext/fribidi
 - Fixed bug #21600 (Assign by reference function call changes variable contents).
@@ -21,9 +17,13 @@
 - Changed array_search() to accept also objects as a needle. (Moriyoshi)
 - Changed ext/mcrypt to require libmcrypt version 2.5.6 or greater. (Derick)
 - Changed uniqid() parameters to be optional and allow any prefix length. (Marcus)
+- Added mail_force_extra_paramaters php.ini option which forces the addition 
+  of the specified parameters to be passed as extra parameters to the sendmail 
+  binary. These parameters will always replace the value of the 5th parameter
+  to mail(), even in safe mode. (Derick)
 - Added DBA handler 'inifile' to support ini files. (Marcus)
 - Added filter support. See README.input_filter. (Rasmus)
-- Added session.hash_function and session.hash_bits_per_character. (Sascha)
+- Added session.hash_function and session.hash_bits_per_character. (Sascha)
 - Added lightweight streaming input abstraction to the Zend Engine scanners
   that provides uniform support for include()'ing data from PHP streams across
   all platforms (Wez, Zend Engine).
@@ -60,6 +60,7 @@
   . Detection of numeric values inside strings passed as high  low.
   . Proper handle the situations where high == low.
 - Added XBM support for bundled GD library. (Marcus)
+- Added imagesavealpha() function. (Jukka Holappa, Pierre-Alain Joye)
 - Added imagefilter() function. Allows application of various filters.
   Only available with bundled GD. (Pierre-Alain Joye, Ilia)
 - Added imageistruecolor(). Only available with GD2. (Pierre-Alain Joye)



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



[PHP-CVS] cvs: php4 /ext/standard filestat.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 11:41:24 2003 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  Fixed bug #21410 (fixed handling of NULL or  files on Win32)
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.119 php4/ext/standard/filestat.c:1.120
--- php4/ext/standard/filestat.c:1.119  Sat Feb  8 22:49:41 2003
+++ php4/ext/standard/filestat.cThu Feb 27 11:41:23 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.119 2003/02/09 03:49:41 shane Exp $ */
+/* $Id: filestat.c,v 1.120 2003/02/27 16:41:23 iliaa Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -563,6 +563,10 @@
int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to 
other */
char *stat_sb_names[13]={dev, ino, mode, nlink, uid, gid, rdev,
  size, atime, mtime, ctime, blksize, blocks};
+
+   if (!filename_length) {
+   RETURN_FALSE;
+   }
 
if (PG(safe_mode) (!php_checkuid_ex(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) {
RETURN_FALSE;



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



[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard filestat.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 11:41:44 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  filestat.c 
  Log:
  MFH
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.112.2.3 php4/ext/standard/filestat.c:1.112.2.4
--- php4/ext/standard/filestat.c:1.112.2.3  Thu Jan  9 17:29:02 2003
+++ php4/ext/standard/filestat.cThu Feb 27 11:41:44 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.112.2.3 2003/01/09 22:29:02 pollita Exp $ */
+/* $Id: filestat.c,v 1.112.2.4 2003/02/27 16:41:44 iliaa Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -563,6 +563,10 @@
int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to 
other */
char *stat_sb_names[13]={dev, ino, mode, nlink, uid, gid, rdev,
  size, atime, mtime, ctime, blksize, blocks};
+
+   if (!filename_length) {
+   RETURN_FALSE;
+   }
 
if (PG(safe_mode) (!php_checkuid_ex(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) {
RETURN_FALSE;



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



[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 11:42:43 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  Bug fixing news.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.114 php4/NEWS:1.1247.2.115
--- php4/NEWS:1.1247.2.114  Tue Feb 25 13:56:53 2003
+++ php4/NEWS   Thu Feb 27 11:42:42 2003
@@ -94,6 +94,7 @@
   get_browser()). (Ilia)
 - Fixed bug #21442 (crash in mail() on Windows when 1st parameter is empty). 
   (Edin)
+- Fixed bug #21410 (fixed handling of NULL or  files on Win32). (Ilia)
 - Fixed bug #21378 (COM code crashes after update 4.2.1 to 4.3.0). (Harald)
 - Fixed bug #21338 (html_entity_decode() crashed when  is passed). (Ilia)
 - Fixed bug #21297 (in CLI/CGI sapis on the #! it would leave a \n when the



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



Re: [PHP-CVS] cvs: php4 /ext/standard exec.c exec.h

2003-02-27 Thread Jani Taskinen

Shouldn't this be MFH'd ?

--Jani


On Wed, 26 Feb 2003, Ilia Alshanetsky wrote:

iliaa  Wed Feb 26 17:11:12 2003 EDT

  Modified files:  
/php4/ext/standard exec.c exec.h 
  Log:
  1) Make the output of system() binary safe
  2) Solved a memory leak when the return_value variable passed by reference is 
 not an integer in system()/exec()/passthru().
  3) Solved a bug in exec(), which would make it append to the 2nd parameter 
 (passed by reference) if the parameter is an array instead of overwriting it.
  4) Changed the code to use the streams code, resulting in a smaller code base.
  5) Various cleanups resulting in reduction of overall code base inside the file 
 by ~ 1/3.
  6) Speed improvements of ~2.5 times compared to previous performance (based on 
 attached PHP script).
  
  

-- 
- For Sale! -


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



[PHP-CVS] cvs: php4 /main network.c /main/streams transports.c xp_socket.c /win32 php4dllts.dsp

2003-02-27 Thread Wez Furlong
wez Thu Feb 27 13:06:32 2003 EDT

  Modified files:  
/php4/main  network.c 
/php4/main/streams  transports.c xp_socket.c 
/php4/win32 php4dllts.dsp 
  Log:
  Fixup build for win32
  
Index: php4/main/network.c
diff -u php4/main/network.c:1.91 php4/main/network.c:1.92
--- php4/main/network.c:1.91Thu Feb 27 12:43:37 2003
+++ php4/main/network.c Thu Feb 27 13:06:30 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.91 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: network.c,v 1.92 2003/02/27 18:06:30 wez Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -93,6 +93,7 @@
 #include ext/standard/file.h
 
 #ifdef PHP_WIN32
+# include win32/time.h
 # define SOCK_ERR INVALID_SOCKET
 # define SOCK_CONN_ERR SOCKET_ERROR
 # define PHP_TIMEOUT_ERROR_VALUE   WSAETIMEDOUT
@@ -336,7 +337,7 @@
wset = rset;
 
if ((n = select(sockfd + 1, rset, wset, eset, timeout)) == 0) {
-   error = ETIMEDOUT;
+   error = PHP_TIMEOUT_ERROR_VALUE;
}
 
if(FD_ISSET(sockfd, rset) || FD_ISSET(sockfd, wset)) {
Index: php4/main/streams/transports.c
diff -u php4/main/streams/transports.c:1.1 php4/main/streams/transports.c:1.2
--- php4/main/streams/transports.c:1.1  Thu Feb 27 12:43:38 2003
+++ php4/main/streams/transports.c  Thu Feb 27 13:06:30 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: transports.c,v 1.1 2003/02/27 17:43:38 wez Exp $ */
+/* $Id: transports.c,v 1.2 2003/02/27 18:06:30 wez Exp $ */
 
 #include php.h
 #include php_streams_int.h
@@ -78,6 +78,7 @@
case PHP_STREAM_PERSISTENT_FAILURE:
default:
/* failed; get a new one */
+   ;
}
}
 
Index: php4/main/streams/xp_socket.c
diff -u php4/main/streams/xp_socket.c:1.1 php4/main/streams/xp_socket.c:1.2
--- php4/main/streams/xp_socket.c:1.1   Thu Feb 27 12:43:38 2003
+++ php4/main/streams/xp_socket.c   Thu Feb 27 13:06:30 2003
@@ -16,13 +16,17 @@
   +--+
 */
 
-/* $Id: xp_socket.c,v 1.1 2003/02/27 17:43:38 wez Exp $ */
+/* $Id: xp_socket.c,v 1.2 2003/02/27 18:06:30 wez Exp $ */
 
 #include php.h
 #include ext/standard/file.h
 #include streams/php_streams_int.h
 #include php_network.h
 
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
+# undef AF_UNIX
+#endif
+
 #if defined(AF_UNIX)
 #include sys/un.h
 #endif
@@ -429,6 +433,7 @@
return PHP_STREAM_OPTION_RETURN_OK;
default:
/* fall through */
+   ;
}

/* fall through */
Index: php4/win32/php4dllts.dsp
diff -u php4/win32/php4dllts.dsp:1.106 php4/win32/php4dllts.dsp:1.107
--- php4/win32/php4dllts.dsp:1.106  Fri Feb 21 09:06:55 2003
+++ php4/win32/php4dllts.dspThu Feb 27 13:06:31 2003
@@ -2202,6 +2202,38 @@
 # Begin Group Streams
 
 # PROP Default_Filter 
+# Begin Group streams headers
+
+# PROP Default_Filter 
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_context.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_filter_api.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_mmap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_plain_wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_transport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_stream_userspace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\php_streams_int.h
+# End Source File
+# End Group
 # Begin Source File
 
 SOURCE=..\main\streams\cast.c
@@ -2216,6 +2248,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\main\streams\mmap.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\main\streams\plain_wrapper.c
 # End Source File
 # Begin Source File
@@ -2224,11 +2260,19 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\main\streams\transports.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\ext\standard\user_filters.c
 # End Source File
 # Begin Source File
 
 SOURCE=..\main\streams\userspace.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\main\streams\xp_socket.c
 # End Source File
 # End Group
 # Begin Source File



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



[PHP-CVS] cvs: php4 /ext/openssl openssl.c /ext/standard basic_functions.c file.c ftp_fopen_wrapper.c http_fopen_wrapper.c php_fopen_wrappers.h

2003-02-27 Thread Wez Furlong
wez Thu Feb 27 13:16:35 2003 EDT

  Modified files:  
/php4/ext/openssl   openssl.c 
/php4/ext/standard  basic_functions.c file.c ftp_fopen_wrapper.c 
http_fopen_wrapper.c php_fopen_wrappers.h 
  Log:
  - Move https:// and ftps:// wrapper registration into the openssl module.
  - Expose the http:// and ftp:// wrappers as PHPAPI
  - Remove unused variables
  
  
  
Index: php4/ext/openssl/openssl.c
diff -u php4/ext/openssl/openssl.c:1.66 php4/ext/openssl/openssl.c:1.67
--- php4/ext/openssl/openssl.c:1.66 Thu Feb 27 12:43:36 2003
+++ php4/ext/openssl/openssl.c  Thu Feb 27 13:16:34 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.66 2003/02/27 17:43:36 wez Exp $ */
+/* $Id: openssl.c,v 1.67 2003/02/27 18:16:34 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -30,6 +30,7 @@
 /* PHP Includes */
 #include ext/standard/file.h
 #include ext/standard/info.h
+#include ext/standard/php_fopen_wrappers.h
 
 /* OpenSSL includes */
 #include openssl/evp.h
@@ -614,6 +615,9 @@
 
/* override the default tcp socket provider */
php_stream_xport_register(tcp, php_openssl_ssl_socket_factory TSRMLS_CC);
+
+   php_register_url_stream_wrapper(https, php_stream_http_wrapper TSRMLS_CC);
+   php_register_url_stream_wrapper(ftps, php_stream_ftp_wrapper TSRMLS_CC);

return SUCCESS;
 }
@@ -635,6 +639,9 @@
 PHP_MSHUTDOWN_FUNCTION(openssl)
 {
EVP_cleanup();
+
+   php_unregister_url_stream_wrapper(https TSRMLS_CC);
+   php_unregister_url_stream_wrapper(ftps TSRMLS_CC);
 
php_stream_xport_unregister(ssl TSRMLS_CC);
php_stream_xport_unregister(tls TSRMLS_CC);
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.590 
php4/ext/standard/basic_functions.c:1.591
--- php4/ext/standard/basic_functions.c:1.590   Thu Feb 27 12:43:37 2003
+++ php4/ext/standard/basic_functions.c Thu Feb 27 13:16:34 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.590 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: basic_functions.c,v 1.591 2003/02/27 18:16:34 wez Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1107,10 +1107,6 @@
 #ifndef PHP_CURL_URL_WRAPPERS
php_register_url_stream_wrapper(http, php_stream_http_wrapper TSRMLS_CC);
php_register_url_stream_wrapper(ftp, php_stream_ftp_wrapper TSRMLS_CC);
-# if HAVE_OPENSSL_EXT
-   php_register_url_stream_wrapper(https, php_stream_http_wrapper TSRMLS_CC);
-   php_register_url_stream_wrapper(ftps, php_stream_ftp_wrapper TSRMLS_CC);
-# endif
 #endif
 
 #if HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE))
@@ -1135,10 +1131,6 @@
 #ifndef PHP_CURL_URL_WRAPPERS
php_unregister_url_stream_wrapper(http TSRMLS_CC);
php_unregister_url_stream_wrapper(ftp TSRMLS_CC);
-# if HAVE_OPENSSL_EXT
-   php_unregister_url_stream_wrapper(https TSRMLS_CC);
-   php_unregister_url_stream_wrapper(ftps TSRMLS_CC);
-# endif
 #endif
 
UNREGISTER_INI_ENTRIES();
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.316 php4/ext/standard/file.c:1.317
--- php4/ext/standard/file.c:1.316  Thu Feb 27 12:43:37 2003
+++ php4/ext/standard/file.cThu Feb 27 13:16:34 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.316 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: file.c,v 1.317 2003/02/27 18:16:34 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -2246,8 +2246,6 @@
 PHP_NAMED_FUNCTION(php_if_ftruncate)
 {
zval **fp , **size;
-   short int ret;
-   int fd;
php_stream *stream;
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, fp, size) == FAILURE) {
Index: php4/ext/standard/ftp_fopen_wrapper.c
diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.46 
php4/ext/standard/ftp_fopen_wrapper.c:1.47
--- php4/ext/standard/ftp_fopen_wrapper.c:1.46  Thu Feb 27 12:43:37 2003
+++ php4/ext/standard/ftp_fopen_wrapper.c   Thu Feb 27 13:16:34 2003
@@ -17,7 +17,7 @@
|  Hartmut Holzgraefe [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.46 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.47 2003/02/27 18:16:34 wez Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -123,7 +123,7 @@
FTP
 };
 
-php_stream_wrapper php_stream_ftp_wrapper ={
+PHPAPI php_stream_wrapper php_stream_ftp_wrapper = {
ftp_stream_wops,
NULL,
1 /* is_url */
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.67 
php4/ext/standard/http_fopen_wrapper.c:1.68
--- php4/ext/standard/http_fopen_wrapper.c:1.67 Thu Feb 27 

[PHP-CVS] cvs: php4 / TODO

2003-02-27 Thread Wez Furlong
wez Thu Feb 27 13:23:50 2003 EDT

  Modified files:  
/php4   TODO 
  Log:
  Update todo slightly
  
  
Index: php4/TODO
diff -u php4/TODO:1.138 php4/TODO:1.139
--- php4/TODO:1.138 Mon Dec  2 11:38:22 2002
+++ php4/TODO   Thu Feb 27 13:23:50 2003
@@ -24,9 +24,7 @@
 
 global
 --
-For PHP 4.3.0:
-* Change PHP error messages, so that they point to pages or sections 
-  in the PHP Manual.   
+For PHP 5.0.0
 * Make sure that all ZTS globals get destructed. Most ts_allocate_id()
   calls should have a dtor entry.
 * on some platforms unimplemented function will just do nothing 
@@ -35,8 +33,6 @@
 * Use arg_separator.input to implode args in the CGI sapi extension
   and arg_separator.input to explode in php_build_argv(). (DONE?)
 * Implement flush feature suitable for nested output buffers.
-
-For PHP 5.0.0
 * bundle and use curl lib for fopen wrapper.
 * --enable-all in configure. (--enable-shared=max ...)
 * make configure print out a summary when it's done (like XEmacs)
@@ -50,7 +46,6 @@
 * Move most extensions and PEAR packages out of the PHP CVS tree,
   include them again during release packaging.
 
-
 Other
 * use thread-safe resolver functions (either require BIND 8 or adns).
 * implement javadoc based function docs template system.
@@ -58,7 +53,6 @@
 * find a better way to implement script timeouts. SIGVTALRM is used
   by some POSIX threads implementations (i.e. OpenBSD) and is not
   available in ZTS mode.
-
 
 documentation
 -



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



[PHP-CVS] cvs: php4 / TODO-PHP5

2003-02-27 Thread Rasmus Lerdorf
rasmus  Thu Feb 27 13:45:37 2003 EDT

  Modified files:  
/php4   TODO-PHP5 
  Log:
  The basic input filtering framework is done and working nicely
  
  
Index: php4/TODO-PHP5
diff -u php4/TODO-PHP5:1.1 php4/TODO-PHP5:1.2
--- php4/TODO-PHP5:1.1  Thu Jan 23 18:22:01 2003
+++ php4/TODO-PHP5  Thu Feb 27 13:45:37 2003
@@ -128,8 +128,8 @@
 Component:  Input Filtering
 - Implement a SAPI input filter hook that will get called
   just before registering a variable in the 
-  treat_data/post_handler hooks.
-- Make sure this is also done in mbstring
+  treat_data/post_handler hooks.  (done)
+- Make sure this is also done in mbstring  (done)
 - Provide access functions, or perhaps a new 
   $_RAW_GET/POST/Cookie set of superglobals to get at the
   unfiltered data



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



Re: [PHP-CVS] cvs: php4 / TODO-PHP5

2003-02-27 Thread Derick Rethans
On Thu, 27 Feb 2003, Rasmus Lerdorf wrote:

 rasmusThu Feb 27 13:45:37 2003 EDT
 
   Modified files:  
 /php4 TODO-PHP5 
   Log:
   The basic input filtering framework is done and working nicely

Interesting, are there any docs on this, or a simple example on how to 
use it?

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-CVS] cvs: php4 / TODO-PHP5

2003-02-27 Thread Rasmus Lerdorf
On Thu, 27 Feb 2003, Derick Rethans wrote:

 On Thu, 27 Feb 2003, Rasmus Lerdorf wrote:
 
  rasmus  Thu Feb 27 13:45:37 2003 EDT
  
Modified files:  
  /php4   TODO-PHP5 
Log:
The basic input filtering framework is done and working nicely
 
 Interesting, are there any docs on this, or a simple example on how to 
 use it?

Of course.  I checked in the docs when I checked in the code.  See 
README.input_filter

-Rasmus


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



[PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h /main/streams xp_socket.c

2003-02-27 Thread Wez Furlong
wez Thu Feb 27 14:10:24 2003 EDT

  Modified files:  
/php4/ext/standard  file.c 
/php4/main  php_streams.h 
/php4/main/streams  xp_socket.c 
  Log:
  Add a generic meta data api for streams.
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.317 php4/ext/standard/file.c:1.318
--- php4/ext/standard/file.c:1.317  Thu Feb 27 13:16:34 2003
+++ php4/ext/standard/file.cThu Feb 27 14:10:22 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.317 2003/02/27 18:16:34 wez Exp $ */
+/* $Id: file.c,v 1.318 2003/02/27 19:10:22 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -646,22 +646,12 @@
 #endif

add_assoc_long(return_value, unread_bytes, stream-writepos - 
stream-readpos);
-   
-#if 0
-   if (php_stream_is(stream, PHP_STREAM_IS_SOCKET)){
-   php_netstream_data_t *sock = PHP_NETSTREAM_DATA_FROM_STREAM(stream);
-
-   add_assoc_bool(return_value, timed_out, sock-timeout_event);
-   add_assoc_bool(return_value, blocked, sock-is_blocked);
-   add_assoc_bool(return_value, eof, stream-eof);
-   } else {
-#endif
+
+   if (!php_stream_populate_meta_data(stream, return_value)) {
add_assoc_bool(return_value, timed_out, 0);
add_assoc_bool(return_value, blocked, 1);
add_assoc_bool(return_value, eof, php_stream_eof(stream));
-#if 0
}
-#endif
 
 }
 /* }}} */
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.75 php4/main/php_streams.h:1.76
--- php4/main/php_streams.h:1.75Thu Feb 27 12:43:37 2003
+++ php4/main/php_streams.h Thu Feb 27 14:10:23 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.75 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: php_streams.h,v 1.76 2003/02/27 19:10:23 wez Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -348,6 +348,9 @@
 
 PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize 
TSRMLS_DC);
 #define php_stream_truncate_set_size(stream, size) 
_php_stream_truncate_set_size((stream), (size) TSRMLS_CC)
+
+#define PHP_STREAM_OPTION_META_DATA_API11 /* ptrparam is a zval* to 
which to add meta data information */
+#define php_stream_populate_meta_data(stream, zv)  
(_php_stream_set_option((stream), PHP_STREAM_OPTION_META_DATA_API, 0, zv TSRMLS_CC) == 
PHP_STREAM_OPTION_RETURN_OK ? 1 : 0)
 
 #define PHP_STREAM_OPTION_RETURN_OK 0 /* option set OK */
 #define PHP_STREAM_OPTION_RETURN_ERR   -1 /* problem setting option */
Index: php4/main/streams/xp_socket.c
diff -u php4/main/streams/xp_socket.c:1.2 php4/main/streams/xp_socket.c:1.3
--- php4/main/streams/xp_socket.c:1.2   Thu Feb 27 13:06:30 2003
+++ php4/main/streams/xp_socket.c   Thu Feb 27 14:10:24 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: xp_socket.c,v 1.2 2003/02/27 18:06:30 wez Exp $ */
+/* $Id: xp_socket.c,v 1.3 2003/02/27 19:10:24 wez Exp $ */
 
 #include php.h
 #include ext/standard/file.h
@@ -201,6 +201,12 @@
case PHP_STREAM_OPTION_READ_TIMEOUT:
sock-timeout = *(struct timeval*)ptrparam;
sock-timeout_event = 0;
+   return PHP_STREAM_OPTION_RETURN_OK;
+
+   case PHP_STREAM_OPTION_META_DATA_API:
+   add_assoc_bool((zval *)ptrparam, timed_out, 
sock-timeout_event);
+   add_assoc_bool((zval *)ptrparam, blocked, sock-is_blocked);
+   add_assoc_bool((zval *)ptrparam, eof, stream-eof);
return PHP_STREAM_OPTION_RETURN_OK;

case PHP_STREAM_OPTION_XPORT_API:



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



[PHP-CVS] cvs: php4 /ext/standard filestat.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 15:38:01 2003 EDT

  Modified files:  
/php4/ext/standard  filestat.c 
  Log:
  Fixed a bug that would cause filetype() to return unknown for 
  non-existent files on Win32.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.120 php4/ext/standard/filestat.c:1.121
--- php4/ext/standard/filestat.c:1.120  Thu Feb 27 11:41:23 2003
+++ php4/ext/standard/filestat.cThu Feb 27 15:38:00 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.120 2003/02/27 16:41:23 iliaa Exp $ */
+/* $Id: filestat.c,v 1.121 2003/02/27 20:38:00 iliaa Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -608,9 +608,10 @@
}
efree(BG(CurrentStatFile));
BG(CurrentStatFile) = NULL;
-   if (!IS_LINK_OPERATION(type)) { /* Don't require success for 
link operation */
+#if HAVE_SYMLINK
+   if (!IS_LINK_OPERATION(type))  /* Don't require success for 
link operation */
+#endif
RETURN_FALSE;
-   }
}
}
 



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



[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard filestat.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 15:38:23 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  filestat.c 
  Log:
  MFH
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.112.2.4 php4/ext/standard/filestat.c:1.112.2.5
--- php4/ext/standard/filestat.c:1.112.2.4  Thu Feb 27 11:41:44 2003
+++ php4/ext/standard/filestat.cThu Feb 27 15:38:22 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.112.2.4 2003/02/27 16:41:44 iliaa Exp $ */
+/* $Id: filestat.c,v 1.112.2.5 2003/02/27 20:38:22 iliaa Exp $ */
 
 #include php.h
 #include safe_mode.h
@@ -611,9 +611,10 @@
}
efree(BG(CurrentStatFile));
BG(CurrentStatFile) = NULL;
-   if (!IS_LINK_OPERATION(type)) { /* Don't require success for 
link operation */
+#if HAVE_SYMLINK
+   if (!IS_LINK_OPERATION(type))  /* Don't require success for 
link operation */
+#endif
RETURN_FALSE;
-   }
}
}
 



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



[PHP-CVS] cvs: php4 /ext/openssl xp_ssl.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 18:50:54 2003 EDT

  Modified files:  
/php4/ext/openssl   xp_ssl.c 
  Log:
  fixed compiler warnings.
  
  
Index: php4/ext/openssl/xp_ssl.c
diff -u php4/ext/openssl/xp_ssl.c:1.1 php4/ext/openssl/xp_ssl.c:1.2
--- php4/ext/openssl/xp_ssl.c:1.1   Thu Feb 27 12:43:36 2003
+++ php4/ext/openssl/xp_ssl.c   Thu Feb 27 18:50:54 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: xp_ssl.c,v 1.1 2003/02/27 17:43:36 wez Exp $ */
+/* $Id: xp_ssl.c,v 1.2 2003/02/27 23:50:54 iliaa Exp $ */
 
 #include php.h
 #include ext/standard/file.h
@@ -372,11 +372,14 @@
case STREAM_XPORT_CRYPTO_OP_SETUP:
cparam-outputs.returncode = 
php_openssl_setup_crypto(stream, sslsock, cparam TSRMLS_CC);
return PHP_STREAM_OPTION_RETURN_OK;
+   break;
case STREAM_XPORT_CRYPTO_OP_ENABLE:
cparam-outputs.returncode = 
php_openssl_enable_crypto(stream, sslsock, cparam TSRMLS_CC);
return PHP_STREAM_OPTION_RETURN_OK;
+   break;
default:
/* fall through */
+   break;
}
 
break;
@@ -398,8 +401,10 @@
}
}
return PHP_STREAM_OPTION_RETURN_OK;
+   break;
default:
/* fall through */
+   break;
}
}
 



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



[PHP-CVS] cvs: php4 /ext/standard dir.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 18:53:55 2003 EDT

  Modified files:  
/php4/ext/standard  dir.c 
  Log:
  Fixed compiler warning.
  
  
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.116 php4/ext/standard/dir.c:1.117
--- php4/ext/standard/dir.c:1.116   Wed Feb 19 04:27:29 2003
+++ php4/ext/standard/dir.c Thu Feb 27 18:53:55 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dir.c,v 1.116 2003/02/19 09:27:29 sniper Exp $ */
+/* $Id: dir.c,v 1.117 2003/02/27 23:53:55 iliaa Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -466,7 +466,7 @@
if (!flags) {
n = php_scandir(path, namelist, 0, php_alphasort);
} else {
-   n = php_scandir(path, namelist, 0, php_alphasortr);
+   n = php_scandir(path, namelist, 0, (void *) php_alphasortr);
}
 
if (n  0) {



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



[PHP-CVS] cvs: php4 /main network.c

2003-02-27 Thread Ilia Alshanetsky
iliaa   Thu Feb 27 19:08:00 2003 EDT

  Modified files:  
/php4/main  network.c 
  Log:
  compiler warning fixed.
  
  
Index: php4/main/network.c
diff -u php4/main/network.c:1.92 php4/main/network.c:1.93
--- php4/main/network.c:1.92Thu Feb 27 13:06:30 2003
+++ php4/main/network.c Thu Feb 27 19:08:00 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.92 2003/02/27 18:06:30 wez Exp $ */
+/* $Id: network.c,v 1.93 2003/02/28 00:08:00 iliaa Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -189,12 +189,10 @@
 # endif

if ((n = getaddrinfo(host, NULL, hints, res)) || res == NULL) {
-   char *str = res == NULL ? null result pointer : PHP_GAI_STRERROR(n);
-
if (error_string) {
-   spprintf(error_string, 0, getaddrinfo: %s, str);
+   spprintf(error_string, 0, getaddrinfo: %s, (res == NULL ? 
null result pointer : PHP_GAI_STRERROR(n)));
} else {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed: %s, str);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed: %s, (res == NULL ? null result 
pointer : PHP_GAI_STRERROR(n)));
}
return 0;
}



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



[PHP-CVS] cvs: php4 /main/streams plain_wrapper.c

2003-02-27 Thread Wez Furlong
wez Thu Feb 27 20:47:28 2003 EDT

  Modified files:  
/php4/main/streams  plain_wrapper.c 
  Log:
  Implement memory mapping for win32.
  Could do with some rigorous testing; simple readfile() tests here appear to work.
  
Index: php4/main/streams/plain_wrapper.c
diff -u php4/main/streams/plain_wrapper.c:1.7 php4/main/streams/plain_wrapper.c:1.8
--- php4/main/streams/plain_wrapper.c:1.7   Thu Feb 27 12:43:38 2003
+++ php4/main/streams/plain_wrapper.c   Thu Feb 27 20:47:28 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.7 2003/02/27 17:43:38 wez Exp $ */
+/* $Id: plain_wrapper.c,v 1.8 2003/02/28 01:47:28 wez Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -149,6 +149,10 @@
char *last_mapped_addr;
size_t last_mapped_len;
 #endif
+#ifdef PHP_WIN32
+   char *last_mapped_addr;
+   HANDLE file_mapping;
+#endif
 } php_stdio_stream_data;
 
 PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char *pfx, 
char **opened_path STREAMS_DC TSRMLS_DC)
@@ -362,6 +366,15 @@
munmap(data-last_mapped_addr, data-last_mapped_len);
data-last_mapped_addr = NULL;
}
+#elif defined(PHP_WIN32)
+   if (data-last_mapped_addr) {
+   UnmapViewOfFile(data-last_mapped_addr);
+   data-last_mapped_addr = NULL;
+   }
+   if (data-file_mapping) {
+   CloseHandle(data-file_mapping);
+   data-file_mapping = NULL;
+   }
 #endif

if (close_handle) {
@@ -643,6 +656,88 @@
return PHP_STREAM_OPTION_RETURN_ERR;
}
}
+#elif defined(PHP_WIN32)
+   {
+   php_stream_mmap_range *range = 
(php_stream_mmap_range*)ptrparam;
+   HANDLE hfile = (HANDLE)_get_osfhandle(fd);
+   DWORD prot, acc, loffs = 0, delta = 0;
+
+   switch (value) {
+   case PHP_STREAM_MMAP_SUPPORTED:
+   return hfile == INVALID_HANDLE_VALUE ? 
PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
+
+   case PHP_STREAM_MMAP_MAP_RANGE:
+   switch (range-mode) {
+   case 
PHP_STREAM_MAP_MODE_READONLY:
+   prot = PAGE_READONLY;
+   acc = FILE_MAP_READ;
+   break;
+   case 
PHP_STREAM_MAP_MODE_READWRITE:
+   prot = PAGE_READWRITE;
+   acc = FILE_MAP_READ | 
FILE_MAP_WRITE;
+   break;
+   case 
PHP_STREAM_MAP_MODE_SHARED_READONLY:
+   prot = PAGE_READONLY;
+   acc = FILE_MAP_READ;
+   /* TODO: we should 
assign a name for the mapping */
+   break;
+   case 
PHP_STREAM_MAP_MODE_SHARED_READWRITE:
+   prot = PAGE_READWRITE;
+   acc = FILE_MAP_READ | 
FILE_MAP_WRITE;
+   /* TODO: we should 
assign a name for the mapping */
+   break;
+   }
+
+   /* create a mapping capable of viewing 
the whole file (this costs no real resources) */
+   data-file_mapping = 
CreateFileMapping(hfile, NULL, prot, 0, 0, NULL);
+
+   if (data-file_mapping == NULL) {
+   return 
PHP_STREAM_OPTION_RETURN_ERR;
+   }
+
+   if (range-length == 0) {
+   range-length = 
GetFileSize(hfile, NULL) - range-offset;
+   }
+
+   /* figure out how big a chunk to map 
to be able to 

[PHP-CVS] cvs: php4 /scripts/ext_skel_ng extension.dtd

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:28:14 2003 EDT

  Modified files:  
/php4/scripts/ext_skel_ng   extension.dtd 
  Log:
  some DTD fixes and code as a toplevel element for .c and .h code snippets
  
  
Index: php4/scripts/ext_skel_ng/extension.dtd
diff -u php4/scripts/ext_skel_ng/extension.dtd:1.3 
php4/scripts/ext_skel_ng/extension.dtd:1.4
--- php4/scripts/ext_skel_ng/extension.dtd:1.3  Mon Feb 24 05:57:48 2003
+++ php4/scripts/ext_skel_ng/extension.dtd  Fri Feb 28 01:28:14 2003
@@ -1,7 +1,7 @@
 !--
   --
 
-!ELEMENT extension 
(name|summary|description|license|maintainers|logo|release|changelog|functions|constants|globals|deps|resources)*
+!ELEMENT extension 
(name|summary|description|license|maintainers|logo|release|changelog|functions|constants|globals|deps|resources|code)*
 
 !ELEMENT name (#PCDATA)
 
@@ -13,9 +13,9 @@
 
 !ELEMENT maintainer (user|role|name|email)*
 
-!ELEMENT logo
+!ELEMENT logo (#PCDATA)
 !ATTLIST logo
-  src CDATA #REQURED
+  src CDATA #REQUIRED
 
 
 !ELEMENT user (#PCDATA)
@@ -46,7 +46,9 @@
 
 !ELEMENT proto (#PCDATA)  
 !ELEMENT code  (#PCDATA)  
-
+!ATTLIST code  
+  role (header|code) code
+
 !ELEMENT constants (constant)*
 !ELEMENT constant (#PCDATA)
 !ATTLIST constant
@@ -85,7 +87,7 @@
 
 
 !ELEMENT resources (resource)*
-!ELEMENT resource (destruct)?
+!ELEMENT resource (description?, destruct?)
 !ATTLIST resource
   name   CDATA #REQUIRED
   payloadCDATA #IMPLIED



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



[PHP-CVS] cvs: php4 /scripts/ext_skel_ng php_element.php

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:28:54 2003 EDT

  Modified files:  
/php4/scripts/ext_skel_ng   php_element.php 
  Log:
  added callback type (and fixed a stupid typo)
  
  
Index: php4/scripts/ext_skel_ng/php_element.php
diff -u php4/scripts/ext_skel_ng/php_element.php:1.1 
php4/scripts/ext_skel_ng/php_element.php:1.2
--- php4/scripts/ext_skel_ng/php_element.php:1.1Wed Feb 19 05:07:22 2003
+++ php4/scripts/ext_skel_ng/php_element.phpFri Feb 28 01:28:53 2003
@@ -14,7 +14,8 @@
 array= 
array,
 object   = 
object,
 resource = 
resource,
-mixed= 
mixes,
+mixed= 
mixed,
+callback = 
callback,
 );

if(isset($types[$name])) {



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



[PHP-CVS] cvs: php4 /scripts/ext_skel_ng xml_stream_parser.php

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:30:59 2003 EDT

  Modified files:  
/php4/scripts/ext_skel_ng   xml_stream_parser.php 
  Log:
  on line #, not in line #
  
  
Index: php4/scripts/ext_skel_ng/xml_stream_parser.php
diff -u php4/scripts/ext_skel_ng/xml_stream_parser.php:1.1 
php4/scripts/ext_skel_ng/xml_stream_parser.php:1.2
--- php4/scripts/ext_skel_ng/xml_stream_parser.php:1.1  Wed Feb 19 05:07:22 2003
+++ php4/scripts/ext_skel_ng/xml_stream_parser.php  Fri Feb 28 01:30:59 2003
@@ -36,7 +36,7 @@
 }
 
function error($msg) {
-   die($msg in line 
.xml_get_current_line_number($this-parser));
+   die($msg on line 
.xml_get_current_line_number($this-parser));
}
 } // end of class xml
 ?



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



[PHP-CVS] cvs: php4 /scripts/ext_skel_ng ext_skel_ng.php

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:33:05 2003 EDT

  Modified files:  
/php4/scripts/ext_skel_ng   ext_skel_ng.php 
  Log:
  support for passing description file name on command line
  
  
Index: php4/scripts/ext_skel_ng/ext_skel_ng.php
diff -u php4/scripts/ext_skel_ng/ext_skel_ng.php:1.3 
php4/scripts/ext_skel_ng/ext_skel_ng.php:1.4
--- php4/scripts/ext_skel_ng/ext_skel_ng.php:1.3Mon Feb 24 05:57:48 2003
+++ php4/scripts/ext_skel_ng/ext_skel_ng.phpFri Feb 28 01:33:04 2003
@@ -1,7 +1,9 @@
 ?php
require_once extension_parser.php;
 
-   $ext = new extension_parser(fopen(extension.xml, r));
+   $filename = isset($_SERVER[argv][1]) ? $_SERVER[argv][1] : extension.xml;
+
+   $ext = new extension_parser(fopen($filename, r));
 
   system(rm -rf {$ext-name});
   mkdir($ext-name);



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



[PHP-CVS] cvs: php4 /scripts/ext_skel_ng extension_parser.php php_function.php

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:37:05 2003 EDT

  Modified files:  
/php4/scripts/ext_skel_ng   extension_parser.php php_function.php 
  Log:
  - support for callback type
  - proto syntax errors are now passed back to the top level parser
  
  
Index: php4/scripts/ext_skel_ng/extension_parser.php
diff -u php4/scripts/ext_skel_ng/extension_parser.php:1.5 
php4/scripts/ext_skel_ng/extension_parser.php:1.6
--- php4/scripts/ext_skel_ng/extension_parser.php:1.5   Mon Feb 24 05:57:48 2003
+++ php4/scripts/ext_skel_ng/extension_parser.php   Fri Feb 28 01:37:04 2003
@@ -196,6 +196,7 @@
$this-private_functions[$attr['name']] = $function;
break;
case public:
+   if(is_string($function-status)) 
$this-error($function-status. in prototype);
$this-functions[$attr['name']] = $function;
break;
default:
@@ -282,7 +283,7 @@
$fp = fopen($docdir/reference.xml, w);
fputs($fp,
 ?xml version='1.0' encoding='iso-8859-1'?
-!-- \$Revision: 1.5 $ --
+!-- \$Revision: 1.6 $ --
  reference id='ref.{$this-name}'
   title{$this-summary}/title
   titleabbrev{$this-name}/titleabbrev
Index: php4/scripts/ext_skel_ng/php_function.php
diff -u php4/scripts/ext_skel_ng/php_function.php:1.4 
php4/scripts/ext_skel_ng/php_function.php:1.5
--- php4/scripts/ext_skel_ng/php_function.php:1.4   Mon Feb 24 05:57:48 2003
+++ php4/scripts/ext_skel_ng/php_function.php   Fri Feb 28 01:37:05 2003
@@ -8,7 +8,7 @@
$this-desc = empty($desc) ? warn.undocumented.func; : 
$desc;
   $this-code = $code;
$this-role = empty($role) ? public : $role;
-   if($this-role === public) $this-parse_proto($proto);
+   if($this-role === public) $this-status = 
$this-parse_proto($proto);
} 

function parse_proto($proto) {
@@ -32,9 +32,9 @@
$opts=0;
$params=array();
$return_type = ($this-is_type($tokens[$n])) ? $tokens[$n++] : 
void;
-   if(! $this-is_name($tokens[$n])) die($tokens[$n] is not a 
valid function name);
+   if(! $this-is_name($tokens[$n])) return($tokens[$n] is not a 
valid function name);
$function_name = $tokens[$n++];
-   if($tokens[$n]!='(') die('(' expected instead of 
'$tokens[$n]');
+   if($tokens[$n]!='(') return('(' expected instead of 
'$tokens[$n]');
if($tokens[++$n]!=')') {
for($param=0;$tokens[$n];$n++,$param++) {
if($tokens[$n]=='[') {
@@ -42,11 +42,11 @@
$opts++;
$n++;
if($param0) { 
-   if ($tokens[$n]!=',') die(',' 
expected after '[' instead of $token[$n]);
+   if ($tokens[$n]!=',') 
return(',' expected after '[' instead of '$token[$n]');
$n++;
}
}
-   if(!$this-is_type($tokens[$n])) die(type 
name expected instead of $tokens[$n]);
+   if(!$this-is_type($tokens[$n])) return(type 
name expected instead of '$tokens[$n]');
$params[$param]['type']=$tokens[$n];
$n++;
if($this-is_name($tokens[$n])) {
@@ -67,13 +67,15 @@
$n++;
$opts--;
}
-   if($opts!=0) die ('[' / ']' count mismatch);
-   if($tokens[$n] != ')') die (')' expected instead of 
$tokens[$n]);
+   if($opts!=0) return ('[' / ']' count mismatch);
+   if($tokens[$n] != ')') return(')' expected instead of 
'$tokens[$n]');

$this-name = $function_name;
$this-returns  = $return_type;
$this-params   = $params;
$this-optional = $numopts;
+
+   return true;
}
 
function c_code() {
@@ -154,6 +156,7 @@
.  }\n;
break;
case mixed:
+   

[PHP-CVS] cvs: php4(PHP_4_3) /ext/yp yp.c

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:51:17 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/ypyp.c 
  Log:
  MFphp5
  
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.31.8.2 php4/ext/yp/yp.c:1.31.8.3
--- php4/ext/yp/yp.c:1.31.8.2   Wed Feb 26 12:38:02 2003
+++ php4/ext/yp/yp.cFri Feb 28 01:51:16 2003
@@ -16,7 +16,7 @@
|  Fredrik Ohrn|
+--+
  */
-/* $Id: yp.c,v 1.31.8.2 2003/02/26 17:38:02 hholzgra Exp $ */
+/* $Id: yp.c,v 1.31.8.3 2003/02/28 06:51:16 hholzgra Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -294,8 +294,7 @@
if (inkeylen) {
char *key = emalloc(inkeylen+1);
if(key) {
-   strncpy(key, inkey, inkeylen);
-   key[inkeylen] = '\0';
+   strlcpy(key, inkey, inkeylen+1);
add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, 
inval, invallen, 1);
efree(key);
} else {



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



[PHP-CVS] cvs: php4(PHP_4) /ext/yp yp.c

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 01:51:36 2003 EDT

  Modified files:  (Branch: PHP_4)
/php4/ext/ypyp.c 
  Log:
  MFphp5
  
Index: php4/ext/yp/yp.c
diff -u php4/ext/yp/yp.c:1.31.8.1.2.1 php4/ext/yp/yp.c:1.31.8.1.2.2
--- php4/ext/yp/yp.c:1.31.8.1.2.1   Wed Feb 26 13:00:59 2003
+++ php4/ext/yp/yp.cFri Feb 28 01:51:36 2003
@@ -16,7 +16,7 @@
|  Fredrik Ohrn|
+--+
  */
-/* $Id: yp.c,v 1.31.8.1.2.1 2003/02/26 18:00:59 hholzgra Exp $ */
+/* $Id: yp.c,v 1.31.8.1.2.2 2003/02/28 06:51:36 hholzgra Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -294,8 +294,7 @@
if (inkeylen) {
char *key = emalloc(inkeylen+1);
if(key) {
-   strncpy(key, inkey, inkeylen);
-   key[inkeylen] = '\0';
+   strncpy(key, inkey, inkeylen+1);
add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, 
inval, invallen, 1);
efree(key);
} else {



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



[PHP-CVS] cvs: php4 /ext/yaz config.m4 php_yaz.c

2003-02-27 Thread Jani Taskinen
sniper  Fri Feb 28 02:17:46 2003 EDT

  Modified files:  
/php4/ext/yaz   config.m4 php_yaz.c 
  Log:
  YAZ 2.0 or later is required now.
  
Index: php4/ext/yaz/config.m4
diff -u php4/ext/yaz/config.m4:1.13 php4/ext/yaz/config.m4:1.14
--- php4/ext/yaz/config.m4:1.13 Tue Feb 11 22:05:27 2003
+++ php4/ext/yaz/config.m4  Fri Feb 28 02:17:46 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.13 2003/02/12 03:05:27 sniper Exp $
+dnl $Id: config.m4,v 1.14 2003/02/28 07:17:46 sniper Exp $
 dnl
 
 PHP_ARG_WITH(yaz,for YAZ support,
@@ -23,13 +23,13 @@
 AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ])
 . $yazconfig
 
-dnl Check version (1.9 or greater required)
+dnl Check version (2.0 or greater required)
 AC_MSG_CHECKING([for YAZ version])
 yaz_version=`echo $YAZVERSION | awk 'BEGIN { FS = .; } { printf %d, ($1 * 
1000 + $2) * 1000 + $3;}'`
-if test $yaz_version -ge 1009000; then
+if test $yaz_version -ge 200; then
   AC_MSG_RESULT([$YAZVERSION])
 else
-  AC_MSG_ERROR([YAZ version 1.9 or later required.])
+  AC_MSG_ERROR([YAZ version 2.0 or later required.])
 fi
 
 for c in $YAZLIB; do
Index: php4/ext/yaz/php_yaz.c
diff -u php4/ext/yaz/php_yaz.c:1.65 php4/ext/yaz/php_yaz.c:1.66
--- php4/ext/yaz/php_yaz.c:1.65 Fri Feb 28 01:33:03 2003
+++ php4/ext/yaz/php_yaz.c  Fri Feb 28 02:17:46 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_yaz.c,v 1.65 2003/02/28 06:33:03 sniper Exp $ */
+/* $Id: php_yaz.c,v 1.66 2003/02/28 07:17:46 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -33,9 +33,9 @@
 #include yaz/yaz-version.h
 
 #ifndef YAZ_VERSIONL
-#error YAZ version 1.9 or later must be used.
-#elif YAZ_VERSIONL  0x010900
-#error YAZ version 1.9 or later must be used.
+#error YAZ version 2.0 or later must be used.
+#elif YAZ_VERSIONL  0x02
+#error YAZ version 2.0 or later must be used.
 #endif
 
 #ifdef PHP_WIN32



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



[PHP-CVS] cvs: php4 /ext/ftp ftp.c php_ftp.c /ext/openssl xp_ssl.c /main php_network.h

2003-02-27 Thread Jani Taskinen
sniper  Fri Feb 28 02:25:14 2003 EDT

  Modified files:  
/php4/ext/ftp   ftp.c php_ftp.c 
/php4/ext/openssl   xp_ssl.c 
/php4/main  php_network.h 
  Log:
  - No need to include the ssl headers elsewhere but in ext/openssl
  # ext/ftp doesn't use streams yet so it needs to include them.
  
  
Index: php4/ext/ftp/ftp.c
diff -u php4/ext/ftp/ftp.c:1.80 php4/ext/ftp/ftp.c:1.81
--- php4/ext/ftp/ftp.c:1.80 Sat Feb 15 22:48:44 2003
+++ php4/ext/ftp/ftp.c  Fri Feb 28 02:25:14 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.80 2003/02/16 03:48:44 wez Exp $ */
+/* $Id: ftp.c,v 1.81 2003/02/28 07:25:14 sniper Exp $ */
 
 #include php.h
 
@@ -63,6 +63,10 @@
 
 #ifdef HAVE_SYS_SELECT_H
 #include sys/select.h
+#endif
+
+#if HAVE_OPENSSL_EXT
+#include openssl/ssl.h
 #endif
 
 #include ftp.h
Index: php4/ext/ftp/php_ftp.c
diff -u php4/ext/ftp/php_ftp.c:1.83 php4/ext/ftp/php_ftp.c:1.84
--- php4/ext/ftp/php_ftp.c:1.83 Fri Feb 14 15:15:11 2003
+++ php4/ext/ftp/php_ftp.c  Fri Feb 28 02:25:14 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_ftp.c,v 1.83 2003/02/14 20:15:11 iliaa Exp $ */
+/* $Id: php_ftp.c,v 1.84 2003/02/28 07:25:14 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -33,6 +33,10 @@
 #include sys/socket.h
 #endif
 #endif
+#endif
+
+#if HAVE_OPENSSL_EXT
+#include openssl/ssl.h
 #endif
 
 #if HAVE_FTP
Index: php4/ext/openssl/xp_ssl.c
diff -u php4/ext/openssl/xp_ssl.c:1.2 php4/ext/openssl/xp_ssl.c:1.3
--- php4/ext/openssl/xp_ssl.c:1.2   Thu Feb 27 18:50:54 2003
+++ php4/ext/openssl/xp_ssl.c   Fri Feb 28 02:25:14 2003
@@ -16,13 +16,14 @@
   +--+
 */
 
-/* $Id: xp_ssl.c,v 1.2 2003/02/27 23:50:54 iliaa Exp $ */
+/* $Id: xp_ssl.c,v 1.3 2003/02/28 07:25:14 sniper Exp $ */
 
 #include php.h
 #include ext/standard/file.h
 #include streams/php_streams_int.h
 #include php_network.h
 #include php_openssl.h
+#include openssl/ssl.h
 #include openssl/err.h
 
 
Index: php4/main/php_network.h
diff -u php4/main/php_network.h:1.40 php4/main/php_network.h:1.41
--- php4/main/php_network.h:1.40Thu Feb 27 12:43:37 2003
+++ php4/main/php_network.h Fri Feb 28 02:25:14 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_network.h,v 1.40 2003/02/27 17:43:37 wez Exp $ */
+/* $Id: php_network.h,v 1.41 2003/02/28 07:25:14 sniper Exp $ */
 
 #ifndef _PHP_NETWORK_H
 #define _PHP_NETWORK_H
@@ -74,10 +74,6 @@
 
 #ifdef HAVE_SYS_TIME_H
 #include sys/time.h
-#endif
-
-#if HAVE_OPENSSL_EXT
-#include openssl/ssl.h
 #endif
 
 #ifdef HAVE_STDDEF_H



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



[PHP-CVS] cvs: php4 /ext/curl interface.c

2003-02-27 Thread Jani Taskinen
sniper  Fri Feb 28 02:34:46 2003 EDT

  Modified files:  
/php4/ext/curl  interface.c 
  Log:
  - Fixed bug #22312 (crash on failed connection when curl_getinfo() was called).
(Phil Oleson [EMAIL PROTECTED])
  
  
Index: php4/ext/curl/interface.c
diff -u php4/ext/curl/interface.c:1.9 php4/ext/curl/interface.c:1.10
--- php4/ext/curl/interface.c:1.9   Tue Feb 25 02:19:44 2003
+++ php4/ext/curl/interface.c   Fri Feb 28 02:34:45 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.9 2003/02/25 07:19:44 sniper Exp $ */
+/* $Id: interface.c,v 1.10 2003/02/28 07:34:45 sniper Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -1101,46 +1101,68 @@
 
array_init(return_value);
 
-   curl_easy_getinfo(ch-cp, CURLINFO_EFFECTIVE_URL, s_code);
-   CAAS(url, s_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_TYPE, s_code);
-   CAAS(content_type, s_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_HTTP_CODE, l_code);
-   CAAL(http_code, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_HEADER_SIZE, l_code);
-   CAAL(header_size, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REQUEST_SIZE, l_code);
-   CAAL(request_size, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_FILETIME, l_code);
-   CAAL(filetime, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SSL_VERIFYRESULT, l_code);
-   CAAL(ssl_verify_result, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_COUNT, l_code);
-   CAAL(redirect_count, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_TOTAL_TIME, d_code);
-   CAAD(total_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_NAMELOOKUP_TIME, d_code);
-   CAAD(namelookup_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONNECT_TIME, d_code);
-   CAAD(connect_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_PRETRANSFER_TIME, d_code);
-   CAAD(pretransfer_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SIZE_UPLOAD, d_code);
-   CAAD(size_upload, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SIZE_DOWNLOAD, d_code);
-   CAAD(size_download, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SPEED_DOWNLOAD, d_code);
-   CAAD(speed_download, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SPEED_UPLOAD, d_code);
-   CAAD(speed_upload, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, d_code);
-   CAAD(download_content_length, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_LENGTH_UPLOAD, d_code);
-   CAAD(upload_content_length, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_STARTTRANSFER_TIME, d_code);
-   CAAD(starttransfer_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_TIME, d_code);
-   CAAD(redirect_time, d_code);
+   if (curl_easy_getinfo(ch-cp, CURLINFO_EFFECTIVE_URL, s_code) == 
CURLE_OK) {
+   CAAS(url, s_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_TYPE, s_code) == 
CURLE_OK) {
+   if (s_code != NULL) {
+   CAAS(content_type, s_code);
+   }
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_HTTP_CODE, l_code) == 
CURLE_OK) {
+   CAAL(http_code, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_HEADER_SIZE, l_code) == 
CURLE_OK) {
+   CAAL(header_size, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_REQUEST_SIZE, l_code) == 
CURLE_OK) {
+   CAAL(request_size, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_FILETIME, l_code) == CURLE_OK) 
{
+   CAAL(filetime, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_SSL_VERIFYRESULT, l_code) == 
CURLE_OK) {
+   CAAL(ssl_verify_result, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_COUNT, l_code) == 
CURLE_OK) {
+   CAAL(redirect_count, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_TOTAL_TIME, d_code) == 
CURLE_OK) {
+   CAAD(total_time, d_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_NAMELOOKUP_TIME, d_code) == 
CURLE_OK) {
+   CAAD(namelookup_time, d_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_CONNECT_TIME, d_code) == 
CURLE_OK) {
+   

[PHP-CVS] cvs: php4(PHP_4_3) /ext/curl curl.c

2003-02-27 Thread Jani Taskinen
sniper  Fri Feb 28 02:35:11 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/curl  curl.c 
  Log:
  - MFH: Fixed bug #22312 (crash on failed connection when curl_getinfo() was called). 
   
(Phil Oleson [EMAIL PROTECTED])  
  
  
  
Index: php4/ext/curl/curl.c
diff -u php4/ext/curl/curl.c:1.124.2.4 php4/ext/curl/curl.c:1.124.2.5
--- php4/ext/curl/curl.c:1.124.2.4  Mon Feb  3 15:56:28 2003
+++ php4/ext/curl/curl.cFri Feb 28 02:35:11 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: curl.c,v 1.124.2.4 2003/02/03 20:56:28 iliaa Exp $ */
+/* $Id: curl.c,v 1.124.2.5 2003/02/28 07:35:11 sniper Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1036,46 +1036,68 @@
 
array_init(return_value);
 
-   curl_easy_getinfo(ch-cp, CURLINFO_EFFECTIVE_URL, s_code);
-   CAAS(url, s_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_TYPE, s_code);
-   CAAS(content_type, s_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_HTTP_CODE, l_code);
-   CAAL(http_code, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_HEADER_SIZE, l_code);
-   CAAL(header_size, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REQUEST_SIZE, l_code);
-   CAAL(request_size, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_FILETIME, l_code);
-   CAAL(filetime, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SSL_VERIFYRESULT, l_code);
-   CAAL(ssl_verify_result, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_COUNT, l_code);
-   CAAL(redirect_count, l_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_TOTAL_TIME, d_code);
-   CAAD(total_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_NAMELOOKUP_TIME, d_code);
-   CAAD(namelookup_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONNECT_TIME, d_code);
-   CAAD(connect_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_PRETRANSFER_TIME, d_code);
-   CAAD(pretransfer_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SIZE_UPLOAD, d_code);
-   CAAD(size_upload, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SIZE_DOWNLOAD, d_code);
-   CAAD(size_download, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SPEED_DOWNLOAD, d_code);
-   CAAD(speed_download, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_SPEED_UPLOAD, d_code);
-   CAAD(speed_upload, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, d_code);
-   CAAD(download_content_length, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_LENGTH_UPLOAD, d_code);
-   CAAD(upload_content_length, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_STARTTRANSFER_TIME, d_code);
-   CAAD(starttransfer_time, d_code);
-   curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_TIME, d_code);
-   CAAD(redirect_time, d_code);
+   if (curl_easy_getinfo(ch-cp, CURLINFO_EFFECTIVE_URL, s_code) == 
CURLE_OK) {
+   CAAS(url, s_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_CONTENT_TYPE, s_code) == 
CURLE_OK) {
+   if (s_code != NULL) {
+   CAAS(content_type, s_code);
+   }
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_HTTP_CODE, l_code) == 
CURLE_OK) {
+   CAAL(http_code, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_HEADER_SIZE, l_code) == 
CURLE_OK) {
+   CAAL(header_size, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_REQUEST_SIZE, l_code) == 
CURLE_OK) {
+   CAAL(request_size, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_FILETIME, l_code) == CURLE_OK) 
{
+   CAAL(filetime, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_SSL_VERIFYRESULT, l_code) == 
CURLE_OK) {
+   CAAL(ssl_verify_result, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_REDIRECT_COUNT, l_code) == 
CURLE_OK) {
+   CAAL(redirect_count, l_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_TOTAL_TIME, d_code) == 
CURLE_OK) {
+   CAAD(total_time, d_code);
+   }
+   if (curl_easy_getinfo(ch-cp, CURLINFO_NAMELOOKUP_TIME, d_code) == 
CURLE_OK) {
+   CAAD(namelookup_time, d_code);
+   }
+

[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2003-02-27 Thread Jani Taskinen
sniper  Fri Feb 28 02:35:59 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  BFN
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.115 php4/NEWS:1.1247.2.116
--- php4/NEWS:1.1247.2.115  Thu Feb 27 11:42:42 2003
+++ php4/NEWS   Fri Feb 28 02:35:58 2003
@@ -30,6 +30,8 @@
 - Fixed bug #22355 (PHP would remove folding from Subject  To fields). (Ilia)
 - Fixed bug #22330 (overloaded strrpos() gives wrong results).
   ([EMAIL PROTECTED], Moriyoshi)
+- Fixed bug #22312 (crash on failed connection when curl_getinfo() was called).
+  (Phil Oleson [EMAIL PROTECTED])
 - Fixed bug #22308 (optimized passthru, code is now ~40 times faster). (Ilia)
 - Fixed bug #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false).
   (Jani)



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



[PHP-CVS] cvs: php4 /ext/standard file.c

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 02:52:23 2003 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  make sure that GNU extensions exist for fnmatch()
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.319 php4/ext/standard/file.c:1.320
--- php4/ext/standard/file.c:1.319  Thu Feb 27 17:23:39 2003
+++ php4/ext/standard/file.cFri Feb 28 02:52:23 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.319 2003/02/27 22:23:39 wez Exp $ */
+/* $Id: file.c,v 1.320 2003/02/28 07:52:23 hholzgra Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -107,6 +107,8 @@
 #endif
 
 #ifdef HAVE_FNMATCH
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
 #include fnmatch.h
 #endif
 



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



[PHP-CVS] cvs: php4 /ext/standard file.c

2003-02-27 Thread Hartmut Holzgraefe
hholzgraFri Feb 28 02:57:01 2003 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  it is still to early in the morning for coding :(
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.320 php4/ext/standard/file.c:1.321
--- php4/ext/standard/file.c:1.320  Fri Feb 28 02:52:23 2003
+++ php4/ext/standard/file.cFri Feb 28 02:57:00 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.320 2003/02/28 07:52:23 hholzgra Exp $ */
+/* $Id: file.c,v 1.321 2003/02/28 07:57:00 hholzgra Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -109,6 +109,7 @@
 #ifdef HAVE_FNMATCH
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include fnmatch.h
 #endif
 



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