[PHP-CVS] svn: /php/php-src/trunk/ NEWS

2010-11-23 Thread Andi Gutmans
andi Wed, 24 Nov 2010 04:31:45 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=305709

Log:
- Fix typo

Changed paths:
U   php/php-src/trunk/NEWS

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-11-24 00:56:15 UTC (rev 305708)
+++ php/php-src/trunk/NEWS  2010-11-24 04:31:45 UTC (rev 305709)
@@ -61,7 +61,7 @@
 in zend_class_entry.ce_flags.
   . Reduced the size of zend_class_entry by sharing the same memory space
 by different information for internal and user classes.
-See zend_class_inttry.info union.
+See zend_class_entry.info union.
   . Reduced size of temp_variable.

 - Changed the structure of op_array.opcodes. The constant values are moved from

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

RE: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ zend_alloc.c

2009-08-11 Thread Andi Gutmans
Sure.

 -Original Message-
 From: Derick Rethans [mailto:der...@php.net]
 Sent: Tuesday, August 11, 2009 2:11 AM
 To: Andi Gutmans
 Cc: php-cvs@lists.php.net; gwy...@php.net
 Subject: Re: [PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/
zend_alloc.c
 
 On Sun, 9 Aug 2009, Andi Gutmans wrote:
 
  andi Sun, 09 Aug 2009 04:46:30
+
 
  Revision: http://svn.php.net/viewvc?view=revisionrevision=286941
 
  Log:
  - MFH
 
 Could you please commit those changes to trunk and branches/* at the
 same time? Or at least repeat the log message? MFH is not very
useful
 if you're trying to figure out what this patch does.
 
 regards,
 Derick
 
 
  Changed paths:
  U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
 
  Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
  ===
  --- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2009-08-09
04:46:02 UTC
 (rev 286940)
  +++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2009-08-09
04:46:30 UTC
 (rev 286941)
  @@ -709,12 +709,14 @@
  unsigned int n;
  unsigned int index = 0;
 
  -   do {
  -   n = offset[_size  15];
  +   n = offset[_size  15];
  +   while (n == 4) {
  _size = 4;
  index += n;
  -   } while (n == 4);
  -   return index;
  +   n = offset[_size  15];
  +   }
  +
  +   return index + n;
   #endif
   }
 
 
 
 
 --
 http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
 twitter: @derickr

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



[PHP-CVS] svn: /php/php-src/trunk/ README.UNICODE

2009-08-08 Thread Andi Gutmans
andi Sun, 09 Aug 2009 03:39:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286937

Log:
- Fix small typo

Changed paths:
U   php/php-src/trunk/README.UNICODE

Modified: php/php-src/trunk/README.UNICODE
===
--- php/php-src/trunk/README.UNICODE2009-08-09 02:30:05 UTC (rev 286936)
+++ php/php-src/trunk/README.UNICODE2009-08-09 03:39:15 UTC (rev 286937)
@@ -302,7 +302,7 @@

   - stop the conversion and return an empty string
   - skip any invalid characters
-  - substibute invalid characters with a custom substitution character
+  - substitute invalid characters with a custom substitution character
   - escape the invalid character in various formats

 To control the global conversion error settings, use the functions:

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

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_alloc.c

2009-08-08 Thread Andi Gutmans
andi Sun, 09 Aug 2009 04:46:02 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286940

Log:
- Optimize slightly for common case - n!=4

Changed paths:
U   php/php-src/trunk/Zend/zend_alloc.c

Modified: php/php-src/trunk/Zend/zend_alloc.c
===
--- php/php-src/trunk/Zend/zend_alloc.c 2009-08-09 04:22:00 UTC (rev 286939)
+++ php/php-src/trunk/Zend/zend_alloc.c 2009-08-09 04:46:02 UTC (rev 286940)
@@ -730,12 +730,14 @@
unsigned int n;
unsigned int index = 0;

-   do {
-   n = offset[_size  15];
+   n = offset[_size  15];
+   while (n == 4) {
_size = 4;
index += n;
-   } while (n == 4);
-   return index;
+   n = offset[_size  15];
+   }
+
+   return index + n;
 #endif
 }
 /* }}} */

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/Zend/ zend_alloc.c

2009-08-08 Thread Andi Gutmans
andi Sun, 09 Aug 2009 04:46:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286941

Log:
- MFH

Changed paths:
U   php/php-src/branches/PHP_5_3/Zend/zend_alloc.c

Modified: php/php-src/branches/PHP_5_3/Zend/zend_alloc.c
===
--- php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2009-08-09 04:46:02 UTC 
(rev 286940)
+++ php/php-src/branches/PHP_5_3/Zend/zend_alloc.c  2009-08-09 04:46:30 UTC 
(rev 286941)
@@ -709,12 +709,14 @@
unsigned int n;
unsigned int index = 0;

-   do {
-   n = offset[_size  15];
+   n = offset[_size  15];
+   while (n == 4) {
_size = 4;
index += n;
-   } while (n == 4);
-   return index;
+   n = offset[_size  15];
+   }
+
+   return index + n;
 #endif
 }


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

[PHP-CVS] cvs: CVSROOT / avail

2009-03-22 Thread Andi Gutmans
andiMon Mar 23 02:32:49 2009 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give ericstewart commit access to php-src for INI and test work
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1503r2=1.1504diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1503 CVSROOT/avail:1.1504
--- CVSROOT/avail:1.1503Thu Mar 19 18:15:52 2009
+++ CVSROOT/avail   Mon Mar 23 02:32:48 2009
@@ -17,7 +17,7 @@
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.
 
-avail|dkelsey,ilewis,mkoppanen,lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs!
 
,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant,kalle,mattwil,sfox,hnangelo,ohill,indeyets,felixdv,mich4ld,lbarnaud,cseiler,sean,tabe|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd,docweb
+avail|dkelsey,ilewis,mkoppanen,lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,ericstewart,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,!
 
johannes,dbs,skoduru,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant,kalle,mattwil,sfox,hnangelo,ohill,indeyets,felixdv,mich4ld,lbarnaud,cseiler,sean,tabe|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd,docweb
 
 # Some people have access to tests in the Engine
 
avail|ilewis,magnus,michael,zoe,jmessa,sfox,tomerc,felixdv|Zend/tests,ZendEngine2/tests



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



RE: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c

2009-01-02 Thread Andi Gutmans
Ok will ask him to take a look when he's back.

Cheers,
Andi

 -Original Message-
 From: Marcus Boerger [mailto:he...@php.net]
 Sent: Friday, January 02, 2009 4:04 AM
 To: Andi Gutmans
 Cc: Marcus Boerger; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard
 basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli
php_cli.c
 /sapi/embed php_embed.c
 
 Hello Andi,
 
   my main goal was to get rid of dl() for apache and alike modules and
get
 the c level API changes in. For FastCGI I guess you are right, but I
would
 appreciate if Dmitry could look into it. As far as I understand the
only
 thing we have to do is to pass the function table containing the dl()
only
 if we are not in FastCGI mode. So basically if ther is no -b command
line
 flag.
 
 marcus
 
 Friday, January 2, 2009, 5:47:09 AM, you wrote:
 
  Hi Marcus,
 
  I think dl() should also be disabled for FastCGI.
  It may require a bit of reordering of the code to make this work but
I
  think it's the right thing.
 
  If you bump into any problems then maybe Dmitry could help out but
he's
  on vacation for the next couple of weeks.
 
  Thanks!
  Andi
 
  -Original Message-
  From: Marcus Boerger [mailto:he...@php.net]
  Sent: Wednesday, December 31, 2008 6:27 AM
  To: php-cvs@lists.php.net; php...@lists.php.net
  Subject: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard
  basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli
  php_cli.c /sapi/embed php_embed.c
 
  helly   Wed Dec 31 14:27:10 2008 UTC
 
Modified files:  (Branch: PHP_5_3)
  /php-srcNEWS
  /php-src/ext/standard   basic_functions.c
  /php-src/main   SAPI.h main.c
  /php-src/sapi/cgi   cgi_main.c
  /php-src/sapi/cli   php_cli.c
  /php-src/sapi/embed   php_embed.c
Log:
MFH
- Changed dl() to be disabled by default. Enabled only when
explicitly
  registered by the SAPI layer. Enabled only with CLI, CGI and
EMBED.
  (Dmitry)
[DOC]
 
 
 
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r
  2=1.2027.2.547.2.965.2.429diff_format=u
  Index: php-src/NEWS
  diff -u php-src/NEWS:1.2027.2.547.2.965.2.428
  php-src/NEWS:1.2027.2.547.2.965.2.429
  --- php-src/NEWS:1.2027.2.547.2.965.2.428   Tue Dec 30 23:34:29
2008
  +++ php-src/NEWSWed Dec 31 14:27:08 2008
  @@ -6,6 +6,8 @@
   - Deprecated session_register(), session_unregister() and
 session_is_registered(). (Hannes)
 
  +- Changed dl() to be disabled by default. Enabled only when
explicitly
  +  registered by the SAPI layer. Enabled only with CLI, CGI and
EMBED.
  (Dmitry)
   - Changed opendir(), dir() and scandir() to use default context
when no
  context
 argument is passed. (Sara)
   - Changed open_basedir to allow tightening in runtime contexts.
(Sara)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=
  1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u
  Index: php-src/ext/standard/basic_functions.c
  diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79
  php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80
  --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79
Wed
 Dec
  31 11:15:44 2008
  +++ php-src/ext/standard/basic_functions.c  Wed Dec 31 14:27:09
2008
  @@ -18,7 +18,7 @@
 
 
+--+
*/
 
  -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31
11:15:44
  sebastian Exp $ */
  +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31
14:27:09
  helly Exp $ */
 
   #include php.h
   #include php_streams.h
  @@ -3025,9 +3025,6 @@
  PHP_FE(is_scalar,
  arginfo_is_scalar)
  PHP_FE(is_callable,
  arginfo_is_callable)
 
  -   /* functions from dl.c */
  -   PHP_FE(dl,
  arginfo_dl)
  -
  /* functions from file.c */
  PHP_FE(pclose,
  arginfo_pclose)
  PHP_FE(popen,
  arginfo_popen)
 
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r
  2=1.114.2.1.2.3.2.6diff_format=u
  Index: php-src/main/SAPI.h
  diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5
  php-src/main/SAPI.h:1.114.2.1.2.3.2.6
  --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5   Wed Dec 31 11:15:47
2008
  +++ php-src/main/SAPI.h   Wed Dec 31 14:27:09 2008
  @@ -16,7 +16,7 @@
 
 
+--+
   */
 
  -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian
Exp $
  */
  +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $
*/
 
   #ifndef SAPI_H
   #define SAPI_H
  @@ -264,6 +264,7 @@
  int phpinfo_as_text;
 
  char *ini_entries;
  +   const zend_function_entry *additional_functions;
   };
 
 
 
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4
  0r2=1.640.2.23.2.57.2.41diff_format=u
  Index: php-src/main/main.c
  diff -u php-src/main/main.c

RE: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Andi Gutmans
Does this mean you should be using WSASetLastError() on Windows?

Andi

 -Original Message-
 From: Felipe Pena [mailto:fel...@php.net]
 Sent: Friday, January 02, 2009 1:43 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c
 
 felipeFri Jan  2 21:42:52 2009 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/main network.c
   Log:
   - MFH: Errr, rule nº 1: be portable :)
 
 http://cvs.php.net/viewvc.cgi/php-
 src/main/network.c?r1=1.118.2.2.2.6.2.12r2=1.118.2.2.2.6.2.13diff_format=u
 Index: php-src/main/network.c
 diff -u php-src/main/network.c:1.118.2.2.2.6.2.12 php-
 src/main/network.c:1.118.2.2.2.6.2.13
 --- php-src/main/network.c:1.118.2.2.2.6.2.12 Fri Jan  2 21:28:28 2009
 +++ php-src/main/network.cFri Jan  2 21:42:52 2009
 @@ -17,7 +17,7 @@
 +--+
   */
 
 -/* $Id: network.c,v 1.118.2.2.2.6.2.12 2009/01/02 21:28:28 felipe Exp $ */
 +/* $Id: network.c,v 1.118.2.2.2.6.2.13 2009/01/02 21:42:52 felipe Exp $ */
 
  /*#define DEBUG_MAIN_NETWORK 1*/
 
 @@ -1147,7 +1147,9 @@
   tv.tv_sec = timeout / 1000;
   tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
   }
 +#ifndef PHP_WIN32
   errno = 0;
 +#endif
   n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);
 
   if (n = 0) {
 
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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



RE: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c

2009-01-01 Thread Andi Gutmans
Hi Marcus,

I think dl() should also be disabled for FastCGI.
It may require a bit of reordering of the code to make this work but I
think it's the right thing.

If you bump into any problems then maybe Dmitry could help out but he's
on vacation for the next couple of weeks.

Thanks!
Andi

-Original Message-
From: Marcus Boerger [mailto:he...@php.net] 
Sent: Wednesday, December 31, 2008 6:27 AM
To: php-cvs@lists.php.net; php...@lists.php.net
Subject: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard
basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli
php_cli.c /sapi/embed php_embed.c 

helly   Wed Dec 31 14:27:10 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/standard   basic_functions.c 
/php-src/main   SAPI.h main.c 
/php-src/sapi/cgi   cgi_main.c 
/php-src/sapi/cli   php_cli.c 
/php-src/sapi/embed php_embed.c 
  Log:
  MFH
  - Changed dl() to be disabled by default. Enabled only when explicitly
registered by the SAPI layer. Enabled only with CLI, CGI and EMBED.
(Dmitry)
  [DOC]
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r
2=1.2027.2.547.2.965.2.429diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.428
php-src/NEWS:1.2027.2.547.2.965.2.429
--- php-src/NEWS:1.2027.2.547.2.965.2.428   Tue Dec 30 23:34:29 2008
+++ php-src/NEWSWed Dec 31 14:27:08 2008
@@ -6,6 +6,8 @@
 - Deprecated session_register(), session_unregister() and
   session_is_registered(). (Hannes)
 
+- Changed dl() to be disabled by default. Enabled only when explicitly
+  registered by the SAPI layer. Enabled only with CLI, CGI and EMBED.
(Dmitry)
 - Changed opendir(), dir() and scandir() to use default context when no
context
   argument is passed. (Sara)
 - Changed open_basedir to allow tightening in runtime contexts. (Sara)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=
1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 Wed Dec
31 11:15:44 2008
+++ php-src/ext/standard/basic_functions.c  Wed Dec 31 14:27:09 2008
@@ -18,7 +18,7 @@
 
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31 11:15:44
sebastian Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31 14:27:09
helly Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3025,9 +3025,6 @@
PHP_FE(is_scalar,
arginfo_is_scalar)
PHP_FE(is_callable,
arginfo_is_callable)
 
-   /* functions from dl.c */
-   PHP_FE(dl,
arginfo_dl)
-
/* functions from file.c */
PHP_FE(pclose,
arginfo_pclose)
PHP_FE(popen,
arginfo_popen)
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r
2=1.114.2.1.2.3.2.6diff_format=u
Index: php-src/main/SAPI.h
diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5
php-src/main/SAPI.h:1.114.2.1.2.3.2.6
--- php-src/main/SAPI.h:1.114.2.1.2.3.2.5   Wed Dec 31 11:15:47 2008
+++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008
@@ -16,7 +16,7 @@
 
+--+
 */
 
-/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $
*/
+/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */
 
 #ifndef SAPI_H
 #define SAPI_H
@@ -264,6 +264,7 @@
int phpinfo_as_text;
 
char *ini_entries;
+   const zend_function_entry *additional_functions;
 };
 
 
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4
0r2=1.640.2.23.2.57.2.41diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.40
php-src/main/main.c:1.640.2.23.2.57.2.41
--- php-src/main/main.c:1.640.2.23.2.57.2.40Wed Dec 31 14:05:22 2008
+++ php-src/main/main.c Wed Dec 31 14:27:09 2008
@@ -18,7 +18,7 @@
 
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.40 2008/12/31 14:05:22 helly Exp $
*/
+/* $Id: main.c,v 1.640.2.23.2.57.2.41 2008/12/31 14:27:09 helly Exp $
*/
 
 /* {{{ includes
  */
@@ -1910,6 +1910,15 @@
/* start Zend extensions */
zend_startup_extensions();
 
+   /* register additional functions */
+   if (sapi_module.additional_functions) {
+   if (zend_hash_find(module_registry, standard,
sizeof(standard), (void**)module)==SUCCESS) {
+   EG(current_module) = module;
+   zend_register_functions(NULL,
sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
+   EG(current_module) = NULL;
+   }
+   }
+   
/* make core report what it should */
if 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre config.w32

2009-01-01 Thread Andi Gutmans
andiFri Jan  2 04:59:41 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pcre   config.w32 
  Log:
  - Remove NO_RECURSE as it causes a huge performance impact. Up to 50%
with Wordpress. Stack size is not really anymore of an issue than on
Linux with FastCGI (php-cgi.exe). For ISAPI it may be an issue but we
have other places where we may eat up stack.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/config.w32?r1=1.4.2.5.2.7.2.3r2=1.4.2.5.2.7.2.4diff_format=u
Index: php-src/ext/pcre/config.w32
diff -u php-src/ext/pcre/config.w32:1.4.2.5.2.7.2.3 
php-src/ext/pcre/config.w32:1.4.2.5.2.7.2.4
--- php-src/ext/pcre/config.w32:1.4.2.5.2.7.2.3 Tue Sep  9 07:55:07 2008
+++ php-src/ext/pcre/config.w32 Fri Jan  2 04:59:41 2009
@@ -1,8 +1,8 @@
-// $Id: config.w32,v 1.4.2.5.2.7.2.3 2008/09/09 07:55:07 nlopess Exp $
+// $Id: config.w32,v 1.4.2.5.2.7.2.4 2009/01/02 04:59:41 andi Exp $
 // vim:ft=javascript
 
 EXTENSION(pcre, php_pcre.c, false /* never shared */,
-   -DNO_RECURSE -Iext/pcre/pcrelib);
+   -Iext/pcre/pcrelib);
 ADD_SOURCES(ext/pcre/pcrelib, pcre_chartables.c pcre_ucd.c pcre_compile.c 
pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c 
pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c 
pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c 
pcre_xclass.c, pcre);
 ADD_DEF_FILE(ext\\pcre\\php_pcre.def);
 



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



[PHP-CVS] cvs: php-src /ext/pcre config.w32

2009-01-01 Thread Andi Gutmans
andiFri Jan  2 05:00:04 2009 UTC

  Modified files:  
/php-src/ext/pcre   config.w32 
  Log:
  - MF PHP_5_2
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/config.w32?r1=1.18r2=1.19diff_format=u
Index: php-src/ext/pcre/config.w32
diff -u php-src/ext/pcre/config.w32:1.18 php-src/ext/pcre/config.w32:1.19
--- php-src/ext/pcre/config.w32:1.18Sun Sep 14 14:37:10 2008
+++ php-src/ext/pcre/config.w32 Fri Jan  2 05:00:04 2009
@@ -1,8 +1,8 @@
-// $Id: config.w32,v 1.18 2008/09/14 14:37:10 nlopess Exp $
+// $Id: config.w32,v 1.19 2009/01/02 05:00:04 andi Exp $
 // vim:ft=javascript
 
 EXTENSION(pcre, php_pcre.c, false /* never shared */,
-   -DNO_RECURSE -Iext/pcre/pcrelib);
+   -Iext/pcre/pcrelib);
 ADD_SOURCES(ext/pcre/pcrelib, pcre_chartables.c pcre_ucd.c pcre_compile.c 
pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c 
pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c 
pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c 
pcre_xclass.c, pcre);
 ADD_DEF_FILE(ext\\pcre\\php_pcre.def);
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre config.w32

2009-01-01 Thread Andi Gutmans
andiFri Jan  2 05:00:35 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pcre   config.w32 
  Log:
  - MF PHP_5_3
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/config.w32?r1=1.4.2.5.2.8r2=1.4.2.5.2.9diff_format=u
Index: php-src/ext/pcre/config.w32
diff -u php-src/ext/pcre/config.w32:1.4.2.5.2.8 
php-src/ext/pcre/config.w32:1.4.2.5.2.9
--- php-src/ext/pcre/config.w32:1.4.2.5.2.8 Sun Nov 23 18:30:36 2008
+++ php-src/ext/pcre/config.w32 Fri Jan  2 05:00:35 2009
@@ -1,8 +1,8 @@
-// $Id: config.w32,v 1.4.2.5.2.8 2008/11/23 18:30:36 iliaa Exp $
+// $Id: config.w32,v 1.4.2.5.2.9 2009/01/02 05:00:35 andi Exp $
 // vim:ft=javascript
 
 EXTENSION(pcre, php_pcre.c, false /* never shared */,
-   -DNO_RECURSE -Iext/pcre/pcrelib);
+   -Iext/pcre/pcrelib);
 ADD_SOURCES(ext/pcre/pcrelib, pcre_chartables.c pcre_ucd.c pcre_compile.c 
pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c 
pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c 
pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c 
pcre_xclass.c, pcre);
 ADD_DEF_FILE(ext\\pcre\\php_pcre.def);
 



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



[PHP-CVS] cvs: CVSROOT / avail

2008-11-02 Thread Andi Gutmans
andiSun Nov  2 16:46:02 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Karma to Zend Engine tests for Felix De Vliegher
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1461r2=1.1462diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1461 CVSROOT/avail:1.1462
--- CVSROOT/avail:1.1461Wed Oct 29 21:35:47 2008
+++ CVSROOT/avail   Sun Nov  2 16:46:01 2008
@@ -20,7 +20,7 @@
 
avail|ilewis,mkoppanen,lstrojny,dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru!
 
,nrathna,jesus,gopalv,bjori,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa,philip,sixd,gwynne,ant,kalle,mattwil,sfox,hnangelo,ohill,indeyets,felixdv,mich4ld,lbarnaud,cseiler|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no,phd,docweb
 
 # Some people have access to tests in the Engine
-avail|ilewis,magnus,michael,zoe,jmessa,sfox,tomerc|Zend/tests,ZendEngine2/tests
+avail|ilewis,magnus,michael,zoe,jmessa,sfox,tomerc,felixdv|Zend/tests,ZendEngine2/tests
 
 # fastcgi implementation for IIS
 avail|shane,wez,edink|fastcgi-isapi



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



[PHP-CVS] cvs: CVSROOT / avail

2008-08-11 Thread Andi Gutmans
andiMon Aug 11 19:41:57 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Karma to commit tests for CURL.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1433r2=1.1434diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1433 CVSROOT/avail:1.1434
--- CVSROOT/avail:1.1433Mon Aug 11 19:36:55 2008
+++ CVSROOT/avail   Mon Aug 11 19:41:56 2008
@@ -145,7 +145,7 @@
 avail|phanto,abrown|php-src/ext/com
 avail|steinm|php-src/ext/cpdf
 avail|hholzgra|php-src/ext/ctype
-avail|sterling|php-src/ext/curl
+avail|sterling,eyal|php-src/ext/curl
 avail|evan|php-src/ext/cybercash
 avail|spages|php-src/ext/cybermut
 avail|steinm,jarkol,zenderx,chregu,jtate,thoralf|php-src/ext/domxml



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



RE: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c /ext/mysqlnd mysqlnd_priv.h

2007-10-27 Thread Andi Gutmans
Hi Andrey,

Are you sure it's a good idea to replicate these macros? It kind of
breaks the ability to tweak them in a central place.
What's the reasoning for it?

Andi

 -Original Message-
 From: Andrey Hristov [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 16, 2007 1:56 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli mysqli.c
 /ext/mysqlnd mysqlnd_priv.h
 
 andreyTue Oct 16 20:56:22 2007 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/mysqli   mysqli.c
 /php-src/ext/mysqlnd  mysqlnd_priv.h
   Log:
   Sync mysqlnd. Should still compile with 5_2 for those who want to
use
 the
   current stable branch. mysqli from 5_3 patched for mysqlnd should be
 also
   compilable with 5_2.
 
 
 http://cvs.php.net/viewvc.cgi/php-

src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.17.2.4r2=1.72.2.16.2.17.2.5dif
 f_format=u
 Index: php-src/ext/mysqli/mysqli.c
 diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.4 php-
 src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.5
 --- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.17.2.4Tue Oct 16
 13:20:14 2007
 +++ php-src/ext/mysqli/mysqli.c   Tue Oct 16 20:56:22 2007
 @@ -15,7 +15,7 @@
| Author: Georg Richter [EMAIL PROTECTED]
 |

+---
 ---+
 
 -  $Id: mysqli.c,v 1.72.2.16.2.17.2.4 2007/10/16 13:20:14 tony2001 Exp
 $
 +  $Id: mysqli.c,v 1.72.2.16.2.17.2.5 2007/10/16 20:56:22 andrey Exp $
  */
 
  #ifdef HAVE_CONFIG_H
 @@ -315,6 +315,14 @@
  }
  /* }}} */
 
 +#ifndef Z_ADDREF_P
 +/* PHP 5.2, old GC */
 +#define Z_ADDREF_P(pz)
(++(pz)-refcount)
 +#define Z_REFCOUNT_P(pz) ((pz)-refcount)
 +#define Z_SET_REFCOUNT_P(pz, rc) ((pz)-refcount = rc)
 +#endif
 +
 +
  /* {{{ mysqli_read_property */
  zval *mysqli_read_property(zval *object, zval *member, int type
 TSRMLS_DC)
  {
 http://cvs.php.net/viewvc.cgi/php-
 src/ext/mysqlnd/mysqlnd_priv.h?r1=1.4.2.2r2=1.4.2.3diff_format=u
 Index: php-src/ext/mysqlnd/mysqlnd_priv.h
 diff -u php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.2 php-
 src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.3
 --- php-src/ext/mysqlnd/mysqlnd_priv.h:1.4.2.2Fri Oct  5
21:23:56
 2007
 +++ php-src/ext/mysqlnd/mysqlnd_priv.hTue Oct 16 20:56:22 2007
 @@ -18,11 +18,21 @@

+---
 ---+
  */
 
 -/* $Id: mysqlnd_priv.h,v 1.4.2.2 2007/10/05 21:23:56 andrey Exp $ */
 +/* $Id: mysqlnd_priv.h,v 1.4.2.3 2007/10/16 20:56:22 andrey Exp $ */
 
  #ifndef MYSQLND_PRIV_H
  #define MYSQLND_PRIV_H
 
 +#ifndef Z_ADDREF_P
 +/* PHP 5.2, old GC */
 +#define Z_ADDREF_P(pz)
(++(pz)-refcount)
 +#define Z_DELREF_P(pz)
(--(pz)-refcount)
 +#define Z_REFCOUNT_P(pz) ((pz)-refcount)
 +#define Z_SET_REFCOUNT_P(pz, rc) ((pz)-refcount = rc)
 +#define Z_REFCOUNT_PP(ppz)   Z_REFCOUNT_P(*(ppz))
 +#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
 +#endif
 +
  #ifdef ZTS
  #include TSRM.h
  #endif
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2_WITH_DRCP) /ext/oci8 READMEoci8.c oci8_interface.c php_oci8_int.h /ext/oci8/tests debug.phptpassword.phpt password_2.phpt password_new.phpt password_old.phpt

2007-10-05 Thread Andi Gutmans
Weird, I'm pretty sure I created the branch for Chris in PECL. This is
intentionally in a branch so that people can play around with it but
without risking the stable branch.

Chris, did you checkout pecl/oci8 or php-src/ext/oci8 before you
commited?

Andi

 -Original Message-
 From: Jani Taskinen [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 05, 2007 10:23 AM
 To: Christopher Jones
 Cc: php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2_WITH_DRCP) /ext/oci8
 READMEoci8.c oci8_interface.c php_oci8_int.h /ext/oci8/tests
 debug.phptpassword.phpt password_2.phpt password_new.phpt
 password_old.phpt
 
 Are you sure you committed in right module now?
 I'm guessing you were supposed to do this in pecl/ ??
 
 Otherwise I don't understand why you created another branch in php-
 src..
 
 --Jani
 
 
 On Fri, 2007-10-05 at 16:46 +, Christopher Jones wrote:
  sixdFri Oct  5 16:46:35 2007 UTC
 
Modified files:  (Branch: PHP_5_2_WITH_DRCP)
  /php-src/ext/oci8   oci8.c oci8_interface.c php_oci8_int.h
README
  /php-src/ext/oci8/tests debug.phpt password_old.phpt
  password_2.phpt password.phpt
  password_new.phpt
Log:
Add DRCP  FAN
 
  -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
 http://www.php.net/unsub.php
 --
 Patches/Donations: http://pecl.php.net/~jani/
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2_WITH_DRCP) /ext/oci8 READMEoci8.c oci8_interface.c php_oci8_int.h /ext/oci8/tests debug.phptpassword.phpt password_2.phpt password_new.phpt password_old.phpt

2007-10-05 Thread Andi Gutmans
Yeah I also got confused for a sec :)

 -Original Message-
 From: Jani Taskinen [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 05, 2007 4:38 PM
 To: Andi Gutmans
 Cc: Christopher Jones; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2_WITH_DRCP) /ext/oci8
 READMEoci8.c oci8_interface.c php_oci8_int.h /ext/oci8/tests
 debug.phptpassword.phpt password_2.phpt password_new.phpt
 password_old.phpt
 
 Is ext/oci8 a symlinked pecl extension..? :)
 So the confusion on my part was just that I didn't know this fact.
 (yet another reason why the symlinking in repository is bad..)
 
 --Jani
 
 
 Andi Gutmans kirjoitti:
  Weird, I'm pretty sure I created the branch for Chris in PECL. This
 is
  intentionally in a branch so that people can play around with it but
  without risking the stable branch.
 
  Chris, did you checkout pecl/oci8 or php-src/ext/oci8 before you
  commited?
 
  Andi
 
  -Original Message-
  From: Jani Taskinen [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 05, 2007 10:23 AM
  To: Christopher Jones
  Cc: php-cvs@lists.php.net
  Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2_WITH_DRCP) /ext/oci8
  READMEoci8.c oci8_interface.c php_oci8_int.h /ext/oci8/tests
  debug.phptpassword.phpt password_2.phpt password_new.phpt
  password_old.phpt
 
  Are you sure you committed in right module now?
  I'm guessing you were supposed to do this in pecl/ ??
 
  Otherwise I don't understand why you created another branch in php-
  src..
 
  --Jani
 
 
  On Fri, 2007-10-05 at 16:46 +, Christopher Jones wrote:
  sixd  Fri Oct  5 16:46:35 2007 UTC
 
Modified files:  (Branch: PHP_5_2_WITH_DRCP)
  /php-src/ext/oci8 oci8.c oci8_interface.c php_oci8_int.h
  README
  /php-src/ext/oci8/tests   debug.phpt password_old.phpt
password_2.phpt password.phpt
password_new.phpt
Log:
Add DRCP  FAN
 
  -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe,
 visit:
  http://www.php.net/unsub.php
  --
  Patches/Donations: http://pecl.php.net/~jani/
 
  --
  PHP CVS Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP-CVS] cvs: CVSROOT / avail

2007-09-12 Thread Andi Gutmans
andiWed Sep 12 21:57:30 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Enable Stas to help with CVS accounts
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1302r2=1.1303diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1302 CVSROOT/avail:1.1303
--- CVSROOT/avail:1.1302Sat Sep  8 01:06:37 2007
+++ CVSROOT/avail   Wed Sep 12 21:57:30 2007
@@ -12,7 +12,7 @@
 # Some people also have access to the configuration files in the
 # CVSROOT.
 
-avail|sterling,goba,imajes,wez,iliaa,derick,jon,cox,alan_k,jmcastagnetto,mj,pajoye,helly,philip|CVSROOT
+avail|sterling,goba,imajes,wez,iliaa,derick,jon,cox,alan_k,jmcastagnetto,mj,pajoye,helly,philip,stas|CVSROOT
 
 # The PHP Developers have full access to the full source trees for
 # PHP, as well as the documentation.

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard basic_functions.c /ext/standard/tests/network ip.phpt

2007-08-20 Thread Andi Gutmans
There are some convenience functions in zend_operators.h which would save 
having to repeat this logic (I think they are called zend_binary_strcmp() and 
zend_binary_zval_strcmp()).

Andi

 -Original Message-
 From: Antony Dovgal [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 16, 2007 3:35 PM
 To: Jani Taskinen
 Cc: php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard
 basic_functions.c /ext/standard/tests/network ip.phpt
 
 On 17.08.2007 02:17, Jani Taskinen wrote:
  -   if (!memcmp(Z_STRVAL_PP(str), 255.255.255.255,
 Z_STRLEN_PP(str))) {
  +   if (!memcmp(Z_STRVAL_PP(str), 255.255.255.255,
 sizeof(255.255.255.255) - 1)) {
  RETURN_LONG(-1);
  }
 
 Are you sure it is correct to compare first 15 bytes of _empty string_
 with 255.255.255.255?
 I'd say it should look like this:
 
 if (Z_STRLEN_PP(str) == (sizeof(255.255.255.255) - 1) 
 !memcmp(Z_STRVAL_PP(str), 255.255.255.255, Z_STRLEN_PP(str))) {
 
 
 --
 Wbr,
 Antony Dovgal
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2007-05-02 Thread Andi Gutmans
andiWed May  2 17:48:57 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give access to ext/standard for writing tests
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1266r2=1.1267diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1266 CVSROOT/avail:1.1267
--- CVSROOT/avail:1.1266Tue May  1 15:59:02 2007
+++ CVSROOT/avail   Wed May  2 17:48:57 2007
@@ -215,7 +215,7 @@
 avail|aditus|jpgraph
 avail|phallstrom|php-gtk-web/apps,php-gtk-web/include/apps.inc
 avail|tal,momo|php-src/ext/calendar
-avail|momo|php-src/ext/standard
+avail|momo,kraghuba|php-src/ext/standard
 avail|mbretter,philippe|pecl/radius,pecl/mqseries
 avail|mcmontero,blade106,scottmac,mkoppanen|pecl/imagick
 avail|bjori|php-src/ext/date

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



[PHP-CVS] cvs: CVSROOT / avail

2007-03-07 Thread Andi Gutmans
andiWed Mar  7 19:52:57 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Karma for Rajini Sivaram [EMAIL PROTECTED] to pecl/sdo
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1250r2=1.1251diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1250 CVSROOT/avail:1.1251
--- CVSROOT/avail:1.1250Fri Mar  2 19:42:31 2007
+++ CVSROOT/avail   Wed Mar  7 19:52:57 2007
@@ -389,7 +389,7 @@
 # please contact the lead developers.  This is a temporary measure until
 # we can put in place a more general process.
 
unavail||pecl/ibm_db2,pecl/sdo,pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm,pecl/sam
-avail|dbs,skoduru,kraman,kfbombar,tessus|pecl/ibm_db2,pecl/pdo_ibm
+avail|dbs,skoduru,kraman,rs,kfbombar,tessus|pecl/ibm_db2,pecl/pdo_ibm
 avail|wez,dbs|pecl/pdo_odbc,php-src/ext/pdo_odbc
 avail|gcc,cem,mfp,ansriniv,slaws,chm|pecl/sdo
 avail|dbs,kraman,kfbombar|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm

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



[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi CREDITS

2007-02-14 Thread Andi Gutmans
andiWed Feb 14 08:12:27 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cgi   CREDITS 
  Log:
  - Give Dmitry credit for all the FastCGI work
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/CREDITS?r1=1.2r2=1.2.20.1diff_format=u
Index: php-src/sapi/cgi/CREDITS
diff -u php-src/sapi/cgi/CREDITS:1.2 php-src/sapi/cgi/CREDITS:1.2.20.1
--- php-src/sapi/cgi/CREDITS:1.2Sun Oct 13 09:40:44 2002
+++ php-src/sapi/cgi/CREDITSWed Feb 14 08:12:27 2007
@@ -1,2 +1,2 @@
 CGI / FastCGI
-Rasmus Lerdorf, Stig Bakken, Shane Caraveo
+Rasmus Lerdorf, Stig Bakken, Shane Caraveo, Dmitry Stogov

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



[PHP-CVS] cvs: php-src(PHP_5_2) /main/streams php_stream_transport.h

2007-02-04 Thread Andi Gutmans
andiMon Feb  5 05:15:16 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main/streams   php_stream_transport.h 
  Log:
  - Make sure to be ANSI C compliant
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/php_stream_transport.h?r1=1.10.2.1.2.3r2=1.10.2.1.2.4diff_format=u
Index: php-src/main/streams/php_stream_transport.h
diff -u php-src/main/streams/php_stream_transport.h:1.10.2.1.2.3 
php-src/main/streams/php_stream_transport.h:1.10.2.1.2.4
--- php-src/main/streams/php_stream_transport.h:1.10.2.1.2.3Thu Jan 18 
16:05:48 2007
+++ php-src/main/streams/php_stream_transport.h Mon Feb  5 05:15:16 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_stream_transport.h,v 1.10.2.1.2.3 2007/01/18 16:05:48 nlopess Exp 
$ */
+/* $Id: php_stream_transport.h,v 1.10.2.1.2.4 2007/02/05 05:15:16 andi Exp $ */
 
 #if HAVE_SYS_SOCKET_H
 # include sys/socket.h
@@ -133,7 +133,7 @@
unsigned int want_addr:1;
unsigned int want_textaddr:1;
unsigned int want_errortext:1;
-   stream_shutdown_t how:2;
+   unsigned int how:2;
 
struct {
char *name;

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



[PHP-CVS] cvs: php-src /main/streams php_stream_transport.h

2007-02-04 Thread Andi Gutmans
andiMon Feb  5 05:15:49 2007 UTC

  Modified files:  
/php-src/main/streams   php_stream_transport.h 
  Log:
  - Make sure to be ANSI C compliant
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/php_stream_transport.h?r1=1.14r2=1.15diff_format=u
Index: php-src/main/streams/php_stream_transport.h
diff -u php-src/main/streams/php_stream_transport.h:1.14 
php-src/main/streams/php_stream_transport.h:1.15
--- php-src/main/streams/php_stream_transport.h:1.14Thu Jan 18 16:06:28 2007
+++ php-src/main/streams/php_stream_transport.h Mon Feb  5 05:15:49 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_stream_transport.h,v 1.14 2007/01/18 16:06:28 nlopess Exp $ */
+/* $Id: php_stream_transport.h,v 1.15 2007/02/05 05:15:49 andi Exp $ */
 
 #if HAVE_SYS_SOCKET_H
 # include sys/socket.h
@@ -133,7 +133,7 @@
unsigned int want_addr:1;
unsigned int want_textaddr:1;
unsigned int want_errortext:1;
-   stream_shutdown_t how:2;
+   unsigned int how:2;
 
struct {
char *name;

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



[PHP-CVS] cvs: CVSROOT / avail

2007-01-27 Thread Andi Gutmans
andiSat Jan 27 16:55:07 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - ext/com karma for Andy Wharmby who will help fix outstanding issues.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1235r2=1.1236diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1235 CVSROOT/avail:1.1236
--- CVSROOT/avail:1.1235Wed Jan 17 17:15:32 2007
+++ CVSROOT/avail   Sat Jan 27 16:55:07 2007
@@ -164,7 +164,7 @@
 avail|grantc|php-src/ext/ingres_ii,pecl/ingres
 avail|tal|php-src/ext/fribidi
 avail|bmcadams|php-src/ext/ccvs
-avail|phanto,abrown|php-src/ext/com
+avail|phanto,abrown,wharmby|php-src/ext/com
 avail|steinm|php-src/ext/cpdf
 avail|hholzgra|php-src/ext/ctype
 avail|sterling|php-src/ext/curl

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip/lib zip_close.c zip_open.c zip_source_file.c

2006-11-16 Thread Andi Gutmans
How come the b in fopen() doesn't work? 

 -Original Message-
 From: Pierre-Alain Joye [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 15, 2006 11:14 AM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip/lib 
 zip_close.c zip_open.c zip_source_file.c 
 
 pajoyeWed Nov 15 19:14:02 2006 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/zip/lib  zip_close.c zip_open.c 
 zip_source_file.c 
   Log:
   #9278 and #39506, force the binary mode for the zip 
 operation only. At least I do not have to set/restore it in 
 each function.
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_close.c?
 r1=1.1.2.3r2=1.1.2.4diff_format=u
 Index: php-src/ext/zip/lib/zip_close.c
 diff -u php-src/ext/zip/lib/zip_close.c:1.1.2.3 
 php-src/ext/zip/lib/zip_close.c:1.1.2.4
 --- php-src/ext/zip/lib/zip_close.c:1.1.2.3   Sat Nov 11 19:06:56 2006
 +++ php-src/ext/zip/lib/zip_close.c   Wed Nov 15 19:14:02 2006
 @@ -548,6 +548,9 @@
   free(temp);
   return NULL;
  }
 +#ifdef PHP_WIN32
 + _setmode(_fileno(tfp), _O_BINARY );
 +#endif
  
  *outp = tfp;
  return temp;
 http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_open.c?r
 1=1.1.2.2r2=1.1.2.3diff_format=u
 Index: php-src/ext/zip/lib/zip_open.c
 diff -u php-src/ext/zip/lib/zip_open.c:1.1.2.2 
 php-src/ext/zip/lib/zip_open.c:1.1.2.3
 --- php-src/ext/zip/lib/zip_open.c:1.1.2.2Wed Nov 15 16:24:24 2006
 +++ php-src/ext/zip/lib/zip_open.cWed Nov 15 19:14:02 2006
 @@ -75,10 +75,6 @@
   return NULL;
  }
  
 -#ifdef PHP_WIN32 
 - _fmode = _O_BINARY;
 -#endif
 -
  if (flags  ZIP_OVERWRITE || stat(fn, st) != 0) {
   if ((flags  ZIP_CREATE) || (flags  ZIP_OVERWRITE)) {
   if ((za=_zip_new(error)) == NULL) { @@ -104,7 +100,6 @@
   return NULL;
  }
  
 -
  /* ZIP_CREATE gets ignored if file exists and not ZIP_EXCL,
 just like open() */
   if ((fp=fopen(fn, rb)) == NULL) {
 @@ -112,6 +107,10 @@
   return NULL;
   }
  
 +#ifdef PHP_WIN32
 + _setmode(_fileno(fp), _O_BINARY );
 +#endif
 +
  clearerr(fp);
  fseek(fp, 0, SEEK_END);
  len = ftell(fp);
 http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_source_f
 ile.c?r1=1.1r2=1.1.2.1diff_format=u
 Index: php-src/ext/zip/lib/zip_source_file.c
 diff -u php-src/ext/zip/lib/zip_source_file.c:1.1 
 php-src/ext/zip/lib/zip_source_file.c:1.1.2.1
 --- php-src/ext/zip/lib/zip_source_file.c:1.1 Mon Jul 24 16:58:58 2006
 +++ php-src/ext/zip/lib/zip_source_file.c Wed Nov 15 19:14:02 2006
 @@ -62,6 +62,10 @@
   return NULL;
  }
  
 +#ifdef PHP_WIN32
 + _setmode(_fileno(fp), _O_BINARY );
 +#endif
 +
  if ((zs=zip_source_filep(za, fp, start, len)) == NULL) {
   fclose(fp);
   return NULL;
 
 --
 PHP CVS Mailing List (http://www.php.net/) To unsubscribe, 
 visit: http://www.php.net/unsub.php
 

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip/lib zip_open.c

2006-11-16 Thread Andi Gutmans
Oops, didn't see this. 

 -Original Message-
 From: Pierre [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 15, 2006 9:41 AM
 To: Dmitry Stogov
 Cc: Pierre-Alain Joye; php-cvs@lists.php.net; Wez Furlong
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip/lib zip_open.c
 
 On 11/15/06, Dmitry Stogov [EMAIL PROTECTED] wrote:
  I am not sure in this patch, because it changes the whole 
 process behavior.
  May be you need add character b into 'mode' then you open 
 zip archive?
 
 Please check:
 
 http://news.php.net/php.internals/26606
 
 Can we discuss the issue there?
 
 --Pierre
 
 --
 PHP CVS Mailing List (http://www.php.net/) To unsubscribe, 
 visit: http://www.php.net/unsub.php
 

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-11-10 Thread Andi Gutmans
andiFri Nov 10 18:51:06 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - Fix typo
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.355r2=1.2027.2.547.2.356diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.355 php-src/NEWS:1.2027.2.547.2.356
--- php-src/NEWS:1.2027.2.547.2.355 Fri Nov 10 15:05:22 2006
+++ php-src/NEWSFri Nov 10 18:51:05 2006
@@ -8,7 +8,7 @@
   . implemented registry cache that prevent registry lookup on each request.
 In case of modification of corresponding registry-tree PHP will reload
 it automatic
-  . start timiout thread only if necessary
+  . start timeout thread only if necessary
   . stat() is reimplemented using using GetFileAttributesEx().
 The new implementation is faster then implementation in MS VC CRT, but
 it doesn't support Windows 95.

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip php_zip.c

2006-08-26 Thread Andi Gutmans
I missed the discussion about this. Is there a bug in VCWD_REALPATH()? Can
you explain?

Thanks. 

 -Original Message-
 From: Pierre-Alain Joye [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, August 26, 2006 5:24 AM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip php_zip.c 
 
 pajoyeSat Aug 26 12:23:43 2006 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/zip  php_zip.c 
   Log:
   - don't rely/use VCWD_REALPATH, use expand_filepath instead
 NB: that'd to be true for all this VCWD mess
   
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1
 .2.7r2=1.1.2.8diff_format=u
 Index: php-src/ext/zip/php_zip.c
 diff -u php-src/ext/zip/php_zip.c:1.1.2.7 
 php-src/ext/zip/php_zip.c:1.1.2.8
 --- php-src/ext/zip/php_zip.c:1.1.2.7 Fri Aug 25 16:03:00 2006
 +++ php-src/ext/zip/php_zip.c Sat Aug 26 12:23:43 2006
 @@ -16,7 +16,7 @@

 +-
 -+
  */
  
 -/* $Id: php_zip.c,v 1.1.2.7 2006/08/25 16:03:00 pajoye Exp $ */
 +/* $Id: php_zip.c,v 1.1.2.8 2006/08/26 12:23:43 pajoye Exp $ */
  
  #ifdef HAVE_CONFIG_H
  #include config.h
 @@ -905,7 +905,7 @@
   RETURN_FALSE;
   }
  
 - if (!VCWD_REALPATH(filename, resolved_path)) {
 + if (!expand_filepath(filename, resolved_path TSRMLS_CC)) {
   RETURN_FALSE;
   }
  
 @@ -1982,7 +1982,7 @@
   php_info_print_table_start();
  
   php_info_print_table_row(2, Zip, enabled);
 - php_info_print_table_row(2, Extension Version,$Id: 
 php_zip.c,v 1.1.2.7 2006/08/25 16:03:00 pajoye Exp $);
 + php_info_print_table_row(2, Extension Version,$Id: 
 php_zip.c,v 
 +1.1.2.8 2006/08/26 12:23:43 pajoye Exp $);
   php_info_print_table_row(2, Zip version, 1.7.1);
   php_info_print_table_row(2, Libzip version, 0.7.1);
  
 
 --
 PHP CVS Mailing List (http://www.php.net/) To unsubscribe, 
 visit: http://www.php.net/unsub.php
 

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c php_json.h /ext/pspell php_pspell.h pspell.c /ext/tidy php_tidy.h tidy.c /ext/zlib php

2006-08-26 Thread Andi Gutmans
Why is this important? We never defined these as static. As long as you move
them to the .c file (for whatever reason you have that might be justified)
you really don't have to define them as static IMO. 

 -Original Message-
 From: Nuno Lopes [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 14, 2006 1:08 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c 
 php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c 
 php_json.h /ext/pspell php_pspell.h pspell.c /ext/tidy 
 php_tidy.h tidy.c /ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c 
 
 nlopess   Mon Aug 14 20:08:18 2006 UTC
 
   Modified files:  (Branch: PHP_5_2)
 /php-src/ext/bz2  bz2.c php_bz2.h 
 /php-src/ext/ctypectype.c php_ctype.h 
 /php-src/ext/json json.c php_json.h 
 /php-src/ext/pspell   php_pspell.h pspell.c 
 /php-src/ext/tidy php_tidy.h tidy.c 
 /php-src/ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c 
   Log:
   move static declaration to *.c files
   mroe static/const keywording
   

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



RE: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c php_json.h /ext/pspell php_pspell.h pspell.c /ext/tidy php_tidy.h tidy.c /ext/zlib php

2006-08-26 Thread Andi Gutmans
I don't think it helps. It won't inline these functions in most cases
anyway, and having or not having a symbol shouldn't make a difference.
I'd prefer to stick to our standards and keep all extensions the same. Who
knows if/when we'll want to play around with the symbols also. It could come
in handly with dlls.

Andi 

 -Original Message-
 From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] On Behalf Of 
 Ilia Alshanetsky
 Sent: Saturday, August 26, 2006 9:59 AM
 To: Andi Gutmans
 Cc: 'Nuno Lopes'; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c 
 php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c 
 php_json.h /ext/pspell php_pspell.h pspell.c /ext/tidy 
 php_tidy.h tidy.c /ext/zlib php_zlib.h zlib.c zlib_fopen_wrapper.c 
 
 Andi,
 
 I think the idea here was to minimize memory utilization and 
 allow the compiler to optimize the code better, something 
 that having functions defined as statics appears to help with.
 
 
 On 26-Aug-06, at 11:30 AM, Andi Gutmans wrote:
 
  Why is this important? We never defined these as static. As long as 
  you move them to the .c file (for whatever reason you have 
 that might 
  be
  justified)
  you really don't have to define them as static IMO.
 
 Ilia Alshanetsky
 
 
 
 

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



[PHP-CVS] RE: [PHP-DEV] Re: [PHP-CVS] New Memory Manager (Was: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard var.c /main main.c /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /

2006-07-18 Thread Andi Gutmans
Didn't see this but I did :)

Andi 

 -Original Message-
 From: Andrei Zmievski [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 18, 2006 10:13 AM
 To: Dmitry Stogov
 Cc: php-cvs@lists.php.net; internals@lists.php.net
 Subject: [PHP-DEV] Re: [PHP-CVS] New Memory Manager (Was: 
 [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard var.c 
 /main main.c /sapi/apache mod_php5.c /sapi/apache2filter 
 sapi_apache2.c /sapi/apache2handler sapi_apache2.c /sapi/apache_hooks 
 
 Dmitry, can you put this info into a README file or something?
 
 On Jul 18, 2006, at 2:23 AM, Dmitry Stogov wrote:
 
  Hi,
 
  The main reason of patch is reducing memory allocation overhead and 
  speedup memory management.
 
  The patch requires full PHP rebuild including buildconf.
 
  Now configure has no --disable-zend-memory-manager 
 option, but it 
  has --enable-malloc-mm instead. It is enabled by default in DEBUG 
  build and disabled by default in RELEASE built. It allows select 
  malloc/emalloc at runtime.  So you can use internal and external 
  memory debuggers without recompilation.
 
  $ sapi/cli/php -r 'leak();'
 
  $ USE_ZEND_ALLOC=0 valgrind --leak-check=full -r 'leak();'
 
  The patch allows tweaking memory manager with ZEND_MM_MEM_TYPE and 
  ZEND_MM_SEG_SIZE environment variables. Default values are malloc 
  and 256K. Dependent on target system you can also use 
 mmap_anon, 
  mmap_zero
  and win32 storage managers.
 
  $ ZEND_MM_MEM_TYPE=mmap_anon ZEND_MM_SEG_SIZE=1M sapi/cli/php
 
  Thanks. Dmitry.
 
  -Original Message-
  From: Dmitry Stogov [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 18, 2006 1:07 PM
  To: php-cvs@lists.php.net
  Subject: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS 
 /ext/standard var.c 
  /main main.c /sapi/apache mod_php5.c /sapi/apache2filter 
  sapi_apache2.c /sapi/apache2handler sapi_apache2.c 
 /sapi/apache_hooks 
  mod_php5.c /win32/build
  config.w32 ZendEngine2
 
 
  dmitry Tue Jul 18 09:06:33 2006 UTC
 
Modified files:  (Branch: PHP_5_2)
  /php-src   NEWS
  /ZendEngine2   Zend.m4 zend.c zend_API.h zend_alloc.c
  zend_alloc.h
 zend_compile.c zend_config.w32.h zend_execute.c
 zend_fast_cache.h zend_globals.h 
  zend_globals_macros.h
 zend_mm.c zend_mm.h zend_operators.c
  /php-src/ext/standard  var.c
  /php-src/main  main.c
  /php-src/sapi/apache   mod_php5.c
  /php-src/sapi/apache2filtersapi_apache2.c
  /php-src/sapi/apache2handler   sapi_apache2.c
  /php-src/sapi/apache_hooks mod_php5.c
  /php-src/win32/build   config.w32
Log:
New memory manager
 
 
 
 
  --
  PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: 
  http://www.php.net/unsub.php
 
 
 --
 PHP Internals - PHP Runtime Development Mailing List To 
 unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP-CVS] cvs: php-src /ext/unicode php_transform.h transform.c unicode.c

2006-06-15 Thread Andi Gutmans

Thanks!

At 10:37 AM 6/15/2006, Andrei Zmievski wrote:

andrei  Thu Jun 15 17:37:48 2006 UTC

  Modified files:
/php-src/ext/unicodephp_transform.h transform.c unicode.c
  Log:
  Rename to str_transliterate().


http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/php_transform.h?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/unicode/php_transform.h
diff -u php-src/ext/unicode/php_transform.h:1.1 
php-src/ext/unicode/php_transform.h:1.2

--- php-src/ext/unicode/php_transform.h:1.1 Tue Jun 13 23:46:04 2006
+++ php-src/ext/unicode/php_transform.h Thu Jun 15 17:37:48 2006
@@ -14,12 +14,12 @@
+--+
 */

-/* $Id: php_transform.h,v 1.1 2006/06/13 23:46:04 andrei Exp $ */
+/* $Id: php_transform.h,v 1.2 2006/06/15 17:37:48 andrei Exp $ */

 #ifndef PHP_TRANSFORM_H
 #define PHP_TRANSFORM_H

-PHP_FUNCTION(transliterate);
+PHP_FUNCTION(str_transliterate);

 #endif /* PHP_TRANSFORM_H */

http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/transform.c?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/unicode/transform.c
diff -u php-src/ext/unicode/transform.c:1.2 
php-src/ext/unicode/transform.c:1.3

--- php-src/ext/unicode/transform.c:1.2 Thu Jun 15 10:03:52 2006
+++ php-src/ext/unicode/transform.c Thu Jun 15 17:37:48 2006
@@ -14,11 +14,11 @@
+--+
  */

-/* $Id: transform.c,v 1.2 2006/06/15 10:03:52 dmitry Exp $ */
+/* $Id: transform.c,v 1.3 2006/06/15 17:37:48 andrei Exp $ */

 #include php_unicode.h

-PHP_FUNCTION(transliterate)
+PHP_FUNCTION(str_transliterate)
 {
UChar  *str, *from, *to, *variant = NULL;
int str_len, from_len, to_len, variant_len = 0;
@@ -30,26 +30,6 @@
UErrorCode  status = U_ZERO_ERROR;
int32_t capacity, start, limit;

-   /*
-   {
-
-   char *str;
-   int32_t str_len;
-   UEnumeration *ids;
-
-   ids = utrans_openIDs(status);
-   printf(%d\n, uenum_count(ids, status));
-   str = (char*)uenum_next(ids, str_len, status);
-   while (str) {
-   printf(id: %s\n, str);
-   str = (char*)uenum_next(ids, str_len, status);
-   }
-   uenum_close(ids);
-   }
-
-   return;
-   */
-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, uuu|u, str,
  str_len, 
from, from_len, to, to_len,
  variant, 
variant_len) == FAILURE) {

http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode.c?r1=1.35r2=1.36diff_format=u
Index: php-src/ext/unicode/unicode.c
diff -u php-src/ext/unicode/unicode.c:1.35 php-src/ext/unicode/unicode.c:1.36
--- php-src/ext/unicode/unicode.c:1.35  Tue Jun 13 23:46:04 2006
+++ php-src/ext/unicode/unicode.c   Thu Jun 15 17:37:48 2006
@@ -15,7 +15,7 @@
   +--+
 */

-/* $Id: unicode.c,v 1.35 2006/06/13 23:46:04 andrei Exp $ */
+/* $Id: unicode.c,v 1.36 2006/06/15 17:37:48 andrei Exp $ */

 #include php_unicode.h
 #include zend_unicode.h
@@ -301,7 +301,7 @@

/* text transformation functions */

-   PHP_FE(transliterate, NULL)
+   PHP_FE(str_transliterate, NULL)

{ NULL, NULL, NULL }
 };

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


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



Re: [PHP-CVS] cvs: php-src /ext/unicode config.m4 config.w32 php_transform.h transform.c unicode.c

2006-06-14 Thread Andi Gutmans
I definitely think we should stick to our standard with no 
exceptions. We have suffered from inconsistencies forever.

str_transliterate() sounds good to me.

Andi

At 12:10 AM 6/14/2006, Andrei Zmievski wrote:

Yes, I know. But I don't think anything other than transliterate()
makes sense.

text_transliterate()? str_transliterate()?

We've abandoned the idea of i18n_ prefix and unicode_ doesn't fit
here either..

-Andrei


On Jun 13, 2006, at 8:41 PM, Andi Gutmans wrote:


As you know our naming conventions are module_function, e.g.
unicode_transliterate, i18n_transliterate, char_transliterate.
Don't know what is suitable here but for the past couple of years
we have started enforcing that in all new functions to PHP. See
Naming Conventions in CODING_STANDARDS.

Thx.

At 07:49 PM 6/13/2006, Andrei Zmievski wrote:

What do you mean?

-Andrei


On Jun 13, 2006, at 5:45 PM, Andi Gutmans wrote:


Please fix the naming conventions...


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


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



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



Re: [PHP-CVS] cvs: php-src /ext/unicode config.m4 config.w32 php_transform.h transform.c unicode.c

2006-06-13 Thread Andi Gutmans

Please fix the naming conventions...

At 04:46 PM 6/13/2006, Andrei Zmievski wrote:

andrei  Tue Jun 13 23:46:04 2006 UTC

  Added files:
/php-src/ext/unicodephp_transform.h transform.c

  Modified files:
/php-src/ext/unicodeconfig.m4 config.w32 unicode.c
  Log:
  transliterate()


http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/config.m4?r1=1.9r2=1.10diff_format=u
Index: php-src/ext/unicode/config.m4
diff -u php-src/ext/unicode/config.m4:1.9 php-src/ext/unicode/config.m4:1.10
--- php-src/ext/unicode/config.m4:1.9   Fri May  5 20:56:21 2006
+++ php-src/ext/unicode/config.m4   Tue Jun 13 23:46:04 2006
@@ -1,7 +1,7 @@
 dnl
-dnl $Id: config.m4,v 1.9 2006/05/05 20:56:21 andrei Exp $
+dnl $Id: config.m4,v 1.10 2006/06/13 23:46:04 andrei Exp $
 dnl

 PHP_SUBST(UNICODE_SHARED_LIBADD)
 AC_DEFINE(HAVE_UNICODE, 1, [ ])
-PHP_NEW_EXTENSION(unicode, unicode.c locale.c unicode_iterators.c 
collator.c property.c constants.c, $ext_shared)
+PHP_NEW_EXTENSION(unicode, unicode.c locale.c unicode_iterators.c 
collator.c property.c constants.c transform.c, $ext_shared)

http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/config.w32?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/unicode/config.w32
diff -u php-src/ext/unicode/config.w32:1.10 
php-src/ext/unicode/config.w32:1.11

--- php-src/ext/unicode/config.w32:1.10 Mon May  8 21:06:34 2006
+++ php-src/ext/unicode/config.w32  Tue Jun 13 23:46:04 2006
@@ -1,5 +1,5 @@
-// $Id: config.w32,v 1.10 2006/05/08 21:06:34 edink Exp $
+// $Id: config.w32,v 1.11 2006/06/13 23:46:04 andrei Exp $
 // vim:ft=javascript

-EXTENSION(unicode, unicode.c unicode_iterators.c collator.c 
locale.c property.c constants.c, false);
+EXTENSION(unicode, unicode.c unicode_iterators.c collator.c 
locale.c property.c constants.c transform.c, false);

 AC_DEFINE('HAVE_UNICODE', 1, 'ICU API extension');
http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode.c?r1=1.34r2=1.35diff_format=u
Index: php-src/ext/unicode/unicode.c
diff -u php-src/ext/unicode/unicode.c:1.34 php-src/ext/unicode/unicode.c:1.35
--- php-src/ext/unicode/unicode.c:1.34  Tue May  9 18:21:27 2006
+++ php-src/ext/unicode/unicode.c   Tue Jun 13 23:46:04 2006
@@ -15,11 +15,12 @@
   +--+
 */

-/* $Id: unicode.c,v 1.34 2006/05/09 18:21:27 andrei Exp $ */
+/* $Id: unicode.c,v 1.35 2006/06/13 23:46:04 andrei Exp $ */

 #include php_unicode.h
 #include zend_unicode.h
 #include php_property.h
+#include php_transform.h

 void php_register_unicode_iterators(TSRMLS_D);

@@ -298,6 +299,10 @@
PHP_FE(char_enum_names, NULL)
PHP_FE(char_enum_types, NULL)

+   /* text transformation functions */
+
+   PHP_FE(transliterate, NULL)
+
{ NULL, NULL, NULL }
 };
 /* }}} */

http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/php_transform.h?view=markuprev=1.1
Index: php-src/ext/unicode/php_transform.h
+++ php-src/ext/unicode/php_transform.h
/*
   +--+
   | PHP Version 6|
   +--+
   | This source file is subject to version 3.01 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_01.txt  |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Authors: Andrei Zmievski [EMAIL PROTECTED]|
   +--+
*/

/* $Id: php_transform.h,v 1.1 2006/06/13 23:46:04 andrei Exp $ */

#ifndef PHP_TRANSFORM_H
#define PHP_TRANSFORM_H

PHP_FUNCTION(transliterate);

#endif /* PHP_TRANSFORM_H */


/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim600: noet sw=4 ts=4
 */

http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/transform.c?view=markuprev=1.1
Index: php-src/ext/unicode/transform.c
+++ php-src/ext/unicode/transform.c
/*
   +--+
   | PHP Version 6|
   +--+
   | This source file is subject to version 3.01 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available through the world-wide-web at the following url:   |
   | http://www.php.net/license/3_01.txt  |
   | If you 

Re: [PHP-CVS] cvs: php-src /ext/unicode config.m4 config.w32 php_transform.h transform.c unicode.c

2006-06-13 Thread Andi Gutmans
As you know our naming conventions are module_function, e.g. 
unicode_transliterate, i18n_transliterate, char_transliterate. Don't 
know what is suitable here but for the past couple of years we have 
started enforcing that in all new functions to PHP. See Naming 
Conventions in CODING_STANDARDS.


Thx.

At 07:49 PM 6/13/2006, Andrei Zmievski wrote:

What do you mean?

-Andrei


On Jun 13, 2006, at 5:45 PM, Andi Gutmans wrote:


Please fix the naming conventions...


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


--
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 session.c /ext/soap soap.c /ext/standard basic_functions.c head.c info.c url_scanner_ex.c url_scanner_ex.re var.c /ext/tidy tidy.c /ext/zlib zlib.c /main S

2006-06-03 Thread Andi Gutmans

Thanks!
I missed the original email you sent with the patch which is why I 
didn't catch it earlier.


At 04:19 AM 6/3/2006, Michael Wallner wrote:

mikeSat Jun  3 11:19:44 2006 UTC

  Modified files:
/php-src/ext/sessionsession.c
/php-src/ext/soap   soap.c
/php-src/ext/standard   basic_functions.c head.c info.c
url_scanner_ex.c url_scanner_ex.re var.c
/php-src/ext/tidy   tidy.c
/php-src/ext/zlib   zlib.c
/php-src/main   SAPI.c main.c output.c php_output.h
/php-src/sapi/apachemod_php5.c
/php-src/sapi/apache2handlerphp_functions.c
/php-src/sapi/apache_hooks  mod_php5.c
/php-src/sapi/cli   php_cli.c
/php-src/sapi/nsapi nsapi.c
  Log:
  - explicit usage of TS macros
  # this could have been raised a lot earlier



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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /sapi/cgi cgi_main.c /sapi/cli php_cli.c

2006-06-03 Thread Andi Gutmans

Hey,

I must have missed the discussion around this 
one. Why is it useless? How long has this feature existed?


Thx.
Andi

At 03:02 PM 6/3/2006, Johannes Schlüter wrote:

johannesSat Jun  3 22:02:02 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/sapi/cli   php_cli.c
/php-src/sapi/cgi   cgi_main.c
  Log:
  MFH


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


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



Re: [PHP-CVS] cvs: php-src / README.NEW-OUTPUT-API /ext/pgsql pgsql.c /ext/session session.c /ext/soap soap.c /ext/standard basic_functions.c head.c info.c url_scanner_ex.c url_scanner_ex.re var.c

2006-06-02 Thread Andi Gutmans
Can you give a short summary of what the essence of the change is and 
how the APIs have changed (Both the ones available to the PHP 
developer and to the extension writer?)


Thanks!

Andi

At 12:51 PM 6/2/2006, Michael Wallner wrote:

mikeFri Jun  2 19:51:43 2006 UTC

  Added files:
/php-srcREADME.NEW-OUTPUT-API
/php-src/tests/output   .cvsignore ob_001.phpt ob_002.phpt
ob_003.phpt ob_004.phpt ob_005.phpt
ob_006.phpt ob_007.phpt ob_008.phpt
ob_009.phpt ob_010.phpt ob_011.phpt
ob_012.phpt ob_013.phpt ob_014.phpt
ob_015.phpt

  Modified files:
/php-src/ext/pgsql  pgsql.c
/php-src/ext/sessionsession.c
/php-src/ext/soap   soap.c
/php-src/ext/standard   basic_functions.c head.c info.c
url_scanner_ex.c url_scanner_ex.re var.c
/php-src/ext/tidy   tidy.c
/php-src/ext/zlib   php_zlib.h zlib.c
/php-src/main   SAPI.c main.c output.c php.h php_output.h
/php-src/sapi/apachemod_php5.c php_apache.c
/php-src/sapi/apache2handlerphp_functions.c
/php-src/sapi/apache_hooks  mod_php5.c php_apache.c
/php-src/sapi/cgi   cgi_main.c
/php-src/sapi/cli   php_cli.c
/php-src/sapi/milterphp_milter.c
/php-src/sapi/nsapi nsapi.c
  Log:
  - new output control code

  # scan README.NEW-OUTPUT-API to get a grasp
  # tree has been tagged with BEFORE_NEW_OUTPUT_API
  #
  # TODO:
  #  - improve existing output handlers
  #  - move zlib.output_compression cruft from SAPI.c to zlib.c
  #  - output_encoding handling was ambigious, resp. is undefined yet
  #  - more tests



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


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



Re: [PHP-CVS] cvs: php-src / README.NEW-OUTPUT-API /ext/pgsql pgsql.c /ext/session session.c /ext/soap soap.c /ext/standard basic_functions.c head.c info.c url_scanner_ex.c url_scanner_ex.re var.c

2006-06-02 Thread Andi Gutmans
Btw, any reason why we need all those redefinition of functions? If 
it's just to save having to write TSRMLS_C then I'd prefer to remove 
those macros. They just make debugging harder, there's no real 
benefit and we've tried to be explicit in other places. The patch 
looks nice though although I haven't finished reading through the 
whole thing (I also just found some of the explanations :)Thanks.


+#define php_output_clean() _php_output_clean(TSRMLS_C)
+PHPAPI int _php_output_clean(TSRMLS_D);
+
+#define php_output_clean_all() _php_output_clean_all(TSRMLS_C)
+PHPAPI void _php_output_clean_all(TSRMLS_D);
+
+#define php_output_end() _php_output_end(TSRMLS_C)
+PHPAPI int _php_output_end(TSRMLS_D);
+
+#define php_output_end_all() _php_output_end_all(TSRMLS_C)
+PHPAPI void _php_output_end_all(TSRMLS_D);
+
+#define php_output_discard() _php_output_discard(TSRMLS_C)
+PHPAPI int _php_output_discard(TSRMLS_D);
+
+#define php_output_discard_all() _php_output_discard_all(TSRMLS_C)
+PHPAPI void _php_output_discard_all(TSRMLS_D);


At 12:51 PM 6/2/2006, Michael Wallner wrote:

mikeFri Jun  2 19:51:43 2006 UTC

  Added files:
/php-srcREADME.NEW-OUTPUT-API
/php-src/tests/output   .cvsignore ob_001.phpt ob_002.phpt
ob_003.phpt ob_004.phpt ob_005.phpt
ob_006.phpt ob_007.phpt ob_008.phpt
ob_009.phpt ob_010.phpt ob_011.phpt
ob_012.phpt ob_013.phpt ob_014.phpt
ob_015.phpt

  Modified files:
/php-src/ext/pgsql  pgsql.c
/php-src/ext/sessionsession.c
/php-src/ext/soap   soap.c
/php-src/ext/standard   basic_functions.c head.c info.c
url_scanner_ex.c url_scanner_ex.re var.c
/php-src/ext/tidy   tidy.c
/php-src/ext/zlib   php_zlib.h zlib.c
/php-src/main   SAPI.c main.c output.c php.h php_output.h
/php-src/sapi/apachemod_php5.c php_apache.c
/php-src/sapi/apache2handlerphp_functions.c
/php-src/sapi/apache_hooks  mod_php5.c php_apache.c
/php-src/sapi/cgi   cgi_main.c
/php-src/sapi/cli   php_cli.c
/php-src/sapi/milterphp_milter.c
/php-src/sapi/nsapi nsapi.c
  Log:
  - new output control code

  # scan README.NEW-OUTPUT-API to get a grasp
  # tree has been tagged with BEFORE_NEW_OUTPUT_API
  #
  # TODO:
  #  - improve existing output handlers
  #  - move zlib.output_compression cruft from SAPI.c to zlib.c
  #  - output_encoding handling was ambigious, resp. is undefined yet
  #  - more tests



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


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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-05-30 Thread Andi Gutmans
andiWed May 31 03:43:17 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - Fix typo
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.66r2=1.2027.2.547.2.67diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.66 php-src/NEWS:1.2027.2.547.2.67
--- php-src/NEWS:1.2027.2.547.2.66  Tue May 30 17:40:52 2006
+++ php-src/NEWSWed May 31 03:43:17 2006
@@ -4,7 +4,7 @@
 - Added memory_get_peak_usage() function for retrieving peak memory usage of
   a PHP script. (Ilia)
 - Changed Apache 2 Handler SAPI to call ap_set_content_type() once only. (Mike)
-- Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus)
+- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus)
 - Added control character checks for cURL extension's open_basedir/safe_mode
   checks. (Ilia)
 - Disable realpath cache when open_basedir or safe_mode are enabled on a 

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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h

2006-05-07 Thread Andi Gutmans

Hartmut,

This is a very odd name to be using and doesn't follow our naming conventions.
Maybe something like sys_get_tmpdir()?

Andi


At 02:59 AM 5/6/2006, Hartmut Holzgraefe wrote:

hholzgraSat May  6 09:59:02 2006 UTC

  Modified files:
/php-srcNEWS
/php-src/ext/standard   basic_functions.c file.c file.h
  Log:
  Added php_get_tmpdir() function that returns the default directory for
  temporary files (as requested in bug #35380)


http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2114r2=1.2115diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2114 php-src/NEWS:1.2115
--- php-src/NEWS:1.2114 Wed May  3 19:52:48 2006
+++ php-src/NEWSSat May  6 09:59:02 2006
@@ -52,6 +52,8 @@
   defined using reflection API. (Johannes)
 - Added second optional parameter to stream_context_create() to set params
   during context creation. (Sara)
+- Added php_get_tmpdir() function that returns the default directory for
+  temporary files (as requested in bug #35380). (Hartmut)

 - Fixed bug #36630 (umask not reset at the end of the request). (Ilia)
 - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.769r2=1.770diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.769 
php-src/ext/standard/basic_functions.c:1.770
--- php-src/ext/standard/basic_functions.c:1.769Mon Apr  3 
13:46:35 2006

+++ php-src/ext/standard/basic_functions.c  Sat May  6 09:59:02 2006
@@ -17,7 +17,7 @@
+--+
  */

-/* $Id: basic_functions.c,v 1.769 2006/04/03 13:46:35 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.770 2006/05/06 09:59:02 hholzgra Exp $ */

 #include php.h
 #include php_streams.h
@@ -846,6 +846,8 @@
PHP_FE(output_add_rewrite_var, 
 NULL)
PHP_FE(output_reset_rewrite_vars, 
 NULL)


+   PHP_FE(php_get_tmpdir,  NULL)
+
{NULL, NULL, NULL}
 };

http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.440r2=1.441diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.440 php-src/ext/standard/file.c:1.441
--- php-src/ext/standard/file.c:1.440   Tue May  2 18:23:32 2006
+++ php-src/ext/standard/file.c Sat May  6 09:59:02 2006
@@ -21,7 +21,7 @@
+--+
  */

-/* $Id: file.c,v 1.440 2006/05/02 18:23:32 pollita Exp $ */
+/* $Id: file.c,v 1.441 2006/05/06 09:59:02 hholzgra Exp $ */

 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */

@@ -2555,6 +2555,14 @@
 /* }}} */
 #endif

+/* {{{ proto string php_get_tmpdir()
+   Returns directory path used for temporary files */
+PHP_FUNCTION(php_get_tmpdir)
+{
+   RETURN_STRING((char *)php_get_temporary_directory(), 1);
+}
+/* }}} */
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.h?r1=1.97r2=1.98diff_format=u
Index: php-src/ext/standard/file.h
diff -u php-src/ext/standard/file.h:1.97 php-src/ext/standard/file.h:1.98
--- php-src/ext/standard/file.h:1.97Fri Jan 13 04:10:32 2006
+++ php-src/ext/standard/file.h Sat May  6 09:59:02 2006
@@ -16,7 +16,7 @@
+--+
 */

-/* $Id: file.h,v 1.97 2006/01/13 04:10:32 pajoye Exp $ */
+/* $Id: file.h,v 1.98 2006/05/06 09:59:02 hholzgra Exp $ */

 /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */

@@ -66,6 +66,7 @@
 #endif
 PHP_NAMED_FUNCTION(php_if_ftruncate);
 PHP_NAMED_FUNCTION(php_if_fstat);
+PHP_FUNCTION(php_get_tmpdir);

 PHP_MINIT_FUNCTION(user_streams);


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


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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c file.c file.h

2006-05-07 Thread Andi Gutmans

Either of these works for me.

At 11:02 AM 5/7/2006, Pierre wrote:

On 5/7/06, Antony Dovgal [EMAIL PROTECTED] wrote:

On 07.05.2006 21:26, Wez Furlong wrote:
 sys_tmpdir()?
 I vote for sys_ as the prefix, as we've started down that path with
 sys_getloadavg().

Yeah, sys_tmpdir() sounds good.


For the record, php_get_temporary_directory is the internal name. I
would choose
sys_get_temporary_directory. Or at least respect the CS a bit more and
use sys_get_temp_dir(), as decided a while ago :-)

--Pierre


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard php_smart_str.h

2006-05-02 Thread Andi Gutmans
Does smart_str realloc at the end? If not, then this patch can lead 
to much higher memory use. From our tests we found 5.1 to use more 
memory and this was part of the reason for some slowdown. Even if a 
micro benchmark can show this to be faster, for real world apps and 
the various CPUs we are probably in better shape, when leaving this a 
low but good default. You could even run a few apps and see what 
default size works for the 90% of allocations. That's probably a good 
# to go with.


Andi

At 06:52 AM 5/2/2006, Ilia Alshanetsky wrote:

iliaa   Tue May  2 13:52:25 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   php_smart_str.h
  Log:
  Attempt to increase smart_str performance through the use of larger
  default buffers. Biased micro benchmarks show it makes sense :P


http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_smart_str.h?r1=1.30.2.1r2=1.30.2.2diff_format=u
Index: php-src/ext/standard/php_smart_str.h
diff -u php-src/ext/standard/php_smart_str.h:1.30.2.1 
php-src/ext/standard/php_smart_str.h:1.30.2.2
--- php-src/ext/standard/php_smart_str.h:1.30.2.1   Sun Jan  1 
12:50:15 2006

+++ php-src/ext/standard/php_smart_str.hTue May  2 13:52:24 2006
@@ -16,7 +16,7 @@
+--+
  */

-/* $Id: php_smart_str.h,v 1.30.2.1 2006/01/01 12:50:15 sniper Exp $ */
+/* $Id: php_smart_str.h,v 1.30.2.2 2006/05/02 13:52:24 iliaa Exp $ */

 #ifndef PHP_SMART_STR_H
 #define PHP_SMART_STR_H
@@ -35,11 +35,11 @@
 } while (0)

 #ifndef SMART_STR_PREALLOC
-#define SMART_STR_PREALLOC 128
+#define SMART_STR_PREALLOC 4096
 #endif

 #ifndef SMART_STR_START_SIZE
-#define SMART_STR_START_SIZE 78
+#define SMART_STR_START_SIZE 1024
 #endif

 #ifdef SMART_STR_USE_REALLOC

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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) /sapi/apache php_apache.c

2006-04-27 Thread Andi Gutmans

Shouldn't you use ZEND_DLIMPORT? It'd be much nicer and save us those #ifdef's

Andi

At 02:31 AM 4/26/2006, Edin Kadribasic wrote:

edink   Wed Apr 26 09:31:23 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apachephp_apache.c
  Log:
  Correctly import external data (#33292)

http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache/php_apache.c?r1=1.89.2.3r2=1.89.2.4diff_format=u
Index: php-src/sapi/apache/php_apache.c
diff -u php-src/sapi/apache/php_apache.c:1.89.2.3 
php-src/sapi/apache/php_apache.c:1.89.2.4

--- php-src/sapi/apache/php_apache.c:1.89.2.3   Sun Jan  1 12:50:18 2006
+++ php-src/sapi/apache/php_apache.cWed Apr 26 09:31:23 2006
@@ -17,7 +17,7 @@
|  David Sklar [EMAIL PROTECTED] |
+--+
  */
-/* $Id: php_apache.c,v 1.89.2.3 2006/01/01 12:50:18 sniper Exp $ */
+/* $Id: php_apache.c,v 1.89.2.4 2006/04/26 09:31:23 edink Exp $ */

 #include php_apache_http.h

@@ -34,8 +34,13 @@

 #define SECTION(name)  PUTS(h2 name /h2\n)

+#ifndef PHP_WIN32
 extern module *top_module;
 extern module **ap_loaded_modules;
+#else
+extern  __declspec(dllimport) module *top_module;
+extern  __declspec(dllimport) module **ap_loaded_modules;
+#endif

 PHP_FUNCTION(virtual);
 PHP_FUNCTION(apache_request_headers);

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


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



Re: [PHP-CVS] cvs: php-src /ext/unicode unicode.c /main main.c /main/streams filter.c streams.c ZendEngine2 zend.c zend_constants.c zend_globals.h zend_unicode.c zend_unicode.h

2006-03-26 Thread Andi Gutmans

We should namespaces these and all other unicode constants...

+   REGISTER_MAIN_LONG_CONSTANT(FROM_UNICODE, 
ZEND_FROM_UNICODE, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT(TO_UNICODE, ZEND_TO_UNICODE, 
CONST_PERSISTENT | CONST_CS);



At 05:48 PM 3/25/2006, Andrei Zmievski wrote:

andrei  Sun Mar 26 01:48:33 2006 UTC

  Modified files:
/ZendEngine2zend.c zend_constants.c zend_globals.h 
zend_unicode.c

zend_unicode.h
/php-src/ext/unicodeunicode.c
/php-src/main   main.c
/php-src/main/streams   filter.c streams.c
  Log:
  * Remove unicode.from_error_mode and unicode.from_subst_char from INI
  settings.
  * Add unicode_set_error_mode() and unicode_set_subst_char() functions to
manipulate these global settings.



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


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



[PHP-CVS] cvs: php-src /ext/com_dotnet com_persist.c /ext/curl interface.c /ext/dbase dbase.c /ext/fdf fdf.c /ext/filepro filepro.c /ext/gd php_gd.h /ext/ming ming.c /ext/oci8 oci8_interface.c

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 00:55:21 2006 UTC

  Modified files:  
/php-src/ext/com_dotnet com_persist.c 
/php-src/ext/curl   interface.c 
/php-src/ext/dbase  dbase.c 
/php-src/ext/fdffdf.c 
/php-src/ext/fileprofilepro.c 
/php-src/ext/gd php_gd.h 
/php-src/ext/ming   ming.c 
/php-src/ext/oci8   oci8_interface.c oci8_lob.c 
/php-src/ext/odbc   php_odbc.c 
/php-src/ext/opensslopenssl.c 
/php-src/ext/pdo_sqlite sqlite_driver.c 
/php-src/ext/pgsql  pgsql.c 
/php-src/ext/posix  posix.c 
/php-src/ext/pspell pspell.c 
/php-src/ext/sessionsession.c 
/php-src/ext/sqlite pdo_sqlite2.c sess_sqlite.c sqlite.c 
/php-src/ext/standard   basic_functions.c dir.c file.c filestat.c 
link.c 
/php-src/ext/tidy   tidy.c 
  Log:
  Start nuking safe_mode. Still a lot of work to do...
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_persist.c?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/com_dotnet/com_persist.c
diff -u php-src/ext/com_dotnet/com_persist.c:1.7 
php-src/ext/com_dotnet/com_persist.c:1.8
--- php-src/ext/com_dotnet/com_persist.c:1.7Wed Feb  1 07:42:13 2006
+++ php-src/ext/com_dotnet/com_persist.cSun Feb 19 00:55:19 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_persist.c,v 1.7 2006/02/01 07:42:13 sebastian Exp $ */
+/* $Id: com_persist.c,v 1.8 2006/02/19 00:55:19 andi Exp $ */
 
 /* Infrastructure for working with persistent COM objects.
  * Implements: IStream* wrapper for PHP streams.
@@ -390,10 +390,6 @@
 
if (filename) {
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
-   
-   if (PG(safe_mode)  (!php_checkuid(fullpath, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
-   RETURN_FALSE;
-   }
 
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
RETURN_FALSE;
@@ -451,14 +447,11 @@
php_com_throw_exception(E_INVALIDARG, Invalid 
arguments TSRMLS_CC);
return;
}
-
+
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
 
-   if (PG(safe_mode)  (!php_checkuid(fullpath, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
-   RETURN_FALSE;
-   }
-
-   if (php_check_open_basedir(fullpath TSRMLS_CC)) {
+   if (php_check_open_basedir(fullpath TSRMLS_CC)) {
+   efree(fullpath);
RETURN_FALSE;
}
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?r1=1.74r2=1.75diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.74 php-src/ext/curl/interface.c:1.75
--- php-src/ext/curl/interface.c:1.74   Thu Jan 26 13:20:56 2006
+++ php-src/ext/curl/interface.cSun Feb 19 00:55:19 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.74 2006/01/26 13:20:56 mike Exp $ */
+/* $Id: interface.c,v 1.75 2006/02/19 00:55:19 andi Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -157,8 +157,8 @@
 #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
 
 #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len)  
\
-   if (((PG(open_basedir)  *PG(open_basedir)) || PG(safe_mode))
 \
-   strncasecmp(str, file:, sizeof(file:) - 1) == 0)
\
+   if (((PG(open_basedir)  *PG(open_basedir))) 
\
+   strncasecmp(str, file:, sizeof(file:) - 1) == 0)
\
{   

\
php_url *tmp_url;   

\


\
@@ -167,8 +167,7 @@
RETURN_FALSE;   

\
}   

 

[PHP-CVS] cvs: php-src /main fopen_wrappers.c main.c /main/streams plain_wrapper.c

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 01:10:13 2006 UTC

  Modified files:  
/php-src/main   fopen_wrappers.c main.c 
/php-src/main/streams   plain_wrapper.c 
  Log:
  - Some more safe_mode nuking
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/fopen_wrappers.c?r1=1.177r2=1.178diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.177 php-src/main/fopen_wrappers.c:1.178
--- php-src/main/fopen_wrappers.c:1.177 Sun Jan  1 13:09:57 2006
+++ php-src/main/fopen_wrappers.c   Sun Feb 19 01:10:13 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fopen_wrappers.c,v 1.177 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: fopen_wrappers.c,v 1.178 2006/02/19 01:10:13 andi Exp $ */
 
 /* {{{ includes
  */
@@ -379,9 +379,6 @@

/* Relative path open */
if (*filename == '.') {
-   if (PG(safe_mode)  (!php_checkuid(filename, mode, 
CHECKUID_CHECK_MODE_PARAM))) {
-   return NULL;
-   }
return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
}

@@ -396,16 +393,10 @@
/* filename is in safe_mode_include_dir (or subdir) */
return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);

-   if (PG(safe_mode)  (!php_checkuid(filename, mode, 
CHECKUID_CHECK_MODE_PARAM)))
-   return NULL;
-
return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
}
 
if (!path || (path  !*path)) {
-   if (PG(safe_mode)  (!php_checkuid(filename, mode, 
CHECKUID_CHECK_MODE_PARAM))) {
-   return NULL;
-   }
return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
}
 
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.662r2=1.663diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.662 php-src/main/main.c:1.663
--- php-src/main/main.c:1.662   Fri Feb  3 09:33:31 2006
+++ php-src/main/main.c Sun Feb 19 01:10:13 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.662 2006/02/03 09:33:31 dmitry Exp $ */
+/* $Id: main.c,v 1.663 2006/02/19 01:10:13 andi Exp $ */
 
 /* {{{ includes
  */
@@ -1601,8 +1601,8 @@
orig_unicode = UG(unicode);
UG(unicode) = 0;
 
-   /* Disable realpath cache if safe_mode or open_basedir are set */
-   if (PG(safe_mode) || (PG(open_basedir)  *PG(open_basedir))) {
+   /* Disable realpath cache if open_basedir are set */
+   if ((PG(open_basedir)  *PG(open_basedir))) {
CWDG(realpath_cache_size_limit) = 0;
}
 
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/plain_wrapper.c?r1=1.59r2=1.60diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.59 
php-src/main/streams/plain_wrapper.c:1.60
--- php-src/main/streams/plain_wrapper.c:1.59   Tue Jan 17 12:18:53 2006
+++ php-src/main/streams/plain_wrapper.cSun Feb 19 01:10:13 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.59 2006/01/17 12:18:53 dmitry Exp $ */
+/* $Id: plain_wrapper.c,v 1.60 2006/02/19 01:10:13 andi Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -813,10 +813,6 @@
return NULL;
}

-   if (PG(safe_mode) (!php_checkuid(path, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
-   return NULL;
-   }
-   
dir = VCWD_OPENDIR(path);
 
 #ifdef PHP_WIN32
@@ -935,9 +931,6 @@
return NULL;
}
 
-   if ((options  ENFORCE_SAFE_MODE)  PG(safe_mode)  
(!php_checkuid(path, mode, CHECKUID_CHECK_MODE_PARAM)))
-   return NULL;
-
return php_stream_fopen_rel(path, mode, opened_path, options);
 }
 
@@ -948,10 +941,6 @@
url += sizeof(file://) - 1;
}
 
-   if (PG(safe_mode) (!php_checkuid_ex(url, NULL, 
CHECKUID_CHECK_FILE_AND_DIR, (flags  PHP_STREAM_URL_STAT_QUIET) ? 
CHECKUID_NO_ERRORS : 0))) {
-   return -1;
-   }
-
if (php_check_open_basedir_ex(url, (flags  PHP_STREAM_URL_STAT_QUIET) 
? 0 : 1 TSRMLS_CC)) {
return -1;
}
@@ -975,11 +964,8 @@
url = p + 3;
}
 
+   /* FIXME: Andi - Pending email I sent to internals@ re: 
ENFORCE_SAFE_MODE */
if (options  ENFORCE_SAFE_MODE) {
-   if (PG(safe_mode)  !php_checkuid(url, NULL, 
CHECKUID_CHECK_FILE_AND_DIR)) {
-   return 0;
-   }
-
if (php_check_open_basedir(url TSRMLS_CC)) {
return 0;
}
@@ -1019,11 +1005,6 @@
url_to = p + 3;
}
 
- 

[PHP-CVS] cvs: php-src /main fopen_wrappers.c fopen_wrappers.h /main/streams plain_wrapper.c

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 01:19:37 2006 UTC

  Modified files:  
/php-src/main   fopen_wrappers.c fopen_wrappers.h 
/php-src/main/streams   plain_wrapper.c 
  Log:
  Nuke php_check_safe_mode_include_dir
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/fopen_wrappers.c?r1=1.178r2=1.179diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.178 php-src/main/fopen_wrappers.c:1.179
--- php-src/main/fopen_wrappers.c:1.178 Sun Feb 19 01:10:13 2006
+++ php-src/main/fopen_wrappers.c   Sun Feb 19 01:19:37 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fopen_wrappers.c,v 1.178 2006/02/19 01:10:13 andi Exp $ */
+/* $Id: fopen_wrappers.c,v 1.179 2006/02/19 01:19:37 andi Exp $ */
 
 /* {{{ includes
  */
@@ -187,55 +187,6 @@
 }
 /* }}} */
 
-/* {{{ php_check_safe_mode_include_dir
- */
-PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
-{
-   if (PG(safe_mode)) {
-   if (PG(safe_mode_include_dir)  *PG(safe_mode_include_dir)) {
-   char *pathbuf;
-   char *ptr;
-   char *end;
-   char resolved_name[MAXPATHLEN];
-
-   /* Resolve the real path into resolved_name */
-   if (expand_filepath(path, resolved_name TSRMLS_CC) == 
NULL)
-   return -1;
-
-   pathbuf = estrdup(PG(safe_mode_include_dir));
-
-   ptr = pathbuf;
-
-   while (ptr  *ptr) {
-   end = strchr(ptr, DEFAULT_DIR_SEPARATOR);
-   if (end != NULL) {
-   *end = '\0';
-   end++;
-   }
-
-   /* Check the path */
-#ifdef PHP_WIN32
-   if (strncasecmp(ptr, resolved_name, 
strlen(ptr)) == 0)
-#else
-   if (strncmp(ptr, resolved_name, strlen(ptr)) == 
0)
-#endif
-   {
-   /* File is in the right directory */
-   efree(pathbuf);
-   return 0;
-   }
-
-   ptr = end;
-   }
-   efree(pathbuf);
-   }
-   return -1;
-   }
-
-   /* Nothing to check... */
-   return 0;
-}
-/* }}} */
 
 /* {{{ php_fopen_and_set_opened_path
  */
@@ -387,16 +338,9 @@
 * safe mode GID/UID checks
 */

-   /* Absolute path open */
-   if (IS_ABSOLUTE_PATH(filename, filename_length)) {
-   if ((php_check_safe_mode_include_dir(filename TSRMLS_CC)) == 0)
-   /* filename is in safe_mode_include_dir (or subdir) */
-   return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
-   
-   return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
-   }
-
-   if (!path || (path  !*path)) {
+   /* Absolute path open */
+   /* FIXME: Andi - Do we actually need the if()? */
+   if (IS_ABSOLUTE_PATH(filename, filename_length) || (!path || (path  
!*path))) {
return php_fopen_and_set_opened_path(filename, mode, 
opened_path TSRMLS_CC);
}
 
@@ -434,20 +378,7 @@
end++;
}
snprintf(trypath, MAXPATHLEN, %s/%s, ptr, filename);
-   if (PG(safe_mode)) {
-   if (VCWD_STAT(trypath, sb) == 0) {
-   /* file exists ... check permission */
-   if ((php_check_safe_mode_include_dir(trypath 
TSRMLS_CC) == 0) ||
-   php_checkuid(trypath, mode, 
CHECKUID_CHECK_MODE_PARAM))
-   /* UID ok, or trypath is in 
safe_mode_include_dir */
-   fp = 
php_fopen_and_set_opened_path(trypath, mode, opened_path TSRMLS_CC);
-   else
-   fp = NULL;
-
-   efree(pathbuf);
-   return fp;
-   }
-   }
+   
fp = php_fopen_and_set_opened_path(trypath, mode, opened_path 
TSRMLS_CC);
if (fp) {
efree(pathbuf);
http://cvs.php.net/viewcvs.cgi/php-src/main/fopen_wrappers.h?r1=1.45r2=1.46diff_format=u
Index: php-src/main/fopen_wrappers.h
diff -u php-src/main/fopen_wrappers.h:1.45 php-src/main/fopen_wrappers.h:1.46
--- php-src/main/fopen_wrappers.h:1.45  Sun Jan  1 13:09:57 2006
+++ php-src/main/fopen_wrappers.h   Sun Feb 19 

[PHP-CVS] cvs: php-src /ext/curl interface.c /ext/openssl openssl.c /ext/standard file.c ftok.c iptc.c

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 03:07:39 2006 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
/php-src/ext/opensslopenssl.c 
/php-src/ext/standard   file.c ftok.c iptc.c 
  Log:
  - More safe_mode nuking
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?r1=1.75r2=1.76diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.75 php-src/ext/curl/interface.c:1.76
--- php-src/ext/curl/interface.c:1.75   Sun Feb 19 00:55:19 2006
+++ php-src/ext/curl/interface.cSun Feb 19 03:07:38 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.75 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: interface.c,v 1.76 2006/02/19 03:07:38 andi Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -1281,7 +1281,7 @@
 * use since curl needs a long not an 
int. */
if (*postval == '@') {
++postval;
-   /* safe_mode / open_basedir 
check */
+   /* open_basedir check */
if 
(php_check_open_basedir(postval TSRMLS_CC)) {
RETURN_FALSE;
}
http://cvs.php.net/viewcvs.cgi/php-src/ext/openssl/openssl.c?r1=1.103r2=1.104diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.103 php-src/ext/openssl/openssl.c:1.104
--- php-src/ext/openssl/openssl.c:1.103 Sun Feb 19 00:55:20 2006
+++ php-src/ext/openssl/openssl.c   Sun Feb 19 03:07:38 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.103 2006/02/19 00:55:20 andi Exp $ */
+/* $Id: openssl.c,v 1.104 2006/02/19 03:07:38 andi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -179,17 +179,6 @@
 }
 /* }}} */
 
-/* {{{ openssl open_basedir checks */
-inline static int php_openssl_safe_mode_chk(char *filename TSRMLS_DC)
-{
-   if (php_check_open_basedir(filename TSRMLS_CC)) {
-   return -1;
-   }
-   
-   return 0;
-}
-/* }}} */
-
 /* {{{ openssl - PHP bridging */
 /* true global; readonly after module startup */
 static char default_ssl_conf_filename[MAXPATHLEN];
@@ -439,7 +428,7 @@
 
/* read in the oids */
str = CONF_get_string(req-req_config, NULL, oid_file);
-   if (str  !php_openssl_safe_mode_chk(str TSRMLS_CC)) {
+   if (str  !php_check_open_basedir(str TSRMLS_CC)) {
BIO *oid_bio = BIO_new_file(str, r);
if (oid_bio) {
OBJ_create_objects(oid_bio);
@@ -748,7 +737,7 @@
/* read cert from the named file */
BIO *in;
 
-   if (php_openssl_safe_mode_chk(Z_STRVAL_PP(val) + 
(sizeof(file://) - 1) TSRMLS_CC)) {
+   if (php_check_open_basedir(Z_STRVAL_PP(val) + 
(sizeof(file://) - 1) TSRMLS_CC)) {
return NULL;
}
 
@@ -800,7 +789,7 @@
return;
}
 
-   if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
return;
}
 
@@ -1000,7 +989,7 @@
goto end;
}
 
-   if (php_openssl_safe_mode_chk(certfile TSRMLS_CC)) {
+   if (php_check_open_basedir(certfile TSRMLS_CC)) {
goto end;
}
 
@@ -1400,7 +1389,7 @@
filename = Z_STRVAL_PP(val) + (sizeof(file://) - 1);
}
if (filename) {
-   if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
return NULL;
}
in = BIO_new_file(filename, r);
@@ -1436,7 +1425,7 @@
return;
}
 
-   if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
return;
}
 
@@ -1833,7 +1822,7 @@
BIO *in;
 
if (filename) {
-   if (php_openssl_safe_mode_chk(filename 
TSRMLS_CC)) {
+   if (php_check_open_basedir(filename TSRMLS_CC)) 
{
return NULL;
}
in = BIO_new_file(filename, r);
@@ -2002,7 +1991,7 @@
RETURN_FALSE;
}

-   if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+   if (php_check_open_basedir(filename TSRMLS_CC)) {
RETURN_FALSE;
}

@@ -2188,7 +2177,7 @@
if (!store) {
goto clean_exit;
}
-   if 

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

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 03:41:25 2006 UTC

  Modified files:  
/php-src/main/streams   plain_wrapper.c 
  Log:
  - Fix according to Sara's reply
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/plain_wrapper.c?r1=1.61r2=1.62diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.61 
php-src/main/streams/plain_wrapper.c:1.62
--- php-src/main/streams/plain_wrapper.c:1.61   Sun Feb 19 01:19:37 2006
+++ php-src/main/streams/plain_wrapper.cSun Feb 19 03:41:25 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: plain_wrapper.c,v 1.61 2006/02/19 01:19:37 andi Exp $ */
+/* $Id: plain_wrapper.c,v 1.62 2006/02/19 03:41:25 andi Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -963,9 +963,8 @@
if ((p = strstr(url, ://)) != NULL) {
url = p + 3;
}
-
-   /* FIXME: Andi - Pending email I sent to internals@ re: 
ENFORCE_SAFE_MODE */
-   if (options  ENFORCE_SAFE_MODE) {
+
+   if (!(options  STREAM_DISABLE_OPEN_BASEDIR)) {
if (php_check_open_basedir(url TSRMLS_CC)) {
return 0;
}

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



[PHP-CVS] cvs: php-src /ext/bz2 bz2.c /ext/dba dba.c /ext/exif exif.c /ext/ftp php_ftp.c /ext/gd gd.c /ext/hash hash.c hash_md.c hash_sha.c /ext/imap php_imap.c /ext/libxml libxml.c /ext/mime_

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 04:29:42 2006 UTC

  Modified files:  
/php-src/ext/bz2bz2.c 
/php-src/ext/dbadba.c 
/php-src/ext/exif   exif.c 
/php-src/ext/ftpphp_ftp.c 
/php-src/ext/gd gd.c 
/php-src/ext/hash   hash.c hash_md.c hash_sha.c 
/php-src/ext/imap   php_imap.c 
/php-src/ext/libxml libxml.c 
/php-src/ext/mime_magic mime_magic.c 
/php-src/ext/ming   ming.c 
/php-src/ext/oci8   oci8_interface.c 
/php-src/ext/pdopdo_dbh.c 
/php-src/ext/pgsql  pgsql.c 
/php-src/ext/soap   php_http.c php_xml.c 
/php-src/ext/splspl_directory.c 
/php-src/ext/standard   basic_functions.c dir.c file.c fsock.c 
http_fopen_wrapper.c image.c md5.c 
proc_open.c sha1.c streamsfuncs.c 
/php-src/ext/tidy   tidy.c 
/php-src/ext/xmlwriter  php_xmlwriter.c 
/php-src/ext/zlib   zlib.c 
/php-src/main   main.c network.c 
/php-src/main/streams   streams.c 
  Log:
  - Get rid of using ENFORCE_SAFE_MODE.
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/bz2/bz2.c?r1=1.17r2=1.18diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.17 php-src/ext/bz2/bz2.c:1.18
--- php-src/ext/bz2/bz2.c:1.17  Sun Jan  1 13:09:48 2006
+++ php-src/ext/bz2/bz2.c   Sun Feb 19 04:29:40 2006
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.17 2006/01/01 13:09:48 sniper Exp $ */
+/* $Id: bz2.c,v 1.18 2006/02/19 04:29:40 andi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -327,7 +327,7 @@
stream = php_stream_bz2open(NULL,

Z_STRVAL_PP(file), 

Z_STRVAL_PP(mode), 
-   
ENFORCE_SAFE_MODE | REPORT_ERRORS, 
+   
REPORT_ERRORS, 
NULL);
} else {
/* If it is a resource, than its a stream resource */
http://cvs.php.net/viewcvs.cgi/php-src/ext/dba/dba.c?r1=1.115r2=1.116diff_format=u
Index: php-src/ext/dba/dba.c
diff -u php-src/ext/dba/dba.c:1.115 php-src/ext/dba/dba.c:1.116
--- php-src/ext/dba/dba.c:1.115 Sun Jan  1 13:09:49 2006
+++ php-src/ext/dba/dba.c   Sun Feb 19 04:29:40 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: dba.c,v 1.115 2006/01/01 13:09:49 sniper Exp $ */
+/* $Id: dba.c,v 1.116 2006/02/19 04:29:40 andi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -753,7 +753,7 @@
/* when in read only mode try to use existing 
.lck file first */
/* do not log errors for .lck file while in 
read ony mode on .lck file */
lock_file_mode = rb;
-   info-lock.fp = 
php_stream_open_wrapper(lock_name, lock_file_mode, 
STREAM_MUST_SEEK|IGNORE_PATH|ENFORCE_SAFE_MODE|persistent_flag, opened_path);
+   info-lock.fp = 
php_stream_open_wrapper(lock_name, lock_file_mode, 
STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, opened_path);
}
if (!info-lock.fp) {
/* when not in read mode or failed to open .lck 
file read only. now try again in create(write) mode and log errors */
@@ -768,7 +768,7 @@
}
}
if (!info-lock.fp) {
-   info-lock.fp = php_stream_open_wrapper(lock_name, 
lock_file_mode, 
STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|ENFORCE_SAFE_MODE|persistent_flag, 
opened_path);
+   info-lock.fp = php_stream_open_wrapper(lock_name, 
lock_file_mode, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|persistent_flag, 
opened_path);
if (info-lock.fp) {
if (lock_dbf) {
/* replace the path info with the real 
path of the opened file */
@@ -806,7 +806,7 @@
if (info-lock.fp  lock_dbf) {
info-fp = info-lock.fp; /* use the same stream for 
locking and database access */
} else {
-   info-fp = php_stream_open_wrapper(info-path, 
file_mode, 
STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|ENFORCE_SAFE_MODE|persistent_flag, 
NULL);
+   info-fp = php_stream_open_wrapper(info-path, 
file_mode, STREAM_MUST_SEEK|REPORT_ERRORS|IGNORE_PATH|persistent_flag, NULL);
}
if (!info-fp) {
dba_close(info TSRMLS_CC);
http://cvs.php.net/viewcvs.cgi/php-src/ext/exif/exif.c?r1=1.177r2=1.178diff_format=u

[PHP-CVS] cvs: php-src /ext/curl interface.c /ext/gd php_gd.h

2006-02-18 Thread Andi Gutmans
andiSun Feb 19 05:05:42 2006 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
/php-src/ext/gd php_gd.h 
  Log:
  - Couple of compile fixes.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?r1=1.76r2=1.77diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.76 php-src/ext/curl/interface.c:1.77
--- php-src/ext/curl/interface.c:1.76   Sun Feb 19 03:07:38 2006
+++ php-src/ext/curl/interface.cSun Feb 19 05:05:42 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.76 2006/02/19 03:07:38 andi Exp $ */
+/* $Id: interface.c,v 1.77 2006/02/19 05:05:42 andi Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -157,8 +157,8 @@
 #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
 
 #define PHP_CURL_CHECK_OPEN_BASEDIR(str, len)  
\
-   if (((PG(open_basedir)  *PG(open_basedir))) 
\
-   strncasecmp(str, file:, sizeof(file:) - 1) == 0)
\
+   if ((PG(open_basedir)  *PG(open_basedir))   
  \
+   strncasecmp(str, file:, sizeof(file:) - 1) == 0)
\
{   

\
php_url *tmp_url;   

\


\
@@ -167,8 +167,7 @@
RETURN_FALSE;   

\
}   

\


\
-   if (tmp_url-query || tmp_url-fragment || 
php_check_open_basedir(tmp_url-path TSRMLS_CC)) \
-   ) { 

\
+   if (tmp_url-query || tmp_url-fragment || 
php_check_open_basedir(tmp_url-path TSRMLS_CC)) { \
php_url_free(tmp_url);  

\
RETURN_FALSE;   

\
}   

\
http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/php_gd.h?r1=1.65r2=1.66diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.65 php-src/ext/gd/php_gd.h:1.66
--- php-src/ext/gd/php_gd.h:1.65Sun Feb 19 00:55:19 2006
+++ php-src/ext/gd/php_gd.h Sun Feb 19 05:05:42 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.65 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: php_gd.h,v 1.66 2006/02/19 05:05:42 andi Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -32,10 +32,9 @@
 
 /* open_basedir and safe_mode checks */
 #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg)  
 \
-   if (!filename || php_check_open_basedir(filename TSRMLS_CC))
\
-   ) { 
\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg);  
\
-   RETURN_FALSE;   
\
+   if (!filename || php_check_open_basedir(filename TSRMLS_CC)) {  
\
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg);  
\
+   RETURN_FALSE;  

Re: [PHP-CVS] cvs: php-src(PHP_5_1) / configure.in /ext/standard basic_functions.c basic_functions.h

2006-02-17 Thread Andi Gutmans
Yep, but once it's mainstream then the general public is more 
important than phpweb :)


At 11:52 PM 2/16/2006, Wez Furlong wrote:

I'm fine with the name being changed, but keep in mind that phpweb has
been using this function with this name for a couple of years, so any
change in the name here needs to be matched in phpweb.

--Wez.

Andi Gutmans wrote:
 Hey Wez,

 We should stick to coding standards for new functions.
 How about sys_getloadavg()?

 Andi

 At 02:49 PM 2/16/2006, Wez Furlong wrote:
 wez Thu Feb 16 22:49:13 2006 UTC

   Modified files:  (Branch: PHP_5_1)
 /php-srcconfigure.in
 /php-src/ext/standard   basic_functions.c basic_functions.h
   Log:
   add getloadavg() function that has been running in production on
 rs1.php.net
   for a couple of years.



 
http://cvs.php.net/viewcvs.cgi/php-src/configure.in?r1=1.579.2.36r2=1.579.2.37diff_format=u


 Index: php-src/configure.in
 diff -u php-src/configure.in:1.579.2.36 php-src/configure.in:1.579.2.37
 --- php-src/configure.in:1.579.2.36 Thu Jan 12 15:24:10 2006
 +++ php-src/configure.inThu Feb 16 22:49:13 2006
 @@ -1,4 +1,4 @@
 - ## $Id: configure.in,v 1.579.2.36 2006/01/12 15:24:10 iliaa Exp $
 -*- autoconf -*-
 + ## $Id: configure.in,v 1.579.2.37 2006/02/16 22:49:13 wez Exp $ -*-
 autoconf -*-
  dnl ## Process this file with autoconf to produce a configure script.

  divert(1)
 @@ -466,6 +466,7 @@
  funopen \
  gai_strerror \
  gcvt \
 +getloadavg \
  getlogin \
  getprotobyname \
  getprotobynumber \
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.20r2=1.725.2.21diff_format=u


 Index: php-src/ext/standard/basic_functions.c
 diff -u php-src/ext/standard/basic_functions.c:1.725.2.20
 php-src/ext/standard/basic_functions.c:1.725.2.21
 --- php-src/ext/standard/basic_functions.c:1.725.2.20   Thu Feb 16
 10:13:52 2006
 +++ php-src/ext/standard/basic_functions.c  Thu Feb 16 22:49:13 2006
 @@ -17,7 +17,7 @@

 +--+
   */

 -/* $Id: basic_functions.c,v 1.725.2.20 2006/02/16 10:13:52 tony2001
 Exp $ */
 +/* $Id: basic_functions.c,v 1.725.2.21 2006/02/16 22:49:13 wez Exp $ */

  #include php.h
  #include php_streams.h
 @@ -425,7 +425,9 @@
  #ifdef HAVE_GETOPT
 PHP_FE(getopt,

 NULL)
  #endif
 -
 +#ifdef HAVE_GETLOADAVG
 +   PHP_FE(getloadavg,
NULL)
 +#endif
  #ifdef HAVE_GETTIMEOFDAY
 PHP_FE(microtime,

 NULL)
 PHP_FE(gettimeofday,
  NULL)
 @@ -3344,6 +3346,23 @@
  }
  /* }}} */

 +#ifdef HAVE_GETLOADAVG
 +PHP_FUNCTION(getloadavg)
 +{
 +   double load[3];
 +
 +   if (getloadavg(load, 3) == -1) {
 +   RETURN_FALSE;
 +   } else {
 +   array_init(return_value);
 +   add_index_double(return_value, 0, load[0]);
 +   add_index_double(return_value, 1, load[1]);
 +   add_index_double(return_value, 2, load[2]);
 +   }
 +}
 +#endif
 +
 +
  /*
   * Local variables:
   * tab-width: 4
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.2r2=1.139.2.3diff_format=u


 Index: php-src/ext/standard/basic_functions.h
 diff -u php-src/ext/standard/basic_functions.h:1.139.2.2
 php-src/ext/standard/basic_functions.h:1.139.2.3
 --- php-src/ext/standard/basic_functions.h:1.139.2.2Sat Jan 28
 06:14:34 2006
 +++ php-src/ext/standard/basic_functions.h  Thu Feb 16 22:49:13 2006
 @@ -17,7 +17,7 @@

 +--+
  */

 -/* $Id: basic_functions.h,v 1.139.2.2 2006/01/28 06:14:34 fmk Exp $ */
 +/* $Id: basic_functions.h,v 1.139.2.3 2006/02/16 22:49:13 wez Exp $ */

  #ifndef BASIC_FUNCTIONS_H
  #define BASIC_FUNCTIONS_H
 @@ -116,6 +116,9 @@

  PHP_FUNCTION(register_tick_function);
  PHP_FUNCTION(unregister_tick_function);
 +#ifdef HAVE_GETLOADAVG
 +PHP_FUNCTION(getloadavg);
 +#endif

  PHP_FUNCTION(is_uploaded_file);
  PHP_FUNCTION(move_uploaded_file);

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


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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) / configure.in /ext/standard basic_functions.c basic_functions.h

2006-02-16 Thread Andi Gutmans

Hey Wez,

We should stick to coding standards for new functions.
How about sys_getloadavg()?

Andi

At 02:49 PM 2/16/2006, Wez Furlong wrote:

wez Thu Feb 16 22:49:13 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcconfigure.in
/php-src/ext/standard   basic_functions.c basic_functions.h
  Log:
  add getloadavg() function that has been running in production on 
rs1.php.net

  for a couple of years.



http://cvs.php.net/viewcvs.cgi/php-src/configure.in?r1=1.579.2.36r2=1.579.2.37diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.36 php-src/configure.in:1.579.2.37
--- php-src/configure.in:1.579.2.36 Thu Jan 12 15:24:10 2006
+++ php-src/configure.inThu Feb 16 22:49:13 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.36 2006/01/12 15:24:10 iliaa Exp $ 
-*- autoconf -*-
+ ## $Id: configure.in,v 1.579.2.37 2006/02/16 22:49:13 wez Exp $ 
-*- autoconf -*-

 dnl ## Process this file with autoconf to produce a configure script.

 divert(1)
@@ -466,6 +466,7 @@
 funopen \
 gai_strerror \
 gcvt \
+getloadavg \
 getlogin \
 getprotobyname \
 getprotobynumber \
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.20r2=1.725.2.21diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.20 
php-src/ext/standard/basic_functions.c:1.725.2.21
--- php-src/ext/standard/basic_functions.c:1.725.2.20   Thu Feb 16 
10:13:52 2006

+++ php-src/ext/standard/basic_functions.c  Thu Feb 16 22:49:13 2006
@@ -17,7 +17,7 @@
+--+
  */

-/* $Id: basic_functions.c,v 1.725.2.20 2006/02/16 10:13:52 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.21 2006/02/16 22:49:13 wez Exp $ */

 #include php.h
 #include php_streams.h
@@ -425,7 +425,9 @@
 #ifdef HAVE_GETOPT
PHP_FE(getopt, 
 NULL)

 #endif
-
+#ifdef HAVE_GETLOADAVG
+   PHP_FE(getloadavg, 
   NULL)

+#endif
 #ifdef HAVE_GETTIMEOFDAY
PHP_FE(microtime, 
 NULL)
PHP_FE(gettimeofday, 
 NULL)

@@ -3344,6 +3346,23 @@
 }
 /* }}} */

+#ifdef HAVE_GETLOADAVG
+PHP_FUNCTION(getloadavg)
+{
+   double load[3];
+
+   if (getloadavg(load, 3) == -1) {
+   RETURN_FALSE;
+   } else {
+   array_init(return_value);
+   add_index_double(return_value, 0, load[0]);
+   add_index_double(return_value, 1, load[1]);
+   add_index_double(return_value, 2, load[2]);
+   }
+}
+#endif
+
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.2r2=1.139.2.3diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.139.2.2 
php-src/ext/standard/basic_functions.h:1.139.2.3
--- php-src/ext/standard/basic_functions.h:1.139.2.2Sat Jan 28 
06:14:34 2006

+++ php-src/ext/standard/basic_functions.h  Thu Feb 16 22:49:13 2006
@@ -17,7 +17,7 @@
+--+
 */

-/* $Id: basic_functions.h,v 1.139.2.2 2006/01/28 06:14:34 fmk Exp $ */
+/* $Id: basic_functions.h,v 1.139.2.3 2006/02/16 22:49:13 wez Exp $ */

 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -116,6 +116,9 @@

 PHP_FUNCTION(register_tick_function);
 PHP_FUNCTION(unregister_tick_function);
+#ifdef HAVE_GETLOADAVG
+PHP_FUNCTION(getloadavg);
+#endif

 PHP_FUNCTION(is_uploaded_file);
 PHP_FUNCTION(move_uploaded_file);

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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) / NEWS php.ini-dist php.ini-recommended

2006-02-08 Thread Andi Gutmans

Thanks.
Sucks that this was missing :)

At 03:43 PM 2/8/2006, Ilia Alshanetsky wrote:

iliaa   Wed Feb  8 23:43:48 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcphp.ini-dist php.ini-recommended NEWS
  Log:
  Fixed bug #36334 (Added missing documentation about realpath cache INI
  settings).


http://cvs.php.net/viewcvs.cgi/php-src/php.ini-dist?r1=1.231.2.9r2=1.231.2.10diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231.2.9 php-src/php.ini-dist:1.231.2.10
--- php-src/php.ini-dist:1.231.2.9  Sun Feb  5 16:04:11 2006
+++ php-src/php.ini-distWed Feb  8 23:43:48 2006
@@ -227,6 +227,16 @@
 ; being interrupted by the user or a browser timing out.
 ; ignore_user_abort = On

+; Determines the size of the realpath cache to be used by PHP. This 
value should
+; be increased on systems where PHP opens many files to reflect the 
quantity of

+; the file operations performed.
+; realpath_cache_size=16k
+
+; Duration of time, in seconds for which to cache realpath 
information for a given
+; file or directory. For systems with rarely changing files, 
consider increasing this

+; value.
+; realpath_cache_ttl=120
+
 ;
 ; Misc
 ;
http://cvs.php.net/viewcvs.cgi/php-src/php.ini-recommended?r1=1.179.2.10r2=1.179.2.11diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179.2.10 
php-src/php.ini-recommended:1.179.2.11

--- php-src/php.ini-recommended:1.179.2.10  Sun Feb  5 16:04:11 2006
+++ php-src/php.ini-recommended Wed Feb  8 23:43:48 2006
@@ -285,6 +285,16 @@
 ; being interrupted by the user or a browser timing out.
 ; ignore_user_abort = On

+; Determines the size of the realpath cache to be used by PHP. This 
value should
+; be increased on systems where PHP opens many files to reflect the 
quantity of

+; the file operations performed.
+; realpath_cache_size=16k
+
+; Duration of time, in seconds for which to cache realpath 
information for a given
+; file or directory. For systems with rarely changing files, 
consider increasing this

+; value.
+; realpath_cache_ttl=120
+
 ;
 ; Misc
 ;
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.407r2=1.2027.2.408diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.407 php-src/NEWS:1.2027.2.408
--- php-src/NEWS:1.2027.2.407   Wed Feb  8 00:36:57 2006
+++ php-src/NEWSWed Feb  8 23:43:48 2006
@@ -20,6 +20,8 @@
 - Added imap_savebody() that allows message body to be written to 
a file. (Mike)

 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
+- Fixed bug #36334 (Added missing documentation about realpath cache INI
+  settings). (Ilia)
 - Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
   extended class commentary). (Ilia)
 - Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)

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


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



Re: [PHP-CVS] cvs: php-src /ext/msession README config.m4 msession-test.php msession.c msessionapi.h php_msession.h reqclient.h

2006-01-30 Thread Andi Gutmans
Seems like your commit screwed up the copyright notice. Did you 
commit ancient code? :)


-   | Copyright (c) 1997-2006 The PHP Group|
+   | Copyright (c) 1997-2003 The PHP Group|
+--+
-   | This source file is subject to version 3.01 of the PHP license,  |
+   | This source file is subject to version 2.02 of the PHP license,  |
| that is bundled with this package in the file LICENSE, and is|
-   | available through the world-wide-web at the following url:   |
-   | http://www.php.net/license/3_01.txt  |
+   | available at through the world-wide-web at   |
+   | http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to   |

At 08:18 AM 1/30/2006, Mark L. Woodward wrote:

mlwmohawk   Mon Jan 30 16:18:39 2006 UTC

  Added files:
/php-src/ext/msession   msessionapi.h

  Modified files:
/php-src/ext/msession   README config.m4 msession-test.php 
msession.c

php_msession.h reqclient.h
  Log:
  MSession now works with the new MCache server



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


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



Re: [PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests 007.phpt

2006-01-27 Thread Andi Gutmans
OK in that case it's probably best not to add inconsistency and leave 
it this way.


At 12:44 AM 1/25/2006, Marcus Boerger wrote:

Hello Andi,

  it was Sebastians idea and he took the name from invokeArgs().
I don't care, so if you can sleep better with your proposal change both
names and live with BC break.

marcus

Wednesday, January 25, 2006, 3:46:16 AM, you wrote:

 Might be nicer to call it newInstanceWithArgs() but it's a matter of
 taste so I'll leave it up to you to decide if you think it's 
nicer or not :)


 Andi

 At 12:19 PM 1/24/2006, Marcus Boerger wrote:
helly   Tue Jan 24 20:19:49 2006 UTC

   Added files:
 /php-src/ext/reflection/tests   007.phpt

   Modified files:
 /php-src/ext/reflection php_reflection.c
   Log:
   - Implemented #36141 Add ReflectionClass::newInstanceArgs($args)


http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflecti 
on.c?r1=1.200r2=1.201diff_format=u

Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.200
php-src/ext/reflection/php_reflection.c:1.201
--- php-src/ext/reflection/php_reflection.c:1.200   Tue Jan 17
12:18:52 2006
+++ php-src/ext/reflection/php_reflection.c Tue Jan 24 20:19:49 2006
@@ -20,7 +20,7 @@
 
+--+

  */

-/* $Id: php_reflection.c,v 1.200 2006/01/17 12:18:52 dmitry Exp $ */
+/* $Id: php_reflection.c,v 1.201 2006/01/24 20:19:49 helly Exp $ */

  #ifdef HAVE_CONFIG_H
  #include config.h
@@ -3193,8 +3193,6 @@
 METHOD_NOTSTATIC(reflection_class_ptr);
 GET_REFLECTION_OBJECT_PTR(ce);

-   object_init_ex(return_value, ce);
-
 /* Run the constructor if there is one */
 if (ce-constructor) {
 zval ***params;
@@ -3212,6 +3210,8 @@
 RETURN_FALSE;
 }

+   object_init_ex(return_value, ce);
+
 fci.size = sizeof(fci);
 fci.function_table = EG(function_table);
 fci.function_name = NULL;
@@ -3237,6 +3237,79 @@
 zval_ptr_dtor(retval_ptr);
 }
 efree(params);
+   } else if (!ZEND_NUM_ARGS()) {
+   object_init_ex(return_value, ce);
+   } else {
+
zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0
TSRMLS_CC, Class %v does not have a constructor, so you cannot pass
any constructor arguments, ce-name);
+   }
+}
+/* }}} */
+
+/* {{{ proto public stdclass ReflectionClass::newInstanceArgs(array args)
+   Returns an instance of this class */
+ZEND_METHOD(reflection_class, newInstanceArgs)
+{
+   zval *retval_ptr;
+   reflection_object *intern;
+   zend_class_entry *ce;
+   int argc;
+   HashTable *args;
+
+
+   METHOD_NOTSTATIC(reflection_class_ptr);
+   GET_REFLECTION_OBJECT_PTR(ce);
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |h,
args) == FAILURE) {
+   return;
+   }
+   argc = args-nNumOfElements;
+
+   /* Run the constructor if there is one */
+   if (ce-constructor) {
+   zval ***params;
+   zend_fcall_info fci;
+   zend_fcall_info_cache fcc;
+
+   if (!(ce-constructor-common.fn_flags  
ZEND_ACC_PUBLIC)) {

+
zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0
TSRMLS_CC, Access to non-public constructor of class %v, ce-name);
+   return;
+   }
+
+   params = safe_emalloc(sizeof(zval **), argc, 0);
+   zend_hash_apply_with_argument(args,
(apply_func_arg_t)_zval_array_to_c_array, params TSRMLS_CC);
+   params -= argc;
+
+   object_init_ex(return_value, ce);
+
+   fci.size = sizeof(fci);
+   fci.function_table = EG(function_table);
+   fci.function_name = NULL;
+   fci.symbol_table = NULL;
+   fci.object_pp = return_value;
+   fci.retval_ptr_ptr = retval_ptr;
+   fci.param_count = argc;
+   fci.params = params;
+   fci.no_separation = 1;
+
+   fcc.initialized = 1;
+   fcc.function_handler = ce-constructor;
+   fcc.calling_scope = EG(scope);
+   fcc.object_pp = return_value;
+
+   if (zend_call_function(fci, fcc TSRMLS_CC) == FAILURE) {
+   efree(params);
+   zval_ptr_dtor(retval_ptr);
+   zend_error(E_WARNING, Invocation of %v's
constructor failed, ce-name);
+   RETURN_NULL();
+   }
+   if (retval_ptr) {
+   zval_ptr_dtor(retval_ptr);
+   }
+   efree(params);
+   } else if (!ZEND_NUM_ARGS()) {
+   object_init_ex(return_value, ce);
+   } else {
+
zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0
TSRMLS_CC, Class 

Re: [PHP-CVS] cvs: php-src / run-tests.php /ext/ctype ctype.c /ext/date php_date.c /ext/date/tests bug35143.phpt /ext/dom document.c node.c /ext/dom/tests dom002.phpt dom_set_attr_node.phpt /ext/

2006-01-17 Thread Andi Gutmans

Thanks!

At 04:18 AM 1/17/2006, Dmitry Stogov wrote:

dmitry  Tue Jan 17 12:18:54 2006 UTC

  Modified files:
/php-srcrun-tests.php
/ZendEngine2zend.c zend.h zend_API.c zend_API.h
zend_builtin_functions.c zend_compile.c
zend_exceptions.c zend_execute.c zend_execute.h
zend_execute_API.c zend_hash.c zend_hash.h
zend_highlight.c zend_interfaces.c
zend_language_parser.y zend_language_scanner.l
zend_operators.c zend_operators.h zend_unicode.c
zend_unicode.h zend_variables.c zend_vm_def.h
zend_vm_execute.h
/ZendEngine2/tests  bug26166.phpt bug28444.phpt
/php-src/ext/ctype  ctype.c
/php-src/ext/date   php_date.c
/php-src/ext/date/tests bug35143.phpt
/php-src/ext/domdocument.c node.c
/php-src/ext/dom/tests  dom002.phpt dom_set_attr_node.phpt
/php-src/ext/reflection php_reflection.c
/php-src/ext/simplexml  simplexml.c
/php-src/ext/simplexml/tests013.phpt profile11.phpt
/php-src/ext/splphp_spl.c spl_array.c spl_iterators.c
/php-src/ext/sqlite sqlite.c
/php-src/ext/standard   array.c basic_functions.c file.c 
math.c md5.c

sha1.c string.c type.c user_filters.c var.c
var_unserializer.re
/php-src/ext/standard/tests/general_functions   008.phpt
/php-src/ext/standard/tests/mathbug21523.phpt
/php-src/ext/standard/tests/strings bug22187.phpt strval.phpt
/php-src/ext/tokenizer/tests002.phpt 003.phpt bug26463.phpt
/php-src/ext/xmlxml.c
/php-src/main   main.c output.c php_variables.c
/php-src/main/streams   plain_wrapper.c
/php-src/tests/basicbug29971.phpt
/php-src/tests/func 006.phpt
/php-src/tests/lang catchable_error_002.phpt
/php-src/tests/run-test test004.phpt test005.phpt test008.phpt
test008a.phpt
  Log:
  Unicode stuff is changed according to decision maden on PDM.
  Now IS_BINRAY data type is removed and IS_STRING starts behave as 
IS_BINARY in unicode mode. IS_STRING is incompatible with 
IS_UNICODE, so ALL functions should be improved to support unicode mode.




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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/gd gd.c

2006-01-17 Thread Andi Gutmans
FYI, this actually breaks BC. A negative number evaluates to true. I 
don't think this change should be an issue but there might have been 
people who did a  0 check before.

Anyone got a problem with the change?

At 07:44 AM 1/17/2006, Pierre-Alain Joye wrote:

pajoye  Tue Jan 17 15:44:12 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/gd gd.c
  Log:
  - return false on error


http://cvs.php.net/viewcvs.cgi/php-src/ext/gd/gd.c?r1=1.312.2.13r2=1.312.2.14diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.13 php-src/ext/gd/gd.c:1.312.2.14
--- php-src/ext/gd/gd.c:1.312.2.13  Tue Jan 17 15:23:29 2006
+++ php-src/ext/gd/gd.c Tue Jan 17 15:44:12 2006
@@ -18,7 +18,7 @@
+--+
  */

-/* $Id: gd.c,v 1.312.2.13 2006/01/17 15:23:29 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.14 2006/01/17 15:44:12 pajoye Exp $ */

 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1967,6 +1967,7 @@
 {
zval **IM, **red, **green, **blue;
gdImagePtr im;
+   int ct = (-1);

if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, IM, 
red, green, blue) == FAILURE) {

ZEND_WRONG_PARAM_COUNT();
@@ -1977,8 +1978,11 @@
convert_to_long_ex(red);
convert_to_long_ex(green);
convert_to_long_ex(blue);
-
-   RETURN_LONG(gdImageColorAllocate(im, Z_LVAL_PP(red), 
Z_LVAL_PP(green), Z_LVAL_PP(blue)));
+   ct = gdImageColorAllocate(im, Z_LVAL_PP(red), 
Z_LVAL_PP(green), Z_LVAL_PP(blue));

+   if (ct  0) {
+   RETURN_FALSE;
+   }
+   RETURN_LONG(ct);
 }
 /* }}} */


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


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



Re: [PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended

2005-12-30 Thread Andi Gutmans

At 04:20 AM 12/30/2005, Jani Taskinen wrote:

-; which should be instantiated.
+; which should be instanciated.


Hey,

You introduced a typo. The previous version was fine.
Andi 


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



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

2005-12-22 Thread Andi Gutmans
Are you sure you want to fix it this way? It'll make things less 
maintainable. I'm sure there's a way to make it one implementation 
that works everywhere.


At 01:36 PM 12/20/2005, Marcus Boerger wrote:

helly   Tue Dec 20 21:36:48 2005 EDT

  Modified files:
/php-src/ext/splconfig.m4 spl_observer.c
  Log:
  - Only apply workaround solution for 64 bit machines when necessary
  # Actually this can already be necessary on 32 bit machine and also not be
  # necessary on 64 bit machines. It all depends on the compiler settings.


http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14r2=1.15diff_format=u
Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
 dnl config.m4 for extension SPL

 PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -8,6 +8,23 @@
   if test $ext_shared = yes; then
 AC_MSG_ERROR(Cannot build SPL as a shared module)
   fi
+  AC_MSG_CHECKING(whether zend_object_value is packed)
+  AC_TRY_RUN([
+#include Zend/zend_types.h
+int main(int argc, char **argv) {
+   return ((sizeof(zend_object_handle) + 
sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;

+}
+  ], [
+ac_result=1
+AC_MSG_RESULT(yes)
+  ],[
+ac_result=0
+AC_MSG_RESULT(no)
+  ], [
+ac_result=0
+AC_MSG_RESULT(no)
+  ])
+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct 
_zend_object_value is packed])
   AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP 
Library) support])
   PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c 
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c 
spl_exceptions.c spl_observer.c, $ext_shared)

 fi
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.6 php-src/ext/spl/spl_observer.c:1.7
--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
@@ -16,7 +16,7 @@
+--+
  */

-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -129,17 +129,25 @@
 SPL_METHOD(SplObjectStorage, attach)
 {
zval *obj;
-   zend_object_value zvalue;
+
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);


if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, 
obj) == FAILURE) {

return;
}
-   memset(zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj-value.obj.handle;
-   zvalue.handlers = obj-value.obj.handlers;
-
-   zend_hash_update(intern-storage, (char*)zvalue, 
sizeof(zend_object_value), obj, sizeof(zval*), NULL);

+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_update(intern-storage, (char*)Z_OBJVAL_P(obj), 
sizeof(zend_object_value), obj, sizeof(zval*), NULL);

+#else
+   {
+   zend_object_value zvalue;
+   memset(zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_update(intern-storage, (char*)zvalue, 
sizeof(zend_object_value), obj, sizeof(zval*), NULL);

+   }
+#endif
+
obj-refcount++;
 } /* }}} */

@@ -148,17 +156,24 @@
 SPL_METHOD(SplObjectStorage, detach)
 {
zval *obj;
-   zend_object_value zvalue;
spl_SplObjectStorage *intern = 
(spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);


if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o, 
obj) == FAILURE) {

return;
}
-   memset(zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj-value.obj.handle;
-   zvalue.handlers = obj-value.obj.handlers;
-
-   zend_hash_del(intern-storage, (char*)zvalue, 
sizeof(zend_object_value));

+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_del(intern-storage, (char*)Z_OBJVAL_P(obj), 
sizeof(zend_object_value));

+#else
+   {
+   zend_object_value zvalue;
+   memset(zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = Z_OBJ_HT_P(obj);
+   zend_hash_del(intern-storage, (char*)zvalue, 
sizeof(zend_object_value));

+   }
+#endif
+
zend_hash_internal_pointer_reset_ex(intern-storage, intern-pos);
intern-index = 0;
 } /* }}} */
@@ -168,17 +183,23 @@
 SPL_METHOD(SplObjectStorage, contains)
 {
zval *obj;
-   zend_object_value 

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

2005-12-22 Thread Andi Gutmans
It's hard for me to believe though that memset() plus copying some 
values is noticeably slower. For such small structures I doubt it has 
any impact on the SPL Iterator performance (you're allocating on 
stack so allocation is not an issue).
You can keep it this way, but my $.02 would be to only have the 
memset()+copy version and nuke the shortcut. It just won't make a 
difference, and from past experiences I've had, such issues come back 
and bite you later on :)


Andi

At 11:23 AM 12/22/2005, Marcus Boerger wrote:

Hello Andi,

  we would need to enforce structure packing change the type of
zend_object_handle in zend_object_value or both. But even if we
go that way we are not sure it works, so the only way that would
always work is the memset. However setting all structure bytes
to zero while on many platforms none must be ste and having to
copy the whole think just seems wrong. That means looking for
alternatives:
1) Implement a different hash/compare function
2) Do not use zend hashes but something different
None of which i want to go.

Imo the best option is to stay with current solution and still
change zend_object_handle to have the sane size that pointers
have: sizeof(zend_object_handle)==sizeof(zend_object_handlers*).
That way we would prevent the workaround of initializing a temp
copy on nearly any platform (close to 100%).

best regards
marcus

Thursday, December 22, 2005, 8:07:26 PM, you wrote:

 Are you sure you want to fix it this way? It'll make things less
 maintainable. I'm sure there's a way to make it one implementation
 that works everywhere.

 At 01:36 PM 12/20/2005, Marcus Boerger wrote:
helly   Tue Dec 20 21:36:48 2005 EDT

   Modified files:
 /php-src/ext/splconfig.m4 spl_observer.c
   Log:
   - Only apply workaround solution for 64 bit machines when necessary
   # Actually this can already be necessary on 32 bit machine and 
also not be

   # necessary on 64 bit machines. It all depends on the compiler settings.


http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/config.m4?r1=1.14r 
2=1.15diff_format=u

Index: php-src/ext/spl/config.m4
diff -u php-src/ext/spl/config.m4:1.14 php-src/ext/spl/config.m4:1.15
--- php-src/ext/spl/config.m4:1.14  Sat Oct  1 15:55:27 2005
+++ php-src/ext/spl/config.m4   Tue Dec 20 21:36:47 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.14 2005/10/01 15:55:27 helly Exp $
+dnl $Id: config.m4,v 1.15 2005/12/20 21:36:47 helly Exp $
  dnl config.m4 for extension SPL

  PHP_ARG_ENABLE(spl, enable SPL suppport,
@@ -8,6 +8,23 @@
if test $ext_shared = yes; then
  AC_MSG_ERROR(Cannot build SPL as a shared module)
fi
+  AC_MSG_CHECKING(whether zend_object_value is packed)
+  AC_TRY_RUN([
+#include Zend/zend_types.h
+int main(int argc, char **argv) {
+   return ((sizeof(zend_object_handle) +
sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
+}
+  ], [
+ac_result=1
+AC_MSG_RESULT(yes)
+  ],[
+ac_result=0
+AC_MSG_RESULT(no)
+  ], [
+ac_result=0
+AC_MSG_RESULT(no)
+  ])
+  AC_DEFINE(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct
_zend_object_value is packed])
AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP
 Library) support])
PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c
 spl_iterators.c spl_array.c spl_directory.c spl_sxe.c
 spl_exceptions.c spl_observer.c, $ext_shared)
  fi
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_observer.c?r1=1 
.6r2=1.7diff_format=u

Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.6 
php-src/ext/spl/spl_observer.c:1.7

--- php-src/ext/spl/spl_observer.c:1.6  Mon Dec 19 13:53:28 2005
+++ php-src/ext/spl/spl_observer.c  Tue Dec 20 21:36:47 2005
@@ -16,7 +16,7 @@
 
+--+

   */

-/* $Id: spl_observer.c,v 1.6 2005/12/19 13:53:28 tony2001 Exp $ */
+/* $Id: spl_observer.c,v 1.7 2005/12/20 21:36:47 helly Exp $ */

  #ifdef HAVE_CONFIG_H
  # include config.h
@@ -129,17 +129,25 @@
  SPL_METHOD(SplObjectStorage, attach)
  {
 zval *obj;
-   zend_object_value zvalue;
+
 spl_SplObjectStorage *intern =
 (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC);

 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, o,
 obj) == FAILURE) {
 return;
 }
-   memset(zvalue, 0, sizeof(zend_object_value));
-   zvalue.handle = obj-value.obj.handle;
-   zvalue.handlers = obj-value.obj.handlers;
-
-   zend_hash_update(intern-storage, (char*)zvalue,
sizeof(zend_object_value), obj, sizeof(zval*), NULL);
+
+#if HAVE_PACKED_OBJECT_VALUE
+   zend_hash_update(intern-storage, (char*)Z_OBJVAL_P(obj),
sizeof(zend_object_value), obj, sizeof(zval*), NULL);
+#else
+   {
+   zend_object_value zvalue;
+   memset(zvalue, 0, sizeof(zend_object_value));
+   zvalue.handle = Z_OBJ_HANDLE_P(obj);
+   zvalue.handlers = 

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

2005-11-18 Thread Andi Gutmans
As I mentioned to Marcus, it seems odd to me to move reflection in 
the first place. It seems to me to be very much a language feature 
and in my opinion, should always be enabled. I can't really see a 
good reason for this move.


Andi

At 07:40 AM 11/18/2005, Derick Rethans wrote:

On Fri, 18 Nov 2005, Antony Dovgal wrote:

 We need at least document it or to add something like this:

But then we need to do this for every configure option... as nobody
really knows what they are doing anyway.

Derick

--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/libxml libxml.c

2005-10-17 Thread Andi Gutmans

Hey Rob,

This looks a bit strange (although it probably works :)

Andi

At 01:34 PM 10/13/2005, Rob Richards wrote:
+   context = context = 
php_libxml_streams_IO_open_write_wrapper(URI);



Zend/PHP Conference  Expo
Power Your Business with PHP
October 18-21, 2005 - San Francisco
http://zend.kbconferences.com/  


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



Re: [PHP-CVS] cvs: php-src / NEWS /sapi/apache2handler sapi_apache2.c

2005-10-17 Thread Andi Gutmans
I don't see a reason why not to also commit critical patches to 
5.0.x. I believe we will still have 5.0.6, especially due to the 
reference fixes, and who knows if we have security problems, we might 
have more in future.
The fact that Jani and you aren't using 5.0 doesn't mean we 
can't/shouldn't commit critical fixes.
Anyway, Antony's question was directed at Rasmus, and you're right, 
if Rasmus doesn't feel like it, then someone else would have to backport.



At 03:46 AM 10/13/2005, Derick Rethans wrote:

On Thu, 13 Oct 2005, Antony Dovgal wrote:

 On 13.10.2005 14:14, Jani Taskinen wrote:
   PHP_5_0 branch is dead as far as most of use are concerned.
   We're about to release 5.1, not 5.0.x.

 I know that we're about to release 5.1, but up to that moment I'd 
like to see

 all the patches for HEAD MFH'ed to 5.0 too.

Feel free to backport them ofcourse...

Derick

--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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



Zend/PHP Conference  Expo
Power Your Business with PHP
October 18-21, 2005 - San Francisco
http://zend.kbconferences.com/  


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



Re: [PHP-CVS] cvs: php-src / NEWS /sapi/apache2handler sapi_apache2.c

2005-10-17 Thread Andi Gutmans

Thanks! Will verify it works.

At 12:36 PM 10/17/2005, Rasmus Lerdorf wrote:

Andi Gutmans wrote:
I don't see a reason why not to also commit critical patches to 
5.0.x. I believe we will still have 5.0.6, especially due to the 
reference fixes, and who knows if we have security problems, we 
might have more in future.
The fact that Jani and you aren't using 5.0 doesn't mean we 
can't/shouldn't commit critical fixes.
Anyway, Antony's question was directed at Rasmus, and you're right, 
if Rasmus doesn't feel like it, then someone else would have to backport.


I have merged in the fix, but someone who is actually running PHP 
5.0 with Apache2 may want to verify that it doesn't break everything.


-Rasmus

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



Zend/PHP Conference  Expo
Power Your Business with PHP
October 18-21, 2005 - San Francisco
http://zend.kbconferences.com/  


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



Re: [PHP-CVS] cvs: php-src(PHP_4_4) /ext/standard base64.c

2005-08-26 Thread Andi Gutmans

Is this going to break apps that relied on this behavior?

At 08:33 PM 8/25/2005, Ilia Alshanetsky wrote:

iliaa   Thu Aug 25 23:33:08 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/standard   base64.c
  Log:
  MFH: Fixed bug #34214 (base64_decode() does not properly ignore whitespace)


http://cvs.php.net/diff.php/php-src/ext/standard/base64.c?r1=1.33.4.6r2=1.33.4.6.4.1ty=u
Index: php-src/ext/standard/base64.c
diff -u php-src/ext/standard/base64.c:1.33.4.6 
php-src/ext/standard/base64.c:1.33.4.6.4.1

--- php-src/ext/standard/base64.c:1.33.4.6  Sat Mar  6 14:06:12 2004
+++ php-src/ext/standard/base64.c   Thu Aug 25 23:33:07 2005
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  
|
+--+
  */
-/* $Id: base64.c,v 1.33.4.6 2004/03/06 19:06:12 iliaa Exp $ */
+/* $Id: base64.c,v 1.33.4.6.4.1 2005/08/26 03:33:07 iliaa Exp $ */

 #include string.h

@@ -153,15 +153,6 @@
while ((ch = *current++) != '\0'  length--  0) {
if (ch == base64_pad) break;

-   /* When Base64 gets POSTed, all pluses are interpreted as spaces.
-  This line changes them back.  It's not exactly 
the Base64 spec,

-  but it is completely compatible with it (the spec says that
-  spaces are invalid).  This will also save many 
people considerable

-  headache.  - Turadg Aleahmad [EMAIL PROTECTED]
-   */
-
-   if (ch == ' ') ch = '+';
-
ch = base64_reverse_table[ch];
if (ch  0) continue;


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


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



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

2005-08-25 Thread Andi Gutmans

Yes, I think it can be safely MFH'ed. Thanks.

At 01:52 PM 8/25/2005, Marcus Boerger wrote:

Hello RMs,

  should this be MFHed to 5.0.5 and 5.1.0 ?

marcus

Thursday, August 25, 2005, 10:49:49 PM, you wrote:

 helly   Thu Aug 25 16:49:49 2005 EDT

   Modified files:
 /php-src/ext/ming   config.m4
   Log:
   - Bugfix #34257 lib64 not handled correctly in ming extension

 http://cvs.php.net/diff.php/php-src/ext/ming/config.m4?r1=1.22r2=1.23ty=u
 Index: php-src/ext/ming/config.m4
 diff -u php-src/ext/ming/config.m4:1.22 php-src/ext/ming/config.m4:1.23
 --- php-src/ext/ming/config.m4:1.22 Sun Jul 17 19:58:39 2005
 +++ php-src/ext/ming/config.m4  Thu Aug 25 16:49:48 2005
 @@ -1,5 +1,5 @@
  dnl
 -dnl $Id: config.m4,v 1.22 2005/07/17 23:58:39 helly Exp $
 +dnl $Id: config.m4,v 1.23 2005/08/25 20:49:48 helly Exp $
  dnl

  PHP_ARG_WITH(ming, for MING support,
 @@ -9,7 +9,7 @@
AC_CHECK_LIB(m, sin)

for i in $PHP_MING /usr/local /usr; do
 -if test -f $i/lib/libming.$SHLIB_SUFFIX_NAME -o -f 
$i/lib/libming.a; then
 +if test -f $i/$PHP_LIBDIR/libming.$SHLIB_SUFFIX_NAME -o -f 
$i/lib/libming.a; then

MING_DIR=$i
break
  fi
 @@ -34,11 +34,11 @@
],[
  AC_MSG_ERROR([Ming library 0.2a or greater required.])
],[
 --L$MING_DIR/lib
 +-L$MING_DIR/$PHP_LIBDIR
])

PHP_ADD_INCLUDE($MING_INC_DIR)
 -  PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)
 +  PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/$PHP_LIBDIR, 
MING_SHARED_LIBADD)


AC_MSG_CHECKING([for destroySWFBlock])
AC_TRY_RUN([




Best regards,
 Marcus


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



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

2005-08-25 Thread Andi Gutmans

How are we doing with this? Is it a new bug in 5.0.5 and 5.1.0?

At 12:06 PM 8/24/2005, Xuefer wrote:

this patch produce bug: http://bugs.php.net/bug.php?id=34240

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


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



Re: [PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard dir.c dns.c filestat.c info.c link.c string.c type.c uniqid.c /ext/standard/tests/file userdirstream.phpt /ext/standard/tests/strings

2005-08-23 Thread Andi Gutmans
What's the RT in add_property_rt_string_ex? Maybe should make it more 
verbose so that mortals like me can understand it?


At 05:53 AM 8/23/2005, Dmitry Stogov wrote:

dmitry  Tue Aug 23 08:53:32 2005 EDT

  Modified files:
/php-srcunicode-progress.txt
/ZendEngine2zend_API.c zend_API.h zend_builtin_functions.c
zend_exceptions.c
/php-src/ext/standard   dir.c dns.c filestat.c info.c 
link.c string.c

type.c uniqid.c
/php-src/ext/standard/tests/fileuserdirstream.phpt
/php-src/ext/standard/tests/strings bug24098.phpt
/php-src/tests/reflection   parameters_001.phpt
  Log:
  Unicode support



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


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



Re: [PHP-CVS] cvs: php-src /ext/standard php_string.h string.c

2005-08-16 Thread Andi Gutmans
In-Reply-To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed

why do we need this?
shouldn't the return type be the same as the string...?

At 06:02 AM 8/16/2005 +, Rolland Santimano wrote:
rolland Tue Aug 16 02:02:57 2005 EDT

   Modified files:
 /php-src/ext/standard   php_string.h string.c
   Log:
   php_trim() takes extra arg to determine string type to be returned


http://cvs.php.net/diff.php/php-src/ext/standard/php_string.h?r1=1.88r2=1.89ty=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.88 
php-src/ext/standard/php_string.h:1.89
--- php-src/ext/standard/php_string.h:1.88  Thu Aug 11 19:35:59 2005
+++ php-src/ext/standard/php_string.h   Tue Aug 16 02:02:55 2005
@@ -17,7 +17,7 @@
 +--+
  */

-/* $Id: php_string.h,v 1.88 2005/08/11 23:35:59 andrei Exp $ */
+/* $Id: php_string.h,v 1.89 2005/08/16 06:02:55 rolland Exp $ */

  /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */

@@ -132,7 +132,7 @@
 int needle_len, char *str, int str_len, int *_new_length, 
 int case_sensitivity, int *replace_count);
  PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
 int needle_len, char *str, int str_len, int *_new_length);
-PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval 
*return_value, int mode TSRMLS_DC);
+PHPAPI char *php_trim(char *c, int len, char *what, int what_len, 
zend_uchar str_type, zval *return_value, int mode TSRMLS_DC);
  PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char 
 *allow, int allow_len);
  PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, 
 int to_len, pval *result, int case_sensitivity, int *replace_count);
  PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int 
 to_len, pval *result);
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.453r2=1.454ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.453 
php-src/ext/standard/string.c:1.454
--- php-src/ext/standard/string.c:1.453 Mon Aug 15 15:12:59 2005
+++ php-src/ext/standard/string.c   Tue Aug 16 02:02:56 2005
@@ -18,7 +18,7 @@
 +--+
   */

-/* $Id: string.c,v 1.453 2005/08/15 19:12:59 johannes Exp $ */
+/* $Id: string.c,v 1.454 2005/08/16 06:02:56 rolland Exp $ */

  /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

@@ -538,7 +538,7 @@
   * mode 3 : trim left and right
   * what indicates which chars are to be trimmed. NULL-default (' 
 \t\n\r\v\0')
   */
-PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval 
*return_value, int mode TSRMLS_DC)
+PHPAPI char *php_trim(char *c, int len, char *what, int what_len, 
zend_uchar str_type, zval *return_value, int mode TSRMLS_DC)
  {
 register int i;
 int trimmed = 0;
@@ -572,7 +572,11 @@
 }

 if (return_value) {
-   RETVAL_STRINGL(c, len, 1);
+   if ( str_type == IS_BINARY ) {
+   RETVAL_BINARYL(c, len, 1);
+   } else {
+   RETVAL_STRINGL(c, len, 1);
+   }
 } else {
 return estrndup(c, len);
 }
@@ -750,13 +754,13 @@
 if ( str_type == IS_UNICODE ) {
 php_u_trim(str, str_len, what, what_len, 
 return_value, mode TSRMLS_CC);
 } else {
-   php_trim(str, str_len, what, what_len, 
return_value, mode TSRMLS_CC);
+   php_trim(str, str_len, what, what_len, str_type, 
return_value, mode TSRMLS_CC);
 }
 } else {
 if ( str_type == IS_UNICODE ) {
 php_u_trim(str, str_len, NULL, 0, return_value, 
 mode TSRMLS_CC);
 } else {
-   php_trim(str, str_len, NULL, 0, return_value, mode 
TSRMLS_CC);
+   php_trim(str, str_len, NULL, 0, str_type, 
return_value, mode TSRMLS_CC);
 }
 }
  }

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

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



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

2005-08-16 Thread Andi Gutmans

never mind. i thought you were changing a PHP function :)

At 06:05 AM 8/16/2005 +, Rolland Santimano wrote:

rolland Tue Aug 16 02:05:00 2005 EDT

  Modified files:
/php-src/ext/simplexml  simplexml.c
/php-src/ext/standard   http_fopen_wrapper.c
  Log:
  Updated calls to php_trim() to provide arg for returned string type


http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.154r2=1.155ty=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.154 
php-src/ext/simplexml/simplexml.c:1.155

--- php-src/ext/simplexml/simplexml.c:1.154 Fri Aug 12 10:08:25 2005
+++ php-src/ext/simplexml/simplexml.c   Tue Aug 16 02:04:58 2005
@@ -18,7 +18,7 @@
   +--+
 */

-/* $Id: simplexml.c,v 1.154 2005/08/12 14:08:25 sebastian Exp $ */
+/* $Id: simplexml.c,v 1.155 2005/08/16 06:04:58 rolland Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -337,7 +337,7 @@
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);
+   php_trim(Z_STRVAL(trim_zv), Z_STRLEN(trim_zv), 
NULL, 0, IS_STRING, tmp_zv, 3 TSRMLS_CC);

zval_dtor(trim_zv);
member = tmp_zv;
}
@@ -1736,7 +1736,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.154 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.155 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.99r2=1.100ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.99 
php-src/ext/standard/http_fopen_wrapper.c:1.100
--- php-src/ext/standard/http_fopen_wrapper.c:1.99  Wed Aug  3 
10:08:04 2005

+++ php-src/ext/standard/http_fopen_wrapper.c   Tue Aug 16 02:04:59 2005
@@ -19,7 +19,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.99 2005/08/03 14:08:04 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.100 2005/08/16 06:04:59 rolland Exp $ */

 #include php.h
 #include php_globals.h
@@ -265,7 +265,7 @@
Z_STRLEN_PP(tmpzval)) {
/* Remove newlines and spaces from start and end,
   php_trim will estrndup() */
-   tmp = php_trim(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), 
NULL, 0, NULL, 3 TSRMLS_CC);
+   tmp = php_trim(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), 
NULL, 0, IS_STRING, NULL, 3 TSRMLS_CC);

if (strlen(tmp)  0) {
if (!header_init) { /* Remove post headers for 
redirects */

int l = strlen(tmp);
@@ -291,7 +291,7 @@
}
}
efree(tmp_c);
-   tmp_c = php_trim(tmp, strlen(tmp), NULL, 
0, NULL, 3 TSRMLS_CC);
+   tmp_c = php_trim(tmp, strlen(tmp), NULL, 
0, IS_STRING, NULL, 3 TSRMLS_CC);

efree(tmp);
tmp = tmp_c;
}

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


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



Re: [PHP-CVS] cvs: php-src /ext/standard md5.c /ext/standard/tests/strings explode.phpt strcspn.phpt strspn.phpt strstr.phpt

2005-08-16 Thread Andi Gutmans

Shouldn't we have a macro that does this?
I see lots of places that require the same code.
-   RETVAL_STRING(md5str, 1);
+   if (UG(unicode)) {
+   UChar *u_temp = zend_ascii_to_unicode(md5str, 33 
ZEND_FILE_LINE_CC);

+   RETVAL_UNICODE(u_temp, 0);
+   } else {
+   RETVAL_STRING(md5str, 1);
+   }
}

Andi

At 10:18 AM 8/16/2005 +, Dmitry Stogov wrote:

dmitry  Tue Aug 16 06:18:43 2005 EDT

  Modified files:
/php-src/ext/standard   md5.c
/php-src/ext/standard/tests/strings explode.phpt strcspn.phpt
strspn.phpt strstr.phpt
  Log:
  Unicode support


http://cvs.php.net/diff.php/php-src/ext/standard/md5.c?r1=1.39r2=1.40ty=u
Index: php-src/ext/standard/md5.c
diff -u php-src/ext/standard/md5.c:1.39 php-src/ext/standard/md5.c:1.40
--- php-src/ext/standard/md5.c:1.39 Wed Aug  3 10:08:09 2005
+++ php-src/ext/standard/md5.c  Tue Aug 16 06:18:41 2005
@@ -16,7 +16,7 @@
+--+
 */

-/* $Id: md5.c,v 1.39 2005/08/03 14:08:09 sniper Exp $ */
+/* $Id: md5.c,v 1.40 2005/08/16 10:18:41 dmitry Exp $ */

 /*
  * md5.c - Copyright 1997 Lachlan Roche
@@ -61,7 +61,12 @@
RETURN_STRINGL(digest, 16, 1);
} else {
make_digest(md5str, digest);
-   RETVAL_STRING(md5str, 1);
+   if (UG(unicode)) {
+   UChar *u_temp = zend_ascii_to_unicode(md5str, 33 
ZEND_FILE_LINE_CC);

+   RETVAL_UNICODE(u_temp, 0);
+   } else {
+   RETVAL_STRING(md5str, 1);
+   }
}

 }
@@ -108,7 +113,12 @@
RETURN_STRINGL(digest, 16, 1);
} else {
make_digest(md5str, digest);
-   RETVAL_STRING(md5str, 1);
+   if (UG(unicode)) {
+   UChar *u_temp = zend_ascii_to_unicode(md5str, 33 
ZEND_FILE_LINE_CC);

+   RETVAL_UNICODE(u_temp, 0);
+   } else {
+   RETVAL_STRING(md5str, 1);
+   }
}
 }
 /* }}} */
http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/explode.phpt?r1=1.4r2=1.5ty=u
Index: php-src/ext/standard/tests/strings/explode.phpt
diff -u php-src/ext/standard/tests/strings/explode.phpt:1.4 
php-src/ext/standard/tests/strings/explode.phpt:1.5
--- php-src/ext/standard/tests/strings/explode.phpt:1.4 Sun Jul 18 
07:34:28 2004
+++ php-src/ext/standard/tests/strings/explode.phpt Tue Aug 16 
06:18:43 2005

@@ -152,3 +152,127 @@
   [0]=
   string(10) a lazy dog
 }
+--UEXPECTF--
+26d4e18734cb2582df5055e2175223df
+bool(false)
+bool(false)
+bool(false)
+array(1) {
+  [0]=
+  unicode(0) 
+}
+array(2) {
+  [0]=
+  unicode(0) 
+  [1]=
+  unicode(0) 
+}
+array(1) {
+  [0]=
+  unicode(0) 
+}
+bool(false)
+array(1) {
+  [0]=
+  unicode(3) acb
+}
+array(1) {
+  [0]=
+  unicode(11) otherstring
+}
+array(7) {
+  [0]=
+  unicode(0) 
+  [1]=
+  unicode(0) 
+  [2]=
+  unicode(0) 
+  [3]=
+  unicode(0) 
+  [4]=
+  unicode(0) 
+  [5]=
+  unicode(0) 
+  [6]=
+  unicode(0) 
+}
+array(1) {
+  [0]=
+  unicode(60) -=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=-
+}
+array(21) {
+  [0]=
+  unicode(1) -
+  [1]=
+  unicode(2) 48
+  [2]=
+  unicode(2) --
+  [3]=
+  unicode(2) 48
+  [4]=
+  unicode(2) --
+  [5]=
+  unicode(2) 48
+  [6]=
+  unicode(2) --
+  [7]=
+  unicode(2) 48
+  [8]=
+  unicode(2) --
+  [9]=
+  unicode(2) 48
+  [10]=
+  unicode(2) --
+  [11]=
+  unicode(2) 48
+  [12]=
+  unicode(2) --
+  [13]=
+  unicode(2) 48
+  [14]=
+  unicode(2) --
+  [15]=
+  unicode(2) 48
+  [16]=
+  unicode(2) --
+  [17]=
+  unicode(2) 48
+  [18]=
+  unicode(2) --
+  [19]=
+  unicode(2) 48
+  [20]=
+  unicode(1) -
+}
+array(3) {
+  [0]=
+  unicode(10) a lazy dog
+  [1]=
+  unicode(5) jumps
+  [2]=
+  unicode(4) over
+}
+array(2) {
+  [0]=
+  unicode(10) a lazy dog
+  [1]=
+  unicode(5) jumps
+}
+array(1) {
+  [0]=
+  unicode(10) a lazy dog
+}
+array(0) {
+}
+array(0) {
+}
+array(2) {
+  [0]=
+  unicode(10) a lazy dog
+  [1]=
+  unicode(11) jumps::over
+}
+array(1) {
+  [0]=
+  unicode(10) a lazy dog
+}
http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/strcspn.phpt?r1=1.1r2=1.2ty=u
Index: php-src/ext/standard/tests/strings/strcspn.phpt
diff -u php-src/ext/standard/tests/strings/strcspn.phpt:1.1 
php-src/ext/standard/tests/strings/strcspn.phpt:1.2
--- php-src/ext/standard/tests/strings/strcspn.phpt:1.1 Sat Oct 26 
12:48:03 2002
+++ php-src/ext/standard/tests/strings/strcspn.phpt Tue Aug 16 
06:18:43 2005

@@ -16,3 +16,9 @@
 int(0)
 int(7)
 int(6)
+--UEXPECT--
+unicode(25)  bbb 
+unicode(4) 1234
+int(0)
+int(7)
+int(6)
http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/strspn.phpt?r1=1.1r2=1.2ty=u
Index: php-src/ext/standard/tests/strings/strspn.phpt
diff -u 

RE: [PHP-CVS] cvs: php-src /ext/standard md5.c /ext/standard/tests/strings explode.phpt strcspn.phpt strspn.phptstrstr.phpt

2005-08-16 Thread Andi Gutmans
Oh, I didn't realize this was literally meant to be ASCII. In such case, 
there probably aren't  going to be many places


At 09:36 AM 8/17/2005 +0400, Dmitry Stogov wrote:

May be nice to have, however ASCII to unicode conversion is not usual case.
Usualy we have non ASCII but some encoding (UG(runrime_encoding)).

Dmitry.

 -Original Message-
 From: Andi Gutmans [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 17, 2005 4:54 AM
 To: Dmitry Stogov; php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src /ext/standard md5.c
 /ext/standard/tests/strings explode.phpt strcspn.phpt
 strspn.phptstrstr.phpt


 Shouldn't we have a macro that does this?
 I see lots of places that require the same code.
 -   RETVAL_STRING(md5str, 1);
 +   if (UG(unicode)) {
 +   UChar *u_temp =
 zend_ascii_to_unicode(md5str, 33
 ZEND_FILE_LINE_CC);
 +   RETVAL_UNICODE(u_temp, 0);
 +   } else {
 +   RETVAL_STRING(md5str, 1);
 +   }
  }

 Andi

 At 10:18 AM 8/16/2005 +, Dmitry Stogov wrote:
 dmitry  Tue Aug 16 06:18:43 2005 EDT
 
Modified files:
  /php-src/ext/standard   md5.c
  /php-src/ext/standard/tests/strings explode.phpt strcspn.phpt
  strspn.phpt strstr.phpt
Log:
Unicode support
 
 
 http://cvs.php.net/diff.php/php-src/ext/standard/md5.c?r1=1.3
 9r2=1.40
 ty=u
 Index: php-src/ext/standard/md5.c
 diff -u php-src/ext/standard/md5.c:1.39
 php-src/ext/standard/md5.c:1.40
 --- php-src/ext/standard/md5.c:1.39 Wed Aug  3 10:08:09 2005
 +++ php-src/ext/standard/md5.c  Tue Aug 16 06:18:41 2005
 @@ -16,7 +16,7 @@
 
 +
 --+
   */
 
 -/* $Id: md5.c,v 1.39 2005/08/03 14:08:09 sniper Exp $ */
 +/* $Id: md5.c,v 1.40 2005/08/16 10:18:41 dmitry Exp $ */
 
   /*
* md5.c - Copyright 1997 Lachlan Roche
 @@ -61,7 +61,12 @@
  RETURN_STRINGL(digest, 16, 1);
  } else {
  make_digest(md5str, digest);
 -   RETVAL_STRING(md5str, 1);
 +   if (UG(unicode)) {
 +   UChar *u_temp =
 zend_ascii_to_unicode(md5str,
 + 33
 ZEND_FILE_LINE_CC);
 +   RETVAL_UNICODE(u_temp, 0);
 +   } else {
 +   RETVAL_STRING(md5str, 1);
 +   }
  }
 
   }
 @@ -108,7 +113,12 @@
  RETURN_STRINGL(digest, 16, 1);
  } else {
  make_digest(md5str, digest);
 -   RETVAL_STRING(md5str, 1);
 +   if (UG(unicode)) {
 +   UChar *u_temp =
 zend_ascii_to_unicode(md5str,
 + 33
 ZEND_FILE_LINE_CC);
 +   RETVAL_UNICODE(u_temp, 0);
 +   } else {
 +   RETVAL_STRING(md5str, 1);
 +   }
  }
   }
   /* }}} */
 http://cvs.php.net/diff.php/php-src/ext/standard/tests/string
s/explode.
 phpt?r1=1.4r2=1.5ty=u
 Index: php-src/ext/standard/tests/strings/explode.phpt
 diff -u php-src/ext/standard/tests/strings/explode.phpt:1.4
 php-src/ext/standard/tests/strings/explode.phpt:1.5
 --- php-src/ext/standard/tests/strings/explode.phpt:1.4 Sun Jul 18
 07:34:28 2004
 +++ php-src/ext/standard/tests/strings/explode.phpt Tue Aug 16
 06:18:43 2005
 @@ -152,3 +152,127 @@
 [0]=
 string(10) a lazy dog
   }
 +--UEXPECTF--
 +26d4e18734cb2582df5055e2175223df
 +bool(false)
 +bool(false)
 +bool(false)
 +array(1) {
 +  [0]=
 +  unicode(0) 
 +}
 +array(2) {
 +  [0]=
 +  unicode(0) 
 +  [1]=
 +  unicode(0) 
 +}
 +array(1) {
 +  [0]=
 +  unicode(0) 
 +}
 +bool(false)
 +array(1) {
 +  [0]=
 +  unicode(3) acb
 +}
 +array(1) {
 +  [0]=
 +  unicode(11) otherstring
 +}
 +array(7) {
 +  [0]=
 +  unicode(0) 
 +  [1]=
 +  unicode(0) 
 +  [2]=
 +  unicode(0) 
 +  [3]=
 +  unicode(0) 
 +  [4]=
 +  unicode(0) 
 +  [5]=
 +  unicode(0) 
 +  [6]=
 +  unicode(0) 
 +}
 +array(1) {
 +  [0]=
 +  unicode(60)
 +-=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=-
 +}
 +array(21) {
 +  [0]=
 +  unicode(1) -
 +  [1]=
 +  unicode(2) 48
 +  [2]=
 +  unicode(2) --
 +  [3]=
 +  unicode(2) 48
 +  [4]=
 +  unicode(2) --
 +  [5]=
 +  unicode(2) 48
 +  [6]=
 +  unicode(2) --
 +  [7]=
 +  unicode(2) 48
 +  [8]=
 +  unicode(2) --
 +  [9]=
 +  unicode(2) 48
 +  [10]=
 +  unicode(2) --
 +  [11]=
 +  unicode(2) 48
 +  [12]=
 +  unicode(2) --
 +  [13]=
 +  unicode(2) 48
 +  [14]=
 +  unicode(2) --
 +  [15]=
 +  unicode(2) 48
 +  [16]=
 +  unicode(2) --
 +  [17]=
 +  unicode(2) 48
 +  [18]=
 +  unicode(2) --
 +  [19]=
 +  unicode(2) 48
 +  [20]=
 +  unicode(1) -
 +}
 +array(3) {
 +  [0]=
 +  unicode(10) a lazy dog
 +  [1]=
 +  unicode(5) jumps
 +  [2]=
 +  unicode(4) over
 +}
 +array(2) {
 +  [0]=
 +  unicode(10) a lazy dog
 +  [1]=
 +  unicode(5) jumps
 +}
 +array(1) {
 +  [0]=
 +  unicode(10) a lazy dog
 +}
 +array(0) {
 +}
 +array(0) {
 +}
 +array(2) {
 +  [0

Re: [PHP-CVS] cvs: php-src / README.PEAR

2005-08-15 Thread Andi Gutmans

Cool! This will make our lives easier.


At 10:16 PM 8/15/2005 +, Pierre-Alain Joye wrote:

pajoye  Mon Aug 15 18:16:02 2005 EDT

  Added files:
/php-srcREADME.PEAR
  Log:
  - add a little doc to redirect people to go-pear



http://cvs.php.net/co.php/php-src/README.PEAR?r=1.1p=1
Index: php-src/README.PEAR
+++ php-src/README.PEAR
To install the PEAR installer, please use go-pear.

On linux:
$ lynx -source http://go-pear.org/ | php

or save the setup scripts under go-pear.php and run:

php go-pear.php

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


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



Re: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/ming ming.c

2005-08-11 Thread Andi Gutmans

Thx.

At 03:54 AM 8/11/2005 +, Frank M. Kromann wrote:

fmk Wed Aug 10 23:54:07 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/ming   ming.c
  Log:
  Revert the last patch so we can release PHP 5.1

http://cvs.php.net/diff.php/php-src/ext/ming/ming.c?r1=1.79r2=1.79.2.1ty=u
Index: php-src/ext/ming/ming.c
diff -u php-src/ext/ming/ming.c:1.79 php-src/ext/ming/ming.c:1.79.2.1
--- php-src/ext/ming/ming.c:1.79Sat Aug  6 01:30:17 2005
+++ php-src/ext/ming/ming.c Wed Aug 10 23:54:04 2005
@@ -17,7 +17,7 @@
   +--+
 */

-/* $Id: ming.c,v 1.79 2005/08/06 05:30:17 fmk Exp $ */
+/* $Id: ming.c,v 1.79.2.1 2005/08/11 03:54:04 fmk Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2218,7 +2218,7 @@
 PHP_METHOD(swfmovie, output)
 {
SWFMovie movie = getMovie(getThis() TSRMLS_CC);
-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
zval **zlimit = NULL;
int limit = -1;
int argc = ZEND_NUM_ARGS();
@@ -2244,6 +2244,25 @@
Ming_setSWFCompression(oldval);
}
RETURN_LONG(out);
+#elif defined(HAVE_NEW_MING)
+   zval **zlimit = NULL;
+   int limit = -1;
+   int argc = ZEND_NUM_ARGS();
+
+   if(argc) {
+   if (zend_get_parameters_ex(1, zlimit) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+
+   convert_to_long_ex(zlimit);
+   limit = Z_LVAL_PP(zlimit);
+
+   if ((limit  0) || (limit  9)) {
+   php_error(E_WARNING,compression level must be 
within 0..9);

+   RETURN_FALSE;
+   }
+   }
+   RETURN_LONG(SWFMovie_output(movie, phpByteOutputMethod, NULL, 
limit));

 #else
RETURN_LONG(SWFMovie_output(movie, phpByteOutputMethod, NULL));
 #endif
@@ -2263,9 +2282,11 @@
 PHP_METHOD(swfmovie, saveToFile)
 {
zval **x;
-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB) || defined(HAVE_NEW_MING)
zval **zlimit = NULL;
int limit = -1;
+#endif
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
int oldval = INT_MIN;
long out;
 #endif
@@ -2278,7 +2299,7 @@
WRONG_PARAM_COUNT;
break;
case 2:
-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB) || defined(HAVE_NEW_MING)
if (zend_get_parameters_ex(2, x, zlimit) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_long_ex(zlimit);
@@ -2287,6 +2308,8 @@
php_error(E_WARNING,compression level must be 
within 0..9);

RETURN_FALSE;
}
+#endif
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
oldval = Ming_setSWFCompression(limit);
 #endif
break;
@@ -2295,11 +2318,13 @@
}

ZEND_FETCH_RESOURCE(what, php_stream *, x, 
-1,File-Handle,php_file_le_stream());

-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
out = SWFMovie_output(getMovie(getThis() TSRMLS_CC), 
phpStreamOutputMethod, what);

if (oldval = -1  oldval =9)
Ming_setSWFCompression(oldval);
RETURN_LONG(out);
+#elif defined(HAVE_NEW_MING)
+   RETURN_LONG(SWFMovie_output(movie, phpStreamOutputMethod, what, 
limit));

 #else
RETURN_LONG(SWFMovie_output(movie, phpStreamOutputMethod, what));
 #endif
@@ -2311,9 +2336,11 @@
 PHP_METHOD(swfmovie, save)
 {
zval **x;
-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB) || defined(HAVE_NEW_MING)
zval **zlimit = NULL;
int limit = -1;
+#endif
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
int oldval = INT_MIN;
 #endif
long retval;
@@ -2326,7 +2353,7 @@
}
break;
case 2:
-#if defined(HAVE_MING_ZLIB)  defined(HAVE_NEW_MING)
+#if defined(HAVE_MING_ZLIB) || defined(HAVE_NEW_MING)
if (zend_get_parameters_ex(2, x, zlimit) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2336,6 +2363,8 @@
php_error(E_WARNING,compression level must be 
within 0..9);

RETURN_FALSE;
}
+#endif
+#if defined(HAVE_MING_ZLIB)  !defined(HAVE_NEW_MING)
oldval = Ming_setSWFCompression(limit);
 #endif
break;
@@ -2345,12 +2374,16 @@

if (Z_TYPE_PP(x) == IS_RESOURCE) {
ZEND_FETCH_RESOURCE(stream, php_stream *, x, 
-1,File-Handle,php_file_le_stream());

+#if defined(HAVE_NEW_MING)
+   RETURN_LONG(SWFMovie_output(getMovie(getThis() TSRMLS_CC), 
phpStreamOutputMethod, stream, limit));

+#else
RETVAL_LONG(SWFMovie_output(getMovie(getThis() 

[PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended

2005-08-11 Thread Andi Gutmans
andiFri Aug 12 01:30:07 2005 EDT

  Modified files:  
/php-srcphp.ini-dist php.ini-recommended 
  Log:
  - Add unicode INI settings
  
  
http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.231r2=1.232ty=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231 php-src/php.ini-dist:1.232
--- php-src/php.ini-dist:1.231  Wed Jul 13 04:20:32 2005
+++ php-src/php.ini-distFri Aug 12 01:30:02 2005
@@ -435,6 +435,14 @@
 ; Always populate the $HTTP_RAW_POST_DATA variable.
 ;always_populate_raw_post_data = On
 
+; Unicode settings
+unicode_semantics = off
+unicode.runtime_encoding = iso-8859-1
+unicode.script_encoding = utf-8
+unicode.output_encoding = utf-8
+unicode.from_error_mode = U_INVALID_SUBSTITUTE
+unicode.from_error_subst_char = 3f
+
 
 ;
 ; Paths and Directories ;
http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.179r2=1.180ty=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179 php-src/php.ini-recommended:1.180
--- php-src/php.ini-recommended:1.179   Wed Jul 13 04:20:32 2005
+++ php-src/php.ini-recommended Fri Aug 12 01:30:02 2005
@@ -493,6 +493,13 @@
 ; Always populate the $HTTP_RAW_POST_DATA variable.
 ;always_populate_raw_post_data = On
 
+; Unicode settings
+unicode_semantics = off
+unicode.runtime_encoding = iso-8859-1 
+unicode.script_encoding = utf-8
+unicode.output_encoding = utf-8
+unicode.from_error_mode = U_INVALID_SUBSTITUTE
+unicode.from_error_subst_char = 3f
 
 ;
 ; Paths and Directories ;

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS

2005-08-09 Thread Andi Gutmans
andiTue Aug  9 18:23:04 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  - This didn't end up being included
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.2r2=1.2027.2.3ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.2 php-src/NEWS:1.2027.2.3
--- php-src/NEWS:1.2027.2.2 Tue Aug  9 01:40:54 2005
+++ php-src/NEWSTue Aug  9 18:23:01 2005
@@ -261,7 +261,6 @@
 - Added MDTM support to ftp_url_stat. (Sara)
 - Added zlib stream filter support. (Sara)
 - Added bz2 stream filter support. (Sara)
-- Added HTTP/1.1 and chunked encoding support to http:// wrapper. (Sara)
 - Added max_redirects context option that specifies how many HTTP 
   redirects to follow. (Ilia)
 - Added support of parameter=value arrays to 
xsl_xsltprocessor_set_parameter().

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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard string.c /ext/standard/tests/strings stristr.phpt strstr.phpt

2005-08-09 Thread Andi Gutmans

Please use strlcpy() and not strncpy().
http://www.courtesan.com/todd/papers/strlcpy.html for more info

PHP bundles this functionality...

Andi

At 08:49 PM 8/9/2005 +, Johannes Schlüter wrote:

johannesTue Aug  9 16:49:19 2005 EDT

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

  Modified files:
/php-srcNEWS
/php-src/ext/standard   string.c
/php-src/ext/standard/tests/strings strstr.phpt
  Log:
  - Added option to strstr() and stristr() to get a particular haystack 
component


http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2030r2=1.2031ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2030 php-src/NEWS:1.2031
--- php-src/NEWS:1.2030 Tue Aug  9 11:07:18 2005
+++ php-src/NEWSTue Aug  9 16:49:12 2005
@@ -6,6 +6,8 @@
   . Added CURLINFO_HEADER_OUT to facilitate request retrieval.
 - Added an optional parameter to parse_url() to allow retrieval of 
distinct URL

   components. (Ilia)
+- Added an optional parameter to strstr() and stristr() for retrieval of 
either

+  the part of haystack before or after first occurence of needle. (Johannes)

 ?? ??? 2005, PHP 5.1
 - Upgraded PCRE library to version 6.2. (Andrei)
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.445r2=1.446ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445 
php-src/ext/standard/string.c:1.446

--- php-src/ext/standard/string.c:1.445 Wed Aug  3 10:08:13 2005
+++ php-src/ext/standard/string.c   Tue Aug  9 16:49:18 2005
@@ -18,7 +18,7 @@
+--+
  */

-/* $Id: string.c,v 1.445 2005/08/03 14:08:13 sniper Exp $ */
+/* $Id: string.c,v 1.446 2005/08/09 20:49:18 johannes Exp $ */

 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

@@ -1433,52 +1433,60 @@
 }
 /* }}} */

-/* {{{ proto string stristr(string haystack, string needle)
+/* {{{ proto string stristr(string haystack, string needle[, bool part])
Finds first occurrence of a string within another, case insensitive */
 PHP_FUNCTION(stristr)
 {
-   zval **haystack, **needle;
+   char *haystack;
+   long haystack_len;
+   zval *needle;
+   zend_bool part = 0;
char *found = NULL;
int  found_offset;
char *haystack_orig;
char needle_char[2];

-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
needle) == FAILURE) {

-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sz|b, 
haystack, haystack_len, needle, part) == FAILURE) {

+   return;
}

-   SEPARATE_ZVAL(haystack);
-   SEPARATE_ZVAL(needle);
-
-   convert_to_string_ex(haystack);
+   SEPARATE_ZVAL(needle);

-   haystack_orig = estrndup(Z_STRVAL_PP(haystack), 
Z_STRLEN_PP(haystack));

+   haystack_orig = estrndup(haystack, haystack_len);

-   if (Z_TYPE_PP(needle) == IS_STRING) {
-   if (!Z_STRLEN_PP(needle)) {
+   if (Z_TYPE_P(needle) == IS_STRING) {
+   if (!Z_STRLEN_P(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Empty delimiter.);

efree(haystack_orig);
RETURN_FALSE;
}

-   found = php_stristr(Z_STRVAL_PP(haystack),
-   Z_STRVAL_PP(needle),
-   Z_STRLEN_PP(haystack),
-   Z_STRLEN_PP(needle));
+   found = php_stristr(haystack,
+   Z_STRVAL_P(needle),
+   haystack_len,
+   Z_STRLEN_P(needle));
} else {
-   convert_to_long_ex(needle);
-   needle_char[0] = (char) Z_LVAL_PP(needle);
+   convert_to_long_ex(needle);
+   needle_char[0] = (char) Z_LVAL_P(needle);
needle_char[1] = 0;

-   found = php_stristr(Z_STRVAL_PP(haystack),
+   found = php_stristr(haystack,
needle_char,
-   Z_STRLEN_PP(haystack),
+   haystack_len,
1);
}

if (found) {
-   found_offset = found - Z_STRVAL_PP(haystack);
-   RETVAL_STRINGL(haystack_orig + found_offset, 
Z_STRLEN_PP(haystack) - found_offset, 1);

+   found_offset = found - haystack;
+   if (part) {
+   char *ret;
+   ret = emalloc(found_offset + 1);
+   strncpy(ret, haystack_orig, found_offset);
+   ret[found_offset] = '\0';
+   

[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS configure.in /main php_version.h ZendEngine2 zend.h

2005-08-08 Thread Andi Gutmans
andiTue Aug  9 01:09:01 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS configure.in 
/ZendEngine2zend.h 
/php-src/main   php_version.h 
  Log:
  - RC1
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027r2=1.2027.2.1ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027 php-src/NEWS:1.2027.2.1
--- php-src/NEWS:1.2027 Mon Aug  8 17:35:03 2005
+++ php-src/NEWSTue Aug  9 01:08:55 2005
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-?? ??? 2005, PHP 5.1
+8 Aug 2005, PHP 5.1 Release Candidate 1
 - Updated bundled libraries in Windows distribution. (Edin)
   . zlib 1.2.3
   . curl 7.14.0
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.579r2=1.579.2.1ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579 php-src/configure.in:1.579.2.1
--- php-src/configure.in:1.579  Mon Aug  8 12:06:47 2005
+++ php-src/configure.inTue Aug  9 01:08:56 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579 2005/08/08 16:06:47 sniper Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.579.2.1 2005/08/09 05:08:56 andi Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=0
-EXTRA_VERSION=-dev
+EXTRA_VERSION=RC1
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.293r2=1.293.2.1ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293 ZendEngine2/zend.h:1.293.2.1
--- ZendEngine2/zend.h:1.293Wed Aug  3 09:30:46 2005
+++ ZendEngine2/zend.h  Tue Aug  9 01:08:59 2005
@@ -17,12 +17,12 @@
+--+
 */
 
-/* $Id: zend.h,v 1.293 2005/08/03 13:30:46 sniper Exp $ */
+/* $Id: zend.h,v 1.293.2.1 2005/08/09 05:08:59 andi Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
 
-#define ZEND_VERSION 2.1.0-dev
+#define ZEND_VERSION 2.1.0RC1
 
 #define ZEND_ENGINE_2
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.112r2=1.112.2.1ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.112 php-src/main/php_version.h:1.112.2.1
--- php-src/main/php_version.h:1.112Thu Jul 14 10:01:02 2005
+++ php-src/main/php_version.h  Tue Aug  9 01:08:59 2005
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 5.1.0-dev
+#define PHP_EXTRA_VERSION RC1
+#define PHP_VERSION 5.1.0RC1

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS configure.in /main php_version.h ZendEngine2 zend.h

2005-08-08 Thread Andi Gutmans
andiTue Aug  9 01:40:56 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS configure.in 
/ZendEngine2zend.h 
/php-src/main   php_version.h 
  Log:
  - No release today. Found a critical bug...
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.1r2=1.2027.2.2ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.1 php-src/NEWS:1.2027.2.2
--- php-src/NEWS:1.2027.2.1 Tue Aug  9 01:08:55 2005
+++ php-src/NEWSTue Aug  9 01:40:54 2005
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-8 Aug 2005, PHP 5.1 Release Candidate 1
+?? Aug 2005, PHP 5.1 Release Candidate 1
 - Updated bundled libraries in Windows distribution. (Edin)
   . zlib 1.2.3
   . curl 7.14.0
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.579.2.1r2=1.579.2.2ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.1 php-src/configure.in:1.579.2.2
--- php-src/configure.in:1.579.2.1  Tue Aug  9 01:08:56 2005
+++ php-src/configure.inTue Aug  9 01:40:55 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.1 2005/08/09 05:08:56 andi Exp $ -*- autoconf 
-*-
+ ## $Id: configure.in,v 1.579.2.2 2005/08/09 05:40:55 andi Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=0
-EXTRA_VERSION=RC1
+EXTRA_VERSION=-dev
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.293.2.1r2=1.293.2.2ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.1 ZendEngine2/zend.h:1.293.2.2
--- ZendEngine2/zend.h:1.293.2.1Tue Aug  9 01:08:59 2005
+++ ZendEngine2/zend.h  Tue Aug  9 01:40:55 2005
@@ -17,12 +17,12 @@
+--+
 */
 
-/* $Id: zend.h,v 1.293.2.1 2005/08/09 05:08:59 andi Exp $ */
+/* $Id: zend.h,v 1.293.2.2 2005/08/09 05:40:55 andi Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
 
-#define ZEND_VERSION 2.1.0RC1
+#define ZEND_VERSION 2.1.0-dev
 
 #define ZEND_ENGINE_2
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.112.2.1r2=1.112.2.2ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.112.2.1 
php-src/main/php_version.h:1.112.2.2
--- php-src/main/php_version.h:1.112.2.1Tue Aug  9 01:08:59 2005
+++ php-src/main/php_version.h  Tue Aug  9 01:40:56 2005
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION RC1
-#define PHP_VERSION 5.1.0RC1
+#define PHP_EXTRA_VERSION -dev
+#define PHP_VERSION 5.1.0-dev

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



Re: [PHP-CVS] cvs: php-src /ext/spl spl_iterators.c /ext/spl/internal recursiveiteratoriterator.inc

2005-08-02 Thread Andi Gutmans
It's really irrelevant. The fact that something isn't supported doesn't 
mean you should commit stuff which doesn't fit coding standards.


At 04:22 AM 8/2/2005 +0200, Marcus Boerger wrote:

Hello Andi,

  in the end we want class constants but right now we didn't commit that
patch.

marcus

Tuesday, August 2, 2005, 3:28:39 AM, you wrote:

 Aren't these RIT constants against our coding standards? Might be too late
 now if it's in 5.0.x but we should stick to plan. Something like
 RECURSIVE_ITERATOR_SELF_FIRST

 Andi

 At 10:19 PM 7/27/2005 +, Marcus Boerger wrote:
helly   Wed Jul 27 18:19:02 2005 EDT

   Modified files:
 /php-src/ext/splspl_iterators.c
 /php-src/ext/spl/internal   recursiveiteratoriterator.inc
   Log:
   - Fix issues with iterators and excpetions
   # update documentation
   #
   # In 5.2 we need to implement an event handler onException() to be 
invoked

   # on exceptions during getChildren() calls. Its default implementation
   # would simply rethrow the exception if the flag is not set and 
delete if

   # if it was set. To do so the exceptions refcount needs to be increased
   # before calling zend_clear_exception() to keep the exception alive but
   # clear the control information.
   #
   # As a side note this is alos the easy solution to allow multi exception
   # handling: Simply clear the engine's exception info and add a property
   # called $previousException to the base exception and assign it from the
   # already pending one.


http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.70r2=1 
.71ty=u

Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.70
php-src/ext/spl/spl_iterators.c:1.71
--- php-src/ext/spl/spl_iterators.c:1.70Thu Jun 16 10:56:13 2005
+++ php-src/ext/spl/spl_iterators.c Wed Jul 27 18:19:00 2005
@@ -16,7 +16,7 @@

 +--+
   */

-/* $Id: spl_iterators.c,v 1.70 2005/06/16 14:56:13 dmitry Exp $ */
+/* $Id: spl_iterators.c,v 1.71 2005/07/27 22:19:00 helly Exp $ */

  #ifdef HAVE_CONFIG_H
  # include config.h
@@ -65,6 +65,9 @@
 RIT_CHILD_FIRST = 2
  } RecursiveIteratorMode;

+#define RIT_MODE_MASK   0x00FF
+#define RIT_CATCH_GET_CHILD 0x0100
+
  typedef enum {
 RS_NEXT  = 0,
 RS_TEST  = 1,
@@ -85,6 +88,7 @@
 spl_sub_iterator *iterators;
 int  level;
 RecursiveIteratorModemode;
+   int  flags;
 zend_function*callHasChildren;
 zend_function*callGetChildren;
 zend_function*beginChildren;
@@ -222,6 +226,20 @@
 } else {

zend_call_method_with_0_params(zobject, ce, NULL, getchildren, child);
 }
+
+   if (EG(exception)) {
+   if (!(object-flags 
RIT_CATCH_GET_CHILD)) {
+   return;
+   } else {
+
zend_clear_exception(TSRMLS_C);
+   if (child) {
+ 
zval_ptr_dtor(child);

+   }
+
object-iterators[object-level].state = RS_NEXT;
+   goto next_step;
+   }
+   }
+
 ce = child  Z_TYPE_P(child) ==
 IS_OBJECT ? Z_OBJCE_P(child) : NULL;
 if (!ce || !instanceof_function(ce,
 spl_ce_RecursiveIterator TSRMLS_CC)) {
 if (child) {
@@ -344,7 +362,8 @@
 intern =
 (spl_recursive_it_object*)zend_object_store_get_object(object TSRMLS_CC);
 intern-iterators = emalloc(sizeof(spl_sub_iterator));
 intern-level = 0;
-   intern-mode = mode;
+   intern-mode = mode  RIT_MODE_MASK;
+   intern-flags = mode  ~RIT_MODE_MASK;
 intern-ce = Z_OBJCE_P(object);
 zend_hash_find(intern-ce-function_table, callhaschildren,
 sizeof(callHasChildren), (void **) intern-callHasChildren);
 if (intern-callHasChildren-common.scope ==
 spl_ce_RecursiveIteratorIterator) {
@@ -1308,8 +1327,7 @@
 if (zend_is_true(retval)) {

zend_call_method_with_0_params(intern-inner.zobject, intern-inner.ce,
NULL, getchildren, zchildren);
 if (EG(exception) 
 intern-u.caching.flags  CIT_CATCH_GET_CHILD) {
-   zval_ptr_dtor(EG(exception));
-   EG(exception) = NULL;
+   zend_clear_exception(TSRMLS_C);
 if (zchildren) {
 zval_ptr_dtor(zchildren);
 }
@@ -1914,9 +1932,10 @@
 

Re: [PHP-CVS] cvs: php-src /ext/spl spl_iterators.c /ext/spl/internal recursiveiteratoriterator.inc

2005-08-01 Thread Andi Gutmans
Aren't these RIT constants against our coding standards? Might be too late 
now if it's in 5.0.x but we should stick to plan. Something like 
RECURSIVE_ITERATOR_SELF_FIRST


Andi

At 10:19 PM 7/27/2005 +, Marcus Boerger wrote:

helly   Wed Jul 27 18:19:02 2005 EDT

  Modified files:
/php-src/ext/splspl_iterators.c
/php-src/ext/spl/internal   recursiveiteratoriterator.inc
  Log:
  - Fix issues with iterators and excpetions
  # update documentation
  #
  # In 5.2 we need to implement an event handler onException() to be invoked
  # on exceptions during getChildren() calls. Its default implementation
  # would simply rethrow the exception if the flag is not set and delete if
  # if it was set. To do so the exceptions refcount needs to be increased
  # before calling zend_clear_exception() to keep the exception alive but
  # clear the control information.
  #
  # As a side note this is alos the easy solution to allow multi exception
  # handling: Simply clear the engine's exception info and add a property
  # called $previousException to the base exception and assign it from the
  # already pending one.


http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.70r2=1.71ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.70 
php-src/ext/spl/spl_iterators.c:1.71

--- php-src/ext/spl/spl_iterators.c:1.70Thu Jun 16 10:56:13 2005
+++ php-src/ext/spl/spl_iterators.c Wed Jul 27 18:19:00 2005
@@ -16,7 +16,7 @@
+--+
  */

-/* $Id: spl_iterators.c,v 1.70 2005/06/16 14:56:13 dmitry Exp $ */
+/* $Id: spl_iterators.c,v 1.71 2005/07/27 22:19:00 helly Exp $ */

 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -65,6 +65,9 @@
RIT_CHILD_FIRST = 2
 } RecursiveIteratorMode;

+#define RIT_MODE_MASK   0x00FF
+#define RIT_CATCH_GET_CHILD 0x0100
+
 typedef enum {
RS_NEXT  = 0,
RS_TEST  = 1,
@@ -85,6 +88,7 @@
spl_sub_iterator *iterators;
int  level;
RecursiveIteratorModemode;
+   int  flags;
zend_function*callHasChildren;
zend_function*callGetChildren;
zend_function*beginChildren;
@@ -222,6 +226,20 @@
} else {

zend_call_method_with_0_params(zobject, ce, NULL, getchildren, child);
}
+
+   if (EG(exception)) {
+   if (!(object-flags  
RIT_CATCH_GET_CHILD)) {

+   return;
+   } else {
+ 
zend_clear_exception(TSRMLS_C);

+   if (child) {
+   zval_ptr_dtor(child);
+   }
+ 
object-iterators[object-level].state = RS_NEXT;

+   goto next_step;
+   }
+   }
+
ce = child  Z_TYPE_P(child) == 
IS_OBJECT ? Z_OBJCE_P(child) : NULL;
if (!ce || !instanceof_function(ce, 
spl_ce_RecursiveIterator TSRMLS_CC)) {

if (child) {
@@ -344,7 +362,8 @@
intern = 
(spl_recursive_it_object*)zend_object_store_get_object(object TSRMLS_CC);

intern-iterators = emalloc(sizeof(spl_sub_iterator));
intern-level = 0;
-   intern-mode = mode;
+   intern-mode = mode  RIT_MODE_MASK;
+   intern-flags = mode  ~RIT_MODE_MASK;
intern-ce = Z_OBJCE_P(object);
zend_hash_find(intern-ce-function_table, callhaschildren, 
sizeof(callHasChildren), (void **) intern-callHasChildren);
if (intern-callHasChildren-common.scope == 
spl_ce_RecursiveIteratorIterator) {

@@ -1308,8 +1327,7 @@
if (zend_is_true(retval)) {

zend_call_method_with_0_params(intern-inner.zobject, intern-inner.ce, 
NULL, getchildren, zchildren);
if (EG(exception)  
intern-u.caching.flags  CIT_CATCH_GET_CHILD) {

-   zval_ptr_dtor(EG(exception));
-   EG(exception) = NULL;
+   zend_clear_exception(TSRMLS_C);
if (zchildren) {
zval_ptr_dtor(zchildren);
}
@@ -1914,9 +1932,10 @@
spl_ce_RecursiveIteratorIterator-get_iterator = 
spl_recursive_it_get_iterator;
spl_ce_RecursiveIteratorIterator-iterator_funcs.funcs = 
spl_recursive_it_iterator_funcs;


-   REGISTER_LONG_CONSTANT(RIT_LEAVES_ONLY,  (long)RIT_LEAVES_ONLY, 
CONST_CS | CONST_PERSISTENT);
-   REGISTER_LONG_CONSTANT(RIT_SELF_FIRST,   

Re: [PHP-CVS] cvs: php-src /main php_ini.c

2005-07-28 Thread Andi Gutmans

Is this a bug fix? Or added functionality?

At 03:12 PM 7/27/2005 +, Hartmut Holzgraefe wrote:

hholzgraWed Jul 27 11:12:19 2005 EDT

  Modified files:
/php-src/main   php_ini.c
  Log:
  php.ini search logic needs to use the absolute path of the running binary
  when looking for php.ini in the directory the php binary is installed in


http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.130r2=1.131ty=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.130 php-src/main/php_ini.c:1.131
--- php-src/main/php_ini.c:1.130Fri Jun 17 05:39:23 2005
+++ php-src/main/php_ini.c  Wed Jul 27 11:12:18 2005
@@ -16,7 +16,7 @@
+--+
  */

-/* $Id: php_ini.c,v 1.130 2005/06/17 09:39:23 dmitry Exp $ */
+/* $Id: php_ini.c,v 1.131 2005/07/27 15:12:18 hholzgra Exp $ */

 /* Check CWD for php.ini */
 #define INI_CHECK_CWD
@@ -350,7 +350,11 @@
}
 #else
if (sapi_module.executable_location) {
-   binary_location = 
estrdup(sapi_module.executable_location);

+   binary_location = (char *)emalloc(PATH_MAX);
+   if (!realpath(sapi_module.executable_location, 
binary_location)) {

+   efree(binary_location);
+   binary_location = NULL;
+}
} else {
binary_location = NULL;
}
@@ -359,7 +363,7 @@
char *separator_location = 
strrchr(binary_location, DEFAULT_SLASH);


if (separator_location) {
-   *(separator_location+1) = 0;
+   *(separator_location) = 0;
}
if (*php_ini_search_path) {
strcat(php_ini_search_path, paths_separator);

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


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



Re: [PHP-CVS] cvs: php-src /main php_ini.c

2005-07-28 Thread Andi Gutmans

Ok thanks.

At 03:18 AM 7/29/2005 +0300, Jani Taskinen wrote:


It's a fix. php.ini was looked in php/ when it should have
been looked under /path-to-php-binary/

--Jani

On Thu, 28 Jul 2005, Andi Gutmans wrote:


Is this a bug fix? Or added functionality?

At 03:12 PM 7/27/2005 +, Hartmut Holzgraefe wrote:

hholzgraWed Jul 27 11:12:19 2005 EDT
  Modified files:
/php-src/main   php_ini.c
  Log:
  php.ini search logic needs to use the absolute path of the running binary
  when looking for php.ini in the directory the php binary is installed in

http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.130r2=1.131ty=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.130 php-src/main/php_ini.c:1.131
--- php-src/main/php_ini.c:1.130Fri Jun 17 05:39:23 2005
+++ php-src/main/php_ini.c  Wed Jul 27 11:12:18 2005
@@ -16,7 +16,7 @@

+--+
  */
-/* $Id: php_ini.c,v 1.130 2005/06/17 09:39:23 dmitry Exp $ */
+/* $Id: php_ini.c,v 1.131 2005/07/27 15:12:18 hholzgra Exp $ */
 /* Check CWD for php.ini */
 #define INI_CHECK_CWD
@@ -350,7 +350,11 @@
}
 #else
if (sapi_module.executable_location) {
-   binary_location = 
estrdup(sapi_module.executable_location);

+   binary_location = (char *)emalloc(PATH_MAX);
+   if (!realpath(sapi_module.executable_location, 
binary_location)) {

+   efree(binary_location);
+   binary_location = NULL;
+}
} else {
binary_location = NULL;
}
@@ -359,7 +363,7 @@
char *separator_location = 
strrchr(binary_location, DEFAULT_SLASH);

if (separator_location) {
-   *(separator_location+1) = 0;
+   *(separator_location) = 0;
}
if (*php_ini_search_path) {
strcat(php_ini_search_path, 
paths_separator);

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




--
Donate @ http://pecl.php.net/wishlist.php/sniper

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


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



Re: [PHP-CVS] cvs: php-src /ext/xsl/tests bug33853.phpt

2005-07-25 Thread Andi Gutmans

Never mind my previous email. I see it was the right bug # :)

At 08:21 PM 7/25/2005 +, Marcus Boerger wrote:

helly   Mon Jul 25 16:21:45 2005 EDT

  Added files:
/php-src/ext/xsl/tests  bug33853.phpt
  Log:
  - Add new test


http://cvs.php.net/co.php/php-src/ext/xsl/tests/bug33853.phpt?r=1.1p=1
Index: php-src/ext/xsl/tests/bug33853.phpt
+++ php-src/ext/xsl/tests/bug33853.phpt
--TEST--
Bug #33853 (php:function call __autoload with lowercase param)
--SKIPIF--
?php if (!extension_loaded('xsl')) die('skip xsl not loaded'); ?
--FILE--
?php

function __autoload($className) {
var_dump($className);
exit();
}

$xsl = new DomDocument();
$xsl-loadXML('?xml version=1.0 encoding=iso-8859-1 ?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:php=http://php.net/xsl;
xsl:template match=/
xsl:value-of select=php:function(\'TeSt::dateLang\') /
/xsl:template
/xsl:stylesheet');
$inputdom = new DomDocument();
$inputdom-loadXML('?xml version=1.0 encoding=iso-8859-1 ?
today/today');

$proc = new XsltProcessor();
$proc-registerPhpFunctions();
$xsl = $proc-importStylesheet($xsl);
$newdom = $proc-transformToDoc($inputdom);
?
===DONE===
--EXPECT--
string(4) TeSt

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


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



Re: [PHP-CVS] cvs: php-src /ext/mcve mcve.c php_mcve.h

2005-07-18 Thread Andi Gutmans

Brad,

In any case, we are in a complete feature freeze right now. I sent an email 
about this to [EMAIL PROTECTED] Only bug fixes allowed. Please #if BRAD_0 that 
code in HEAD.  I don't see a problem allowing the addition of such simple 
wrapper functions after 5.1.0 goes out the door; but I don't want such code 
changes at this point.


Andi

At 12:54 AM 7/19/2005 +0400, Antony Dovgal wrote:

On Mon, 18 Jul 2005 16:34:44 -0400
Brad House [EMAIL PROTECTED] wrote:

 Perhaps.  There was discussion once upon a time along those lines,
 but nothing else came of it.  I'd have to know what it entails,
 and if it would prohibit the extension from being distributed
 with the main PHP codebase.

AFAIK the general plan is to move almost all extensions to PECL
(and we're working on it, take a look on how many extensions were moved
there in 5.0 and 5.1), so users would be able to get  install only
extensions they really need.

Personally I don't think that ext/mcve is used by large number of users
(I haven't ever heard of someone using it) and IMO that's a perfect reason
to move it from the core to PECL.
I can be wrong, though.

There are also several rather important reasons to do so:
1) you wouldn't depend on PHP release cycles.
2) you would be able to use PECL infrastructure to build Win32 *.dll's
3) Others.

All this doesn't mean that users will not be able to install/use the 
extension
or even have some problems with it. Extensions from PECL can be installed 
with this command:

# pear install extname
See details here: http://www.php.net/manual/en/install.pecl.php

 Forgive my ignorance, but I have
 not even looked into what PECL really is.

Well, I'd recommend to take a look on it, since you're the maintainer of 
an extension..


--
Wbr,
Antony Dovgal

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


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



[PHP-CVS] cvs: php-src / NEWS configure.in /main php_version.h ZendEngine2 zend.h

2005-07-14 Thread Andi Gutmans
andiThu Jul 14 09:44:03 2005 EDT

  Modified files:  
/php-srcNEWS configure.in 
/ZendEngine2zend.h 
/php-src/main   php_version.h 
  Log:
  - Beta 3 
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1996r2=1.1997ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1996 php-src/NEWS:1.1997
--- php-src/NEWS:1.1996 Wed Jul 13 16:44:07 2005
+++ php-src/NEWSThu Jul 14 09:44:03 2005
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-12 Jul 2005, PHP 5.1 Beta 3
+14 Jul 2005, PHP 5.1 Beta 3
 - Upgraded bundled SQLite library for PDO:SQLite to 3.2.2 (Ilia)
 - Moved extensions to PECL:
   . ext/dbx (Jani, Derick)
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.573r2=1.574ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.573 php-src/configure.in:1.574
--- php-src/configure.in:1.573  Wed Jul 13 20:12:20 2005
+++ php-src/configure.inThu Jul 14 09:44:03 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.573 2005/07/14 00:12:20 sniper Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.574 2005/07/14 13:44:03 andi Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=0
-EXTRA_VERSION=-dev
+EXTRA_VERSION=b3
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.290r2=1.291ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.290 ZendEngine2/zend.h:1.291
--- ZendEngine2/zend.h:1.290Tue Jul 12 16:25:28 2005
+++ ZendEngine2/zend.h  Thu Jul 14 09:44:03 2005
@@ -17,12 +17,12 @@
+--+
 */
 
-/* $Id: zend.h,v 1.290 2005/07/12 20:25:28 andi Exp $ */
+/* $Id: zend.h,v 1.291 2005/07/14 13:44:03 andi Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
 
-#define ZEND_VERSION 2.1.0-dev
+#define ZEND_VERSION 2.1.0b3
 
 #define ZEND_ENGINE_2
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.110r2=1.111ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.110 php-src/main/php_version.h:1.111
--- php-src/main/php_version.h:1.110Tue Jul 12 16:25:28 2005
+++ php-src/main/php_version.h  Thu Jul 14 09:44:03 2005
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 5.1.0-dev
+#define PHP_EXTRA_VERSION b3
+#define PHP_VERSION 5.1.0b3

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



[PHP-CVS] cvs: php-src / configure.in /main php_version.h ZendEngine2 zend.h

2005-07-14 Thread Andi Gutmans
andiThu Jul 14 10:01:02 2005 EDT

  Modified files:  
/php-srcconfigure.in 
/ZendEngine2zend.h 
/php-src/main   php_version.h 
  Log:
  - Back to -dev
  
  
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.574r2=1.575ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.574 php-src/configure.in:1.575
--- php-src/configure.in:1.574  Thu Jul 14 09:44:03 2005
+++ php-src/configure.inThu Jul 14 10:00:57 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.574 2005/07/14 13:44:03 andi Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.575 2005/07/14 14:00:57 andi Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=0
-EXTRA_VERSION=b3
+EXTRA_VERSION=-dev
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.291r2=1.292ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.291 ZendEngine2/zend.h:1.292
--- ZendEngine2/zend.h:1.291Thu Jul 14 09:44:03 2005
+++ ZendEngine2/zend.h  Thu Jul 14 10:01:02 2005
@@ -17,12 +17,12 @@
+--+
 */
 
-/* $Id: zend.h,v 1.291 2005/07/14 13:44:03 andi Exp $ */
+/* $Id: zend.h,v 1.292 2005/07/14 14:01:02 andi Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
 
-#define ZEND_VERSION 2.1.0b3
+#define ZEND_VERSION 2.1.0-dev
 
 #define ZEND_ENGINE_2
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.111r2=1.112ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.111 php-src/main/php_version.h:1.112
--- php-src/main/php_version.h:1.111Thu Jul 14 09:44:03 2005
+++ php-src/main/php_version.h  Thu Jul 14 10:01:02 2005
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION b3
-#define PHP_VERSION 5.1.0b3
+#define PHP_EXTRA_VERSION -dev
+#define PHP_VERSION 5.1.0-dev

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



Re: [PHP-CVS] cvs: php-src /ext/pdo_mysql mysql_statement.c

2005-07-13 Thread Andi Gutmans

Is this a build error in Beta 3?
Was just about to post it...

Andi

At 02:20 AM 7/14/2005 +, Wez Furlong wrote:

wez Wed Jul 13 22:20:52 2005 EDT

  Modified files:
/php-src/ext/pdo_mysql  mysql_statement.c
  Log:
  gah!


http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.42r2=1.43ty=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.42 
php-src/ext/pdo_mysql/mysql_statement.c:1.43
--- php-src/ext/pdo_mysql/mysql_statement.c:1.42Wed Jul 13 
22:03:54 2005

+++ php-src/ext/pdo_mysql/mysql_statement.c Wed Jul 13 22:20:52 2005
@@ -17,7 +17,7 @@
   +--+
 */

-/* $Id: mysql_statement.c,v 1.42 2005/07/14 02:03:54 wez Exp $ */
+/* $Id: mysql_statement.c,v 1.43 2005/07/14 02:20:52 wez Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -155,7 +155,7 @@

;
row_count = mysql_stmt_affected_rows(S-stmt);
-   if (row_cont != (my_ulonglong)-1) {
+   if (row_count != (my_ulonglong)-1) {
stmt-row_count = row_count;
}
return 1;

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


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



[PHP-CVS] cvs: php-src / configure.in /main php_version.h ZendEngine2 zend.h

2005-07-12 Thread Andi Gutmans
andiTue Jul 12 15:59:53 2005 EDT

  Modified files:  
/php-srcconfigure.in 
/ZendEngine2zend.h 
/php-src/main   php_version.h 
  Log:
  - Beta 3
  
  
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.570r2=1.571ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.570 php-src/configure.in:1.571
--- php-src/configure.in:1.570  Thu Jun 23 00:20:47 2005
+++ php-src/configure.inTue Jul 12 15:59:51 2005
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.570 2005/06/23 04:20:47 andi Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.571 2005/07/12 19:59:51 andi Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=0
-EXTRA_VERSION=-dev
+EXTRA_VERSION=b3
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.288r2=1.289ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.288 ZendEngine2/zend.h:1.289
--- ZendEngine2/zend.h:1.288Thu Jul  7 12:07:08 2005
+++ ZendEngine2/zend.h  Tue Jul 12 15:59:52 2005
@@ -17,12 +17,12 @@
+--+
 */
 
-/* $Id: zend.h,v 1.288 2005/07/07 16:07:08 dmitry Exp $ */
+/* $Id: zend.h,v 1.289 2005/07/12 19:59:52 andi Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
 
-#define ZEND_VERSION 2.1.0-dev
+#define ZEND_VERSION 2.1.0b3
 
 #define ZEND_ENGINE_2
 
http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.108r2=1.109ty=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.108 php-src/main/php_version.h:1.109
--- php-src/main/php_version.h:1.108Thu Jun 23 00:20:49 2005
+++ php-src/main/php_version.h  Tue Jul 12 15:59:52 2005
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 5.1.0-dev
+#define PHP_EXTRA_VERSION b3
+#define PHP_VERSION 5.1.0b3

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



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

2005-07-12 Thread Andi Gutmans

Hmm, I wonder where I got that from :)
Good catch.

At 10:33 PM 7/12/2005 +0200, Derick Rethans wrote:

On Tue, 12 Jul 2005, Andi Gutmans wrote:

 http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1993r2=1.1994ty=u
 Index: php-src/NEWS
 diff -u php-src/NEWS:1.1993 php-src/NEWS:1.1994
 --- php-src/NEWS:1.1993   Tue Jul 12 13:55:35 2005
 +++ php-src/NEWS  Tue Jul 12 16:25:48 2005
 @@ -1,6 +1,6 @@
  PHP 
 NEWS
 
|||

 -?? ??? 2005, PHP 5.1 Beta 3
 +30 Jul 2005, PHP 5.1 Beta 3

It's the 12th today, not the 30th.

Derick

--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org


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



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

2005-07-12 Thread Andi Gutmans
andiTue Jul 12 16:40:11 2005 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  - Update Beta 3 date
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1994r2=1.1995ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1994 php-src/NEWS:1.1995
--- php-src/NEWS:1.1994 Tue Jul 12 16:25:48 2005
+++ php-src/NEWSTue Jul 12 16:40:11 2005
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-30 Jul 2005, PHP 5.1 Beta 3
+12 Jul 2005, PHP 5.1 Beta 3
 - Upgraded bundled SQLite library for PDO:SQLite to 3.2.2 (Ilia)
 - Moved extensions to PECL:
   . ext/dbx (Jani, Derick)

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



Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli_fe.c php_mysqli.h

2005-07-12 Thread Andi Gutmans

Is this a critical patch to include in Beta 3?

Andi

At 08:38 PM 7/12/2005 +, Antony Dovgal wrote:

tony2001Tue Jul 12 16:38:35 2005 EDT

  Modified files:
/php-src/ext/mysqli mysqli_fe.c php_mysqli.h
  Log:
  add forgotten ifdefs, fix #33667 (mysqli doesn't compile)


http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.47r2=1.48ty=u
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.47 
php-src/ext/mysqli/mysqli_fe.c:1.48

--- php-src/ext/mysqli/mysqli_fe.c:1.47 Fri Jun 24 10:44:45 2005
+++ php-src/ext/mysqli/mysqli_fe.c  Tue Jul 12 16:38:34 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+

-  $Id: mysqli_fe.c,v 1.47 2005/06/24 14:44:45 georg Exp $
+  $Id: mysqli_fe.c,v 1.48 2005/07/12 20:38:34 tony2001 Exp $
 */

 #ifdef HAVE_CONFIG_H
@@ -85,7 +85,9 @@
PHP_FE(mysqli_field_seek, 
   NULL)
PHP_FE(mysqli_field_tell, 
   NULL)
PHP_FE(mysqli_free_result, 
   NULL)

+#ifdef HAVE_MYSQLI_GET_CHARSET
PHP_FE(mysqli_get_charset, 
   NULL)

+#endif
PHP_FE(mysqli_get_client_info, 
   NULL)
PHP_FE(mysqli_get_client_version, 
   NULL)
PHP_FE(mysqli_get_host_info, 
   NULL)

@@ -194,7 +196,9 @@
PHP_FALIAS(dump_debug_info,mysqli_dump_debug_info,NULL)

PHP_FALIAS(enable_reads_from_master,mysqli_enable_reads_from_master,NULL)
PHP_FALIAS(enable_rpl_parse,mysqli_enable_rpl_parse,NULL)
+#ifdef HAVE_MYSQLI_GET_CHARSET
PHP_FALIAS(get_charset,mysqli_get_charset,NULL)
+#endif
PHP_FALIAS(get_client_info,mysqli_get_client_info,NULL)
PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL)
PHP_FALIAS(get_warnings, mysqli_get_warnings, NULL)
http://cvs.php.net/diff.php/php-src/ext/mysqli/php_mysqli.h?r1=1.52r2=1.53ty=u
Index: php-src/ext/mysqli/php_mysqli.h
diff -u php-src/ext/mysqli/php_mysqli.h:1.52 
php-src/ext/mysqli/php_mysqli.h:1.53

--- php-src/ext/mysqli/php_mysqli.h:1.52Tue Jul 12 11:45:07 2005
+++ php-src/ext/mysqli/php_mysqli.h Tue Jul 12 16:38:34 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+

-  $Id: php_mysqli.h,v 1.52 2005/07/12 15:45:07 georg Exp $
+  $Id: php_mysqli.h,v 1.53 2005/07/12 20:38:34 tony2001 Exp $
 */

 /* A little hack to prevent build break, when mysql is used together with
@@ -334,7 +334,9 @@
 PHP_FUNCTION(mysqli_field_seek);
 PHP_FUNCTION(mysqli_field_tell);
 PHP_FUNCTION(mysqli_free_result);
+#ifdef HAVE_MYSQLI_GET_CHARSET
 PHP_FUNCTION(mysqli_get_charset);
+#endif
 PHP_FUNCTION(mysqli_get_client_info);
 PHP_FUNCTION(mysqli_get_client_version);
 PHP_FUNCTION(mysqli_get_host_info);

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


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



Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli_fe.c php_mysqli.h

2005-07-12 Thread Andi Gutmans

OK good. I'll reroll.

Thanks.

Andi

At 12:50 AM 7/13/2005 +0400, Antony Dovgal wrote:

On Tue, 12 Jul 2005 13:43:39 -0700
Andi Gutmans [EMAIL PROTECTED] wrote:

 Is this a critical patch to include in Beta 3?

Yes, as ext/mysqli just doesn't compile without these ifdefs, if
you have MySQL  5.0.10 installed (and I guess only Georg uses it ATM =).

But thanks for asking, I almost forgot that we're too close to the release
and wanted to commit another one non-critical fix.

--
Wbr,
Antony Dovgal


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



Re: [PHP-CVS] cvs: php-src / NEWS /ext/ldap ldap.c

2005-07-08 Thread Andi Gutmans

Why do you need to convert_to_string_ex() if entry is a string?
Should that be !=?

At 12:46 AM 7/9/2005 +, Jani Taskinen wrote:
+   /* If anything else than string is passed, 
ldap_base_dn = NULL */

+   if (Z_TYPE_PP(entry) == IS_STRING) {
+   convert_to_string_ex(entry);
+   ldap_base_dn = Z_STRVAL_PP(entry);
+   } else {
+   ldap_base_dn = NULL;
+   }
}


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



Re: [PHP-CVS] cvs: php-src /ext/pdo_pgsql pgsql_driver.c

2005-07-07 Thread Andi Gutmans

Oh, that's a different story then...

At 01:54 PM 7/7/2005 +0800, Christopher Kings-Lynne wrote:

It does impose a v7.4 and above libpq requirement, however.

Chris

Andi Gutmans wrote:
Yeah, definitely seems like PQexecParams is the safest and easiest way of 
doing so.
In general, I'm always in favor of using bound parameters exactly for 
this reason.

Andi
At 10:44 AM 7/7/2005 +0800, Christopher Kings-Lynne wrote:

By the way, using PQexecParams is by far the easiest fastest and safest 
way of doing this...


Chris

Ilia Alshanetsky wrote:


iliaa   Wed Jul  6 22:17:21 2005 EDT
  Modified files:
/php-src/ext/pdo_pgsql  pgsql_driver.c   Log:
  Leave it up to the user to decide if to escape the sequence name or not.


http://cvs.php.net/diff.php/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.47r2=1.48ty=u 


Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.47 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.48

--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.47   Wed Jul  6 20:52:19 2005
+++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Jul  6 22:17:20 2005
@@ -16,7 +16,7 @@

+--+
 */

-/* $Id: pgsql_driver.c,v 1.47 2005/07/07 00:52:19 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.48 2005/07/07 02:17:20 iliaa Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -213,11 +213,6 @@
char *q;
ExecStatusType status;

-   /* SQL injection protection */
-   if (strchr(name, '\'')) {
-   return NULL;
-   }
-
spprintf(q, sizeof(SELECT CURRVAL('')) + 
strlen(name), SELECT CURRVAL('%s'), name);

res = PQexec(H-server, q);
efree(q);



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


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


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



Re: [PHP-CVS] cvs: php-src /ext/pdo_pgsql pgsql_driver.c

2005-07-06 Thread Andi Gutmans
Yeah, definitely seems like PQexecParams is the safest and easiest way of 
doing so.
In general, I'm always in favor of using bound parameters exactly for this 
reason.


Andi

At 10:44 AM 7/7/2005 +0800, Christopher Kings-Lynne wrote:
By the way, using PQexecParams is by far the easiest fastest and safest 
way of doing this...


Chris

Ilia Alshanetsky wrote:

iliaa   Wed Jul  6 22:17:21 2005 EDT
  Modified files:
/php-src/ext/pdo_pgsql  pgsql_driver.c   Log:
  Leave it up to the user to decide if to escape the sequence name or not.


http://cvs.php.net/diff.php/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.47r2=1.48ty=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.47 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.48

--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.47   Wed Jul  6 20:52:19 2005
+++ php-src/ext/pdo_pgsql/pgsql_driver.cWed Jul  6 22:17:20 2005
@@ -16,7 +16,7 @@
   +--+
 */

-/* $Id: pgsql_driver.c,v 1.47 2005/07/07 00:52:19 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.48 2005/07/07 02:17:20 iliaa Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -213,11 +213,6 @@
char *q;
ExecStatusType status;

-   /* SQL injection protection */
-   if (strchr(name, '\'')) {
-   return NULL;
-   }
-
spprintf(q, sizeof(SELECT CURRVAL('')) + 
strlen(name), SELECT CURRVAL('%s'), name);

res = PQexec(H-server, q);
efree(q);


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


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



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

2005-07-02 Thread Andi Gutmans

Never mind. I see the bug # here.

At 11:04 PM 7/2/2005 +, Edin Kadribasic wrote:

edink   Sat Jul  2 19:04:34 2005 EDT

  Modified files:
/php-srcNEWS
  Log:
  BFN

http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1971r2=1.1972ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1971 php-src/NEWS:1.1972
--- php-src/NEWS:1.1971 Sat Jul  2 17:19:24 2005
+++ php-src/NEWSSat Jul  2 19:04:34 2005
@@ -19,6 +19,7 @@
 - Fixed bug #30828 (debug_backtrace() reports incorrect class in overridden
   methods). (Dmitry)
 - Fixed bug #30519 (Interface not existing says Class not found). (Dmitry)
+- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin)
 - Fixed bug #28377 (debug_backtrace is intermittently passing args). 
(Dmitry)

 - Fixed bug #27268 (Bad references accentuated by clone). (Dmitry)


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


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



  1   2   3   4   >