[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xsl php_xsl.c

2007-09-27 Thread Antony Dovgal
tony2001Fri Sep 28 05:33:11 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xslphp_xsl.c 
  Log:
  ws
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/php_xsl.c?r1=1.32.2.6.2.2.2.1&r2=1.32.2.6.2.2.2.2&diff_format=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.1 
php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.2
--- php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.1  Thu Sep 27 18:00:46 2007
+++ php-src/ext/xsl/php_xsl.c   Fri Sep 28 05:33:11 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.32.2.6.2.2.2.1 2007/09/27 18:00:46 dmitry Exp $ */
+/* $Id: php_xsl.c,v 1.32.2.6.2.2.2.2 2007/09/28 05:33:11 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -27,7 +27,6 @@
 #include "ext/standard/info.h"
 #include "php_xsl.h"
 
-
 zend_class_entry *xsl_xsltprocessor_class_entry;
 static zend_object_handlers xsl_object_handlers;
 
@@ -107,6 +106,7 @@
efree(object);
 }
 /* }}} */
+
 /* {{{ xsl_objects_new */
 zend_object_value xsl_objects_new(zend_class_entry *class_type TSRMLS_DC)
 {
@@ -243,9 +243,6 @@
 }
 /* }}} */
 
-
-
-
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
 PHP_MSHUTDOWN_FUNCTION(xsl)
@@ -308,7 +305,6 @@
 }
 /* }}} */
 
-
 /*
  * Local variables:
  * tab-width: 4

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



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

2007-09-27 Thread Antony Dovgal
tony2001Fri Sep 28 05:32:41 2007 UTC

  Modified files:  
/php-src/ext/xslphp_xsl.c 
  Log:
  ws
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/php_xsl.c?r1=1.42&r2=1.43&diff_format=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.42 php-src/ext/xsl/php_xsl.c:1.43
--- php-src/ext/xsl/php_xsl.c:1.42  Thu Sep 27 18:28:43 2007
+++ php-src/ext/xsl/php_xsl.c   Fri Sep 28 05:32:41 2007
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.42 2007/09/27 18:28:43 dmitry Exp $ */
+/* $Id: php_xsl.c,v 1.43 2007/09/28 05:32:41 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -27,7 +27,6 @@
 #include "ext/standard/info.h"
 #include "php_xsl.h"
 
-
 zend_class_entry *xsl_xsltprocessor_class_entry;
 static zend_object_handlers xsl_object_handlers;
 
@@ -107,6 +106,7 @@
efree(object);
 }
 /* }}} */
+
 /* {{{ xsl_objects_new */
 zend_object_value xsl_objects_new(zend_class_entry *class_type TSRMLS_DC)
 {
@@ -241,9 +241,6 @@
 }
 /* }}} */
 
-
-
-
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
 PHP_MSHUTDOWN_FUNCTION(xsl)
@@ -306,7 +303,6 @@
 }
 /* }}} */
 
-
 /*
  * Local variables:
  * tab-width: 4

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



[PHP-CVS] cvs: php-src /ext/xsl xsl_fe.h

2007-09-27 Thread Antony Dovgal
tony2001Fri Sep 28 05:32:07 2007 UTC

  Modified files:  
/php-src/ext/xslxsl_fe.h 
  Log:
  fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsl_fe.h?r1=1.11&r2=1.12&diff_format=u
Index: php-src/ext/xsl/xsl_fe.h
diff -u php-src/ext/xsl/xsl_fe.h:1.11 php-src/ext/xsl/xsl_fe.h:1.12
--- php-src/ext/xsl/xsl_fe.h:1.11   Thu Sep 27 18:28:43 2007
+++ php-src/ext/xsl/xsl_fe.hFri Sep 28 05:32:07 2007
@@ -16,13 +16,13 @@
   +--+
 */
 
-/* $Id: xsl_fe.h,v 1.11 2007/09/27 18:28:43 dmitry Exp $ */
+/* $Id: xsl_fe.h,v 1.12 2007/09/28 05:32:07 tony2001 Exp $ */
 
 #ifndef XSL_FE_H
 #define XSL_FE_H
 
 extern const zend_function_entry php_xsl_xsltprocessor_class_functions[];
-extern const zend_class_entry *xsl_xsltprocessor_class_entry;
+extern zend_class_entry *xsl_xsltprocessor_class_entry;
 
 PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet);
 PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc);

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



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

2007-09-27 Thread Jani Taskinen
janiFri Sep 28 02:14:12 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  One more thing..
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.8&r2=1.2027.2.547.2.965.2.9&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.8 php-src/NEWS:1.2027.2.547.2.965.2.9
--- php-src/NEWS:1.2027.2.547.2.965.2.8 Fri Sep 28 02:09:05 2007
+++ php-src/NEWSFri Sep 28 02:14:11 2007
@@ -12,6 +12,9 @@
   . Added better error reporting for php.ini syntax errors
   . Allowed "ini-variables" to be used almost everywhere ini php.ini files
   . Allowed using alphanumeric/variable indexes in "array" ini options
+  . Added 3rd optional parameter to parse_ini_file() to specify the scanning
+mode of INI_SCANNER_NORMAL or INI_SCANNER_RAW. In raw mode option values
+and section values are treated as-is.
   . Fixed get_cfg_var() to be able to return "array" ini options
 
 - Improved memory usage by moving constants to read only memory.

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



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

2007-09-27 Thread Jani Taskinen
janiFri Sep 28 02:09:05 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.7&r2=1.2027.2.547.2.965.2.8&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.7 php-src/NEWS:1.2027.2.547.2.965.2.8
--- php-src/NEWS:1.2027.2.547.2.965.2.7 Thu Sep 27 18:15:22 2007
+++ php-src/NEWSFri Sep 28 02:09:05 2007
@@ -1,22 +1,36 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
+- Added support for dynamic access of static members using $foo::myFunc().
+  (Etienne Kneuss)
+
+- Improved php.ini handling: (Jani)
+  . Added ".htaccess" style user-defined php.ini files support for CGI/FastCGI
+  . Added support for special [PATH=/opt/httpd/www.example.com/] sections.
+All directives set in these sections will not be able to be overridden
+in user-defined ini-files or during runtime in the specified path
+  . Added better error reporting for php.ini syntax errors
+  . Allowed "ini-variables" to be used almost everywhere ini php.ini files
+  . Allowed using alphanumeric/variable indexes in "array" ini options
+  . Fixed get_cfg_var() to be able to return "array" ini options
+
 - Improved memory usage by moving constants to read only memory.
-  (Dmitry,Pierre)
+  (Dmitry, Pierre)
 - Improved ext/soap to support element names in context of XMLShema's .
   (Dmitry)
-- Improved ext/openssl (Dmitry)
+- Improved ext/openssl: (Dmitry)
   . Added support for OpenSSL digest functions
   . Added support for OpenSSL cipher functions
   . Added access to internal values of DSA, RSA and DH keys
 - Improved and cleaned CGI code. FastCGI is now always enabled and can not be
   disabled. See sapi/cgi/CHANGES for more details. (Dmitry)
 
-- Added support for dynamic access of static members using $foo::myFunc().
-  (Etienne Kneuss)
-
 - Fixed bug #42657 (ini_get() returns incorrect value when default is NULL).
   (Jani)
+- Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric
+  characters). (Jani)
+- Fixed bug #27372 (parse error loading browscap.ini at apache startup).
+  (Jani)
 
 30 Aug 2007, PHP 5.2.4
 - Removed --enable-versioning configure option. (Jani)

-- 
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/bcmath bcmath.c /ext/bz2 bz2.c /ext/calendar calendar.c /ext/com_dotnet com_extension.c com_persist.c /ext/ctype ctype.c /ext/curl interface.c /e

2007-09-27 Thread Nuno Lopes

Many many many many many many thanks!
When I opened this e-mail I though I was dreaming, but no, it finally 
happened :)


Thank you both,
Nuno



dmitry Thu Sep 27 18:00:49 2007 UTC

 Modified files:  (Branch: PHP_5_3)
   /php-src NEWS
   /ZendEngine2 zend.h zend_API.c zend_API.h zend_builtin_functions.c
   zend_compile.c zend_compile.h zend_exceptions.c
   zend_execute.c zend_execute.h zend_execute_API.c
   zend_hash.c zend_hash.h zend_ini.c zend_ini.h
   zend_interfaces.c zend_modules.h zend_opcode.c
   /php-src/ext/bcmath bcmath.c
   /php-src/ext/bz2 bz2.c
   /php-src/ext/calendar calendar.c
   /php-src/ext/com_dotnet com_extension.c com_persist.c
   /php-src/ext/ctype ctype.c
   /php-src/ext/curl interface.c
   /php-src/ext/date php_date.c
   /php-src/ext/dba dba.c
   /php-src/ext/dbase dbase.c
   /php-src/ext/dom attr.c cdatasection.c characterdata.c comment.c
   document.c documentfragment.c documenttype.c
   dom_fe.h domconfiguration.c domerror.c
   domerrorhandler.c domexception.c
   domimplementation.c domimplementationlist.c
   domimplementationsource.c domlocator.c
   domstringlist.c element.c entity.c
   entityreference.c namednodemap.c namelist.c node.c
   nodelist.c notation.c php_dom.c
   processinginstruction.c string_extend.c text.c
   typeinfo.c userdatahandler.c xpath.c
   /php-src/ext/exif exif.c
   /php-src/ext/fbsql php_fbsql.c
   /php-src/ext/fdf fdf.c
   /php-src/ext/filter filter.c
   /php-src/ext/ftp php_ftp.c
   /php-src/ext/gd gd.c
   /php-src/ext/gettext gettext.c
   /php-src/ext/gmp gmp.c
   /php-src/ext/hash hash.c
   /php-src/ext/iconv iconv.c
   /php-src/ext/imap php_imap.c
   /php-src/ext/interbase interbase.c
   /php-src/ext/json json.c
   /php-src/ext/ldap ldap.c
   /php-src/ext/libxml libxml.c
   /php-src/ext/mbstring mbstring.c
   /php-src/ext/mcrypt mcrypt.c
   /php-src/ext/mhash mhash.c
   /php-src/ext/mime_magic mime_magic.c
   /php-src/ext/ming ming.c
   /php-src/ext/msql php_msql.c
   /php-src/ext/mssql php_mssql.c
   /php-src/ext/mysql php_mysql.c
   /php-src/ext/mysqli mysqli.c mysqli_driver.c mysqli_exception.c
  mysqli_fe.c mysqli_warning.c php_mysqli.h
   /php-src/ext/ncurses ncurses_fe.c php_ncurses.h
   /php-src/ext/oci8 oci8.c
   /php-src/ext/odbc birdstep.c php_odbc.c
   /php-src/ext/openssl openssl.c
   /php-src/ext/pcntl pcntl.c
   /php-src/ext/pcre php_pcre.c
   /php-src/ext/pdo pdo.c pdo_dbh.c pdo_stmt.c php_pdo_driver.h
   php_pdo_int.h
   /php-src/ext/pdo_dblib pdo_dblib.c
   /php-src/ext/pdo_firebird pdo_firebird.c
   /php-src/ext/pdo_mysql pdo_mysql.c
   /php-src/ext/pdo_oci pdo_oci.c
   /php-src/ext/pdo_odbc pdo_odbc.c
   /php-src/ext/pdo_pgsql pdo_pgsql.c pgsql_driver.c
   /php-src/ext/pdo_sqlite pdo_sqlite.c sqlite_driver.c
   /php-src/ext/pgsql pgsql.c
   /php-src/ext/posix posix.c
   /php-src/ext/pspell pspell.c
   /php-src/ext/readline readline.c
   /php-src/ext/recode recode.c
   /php-src/ext/reflection php_reflection.c
   /php-src/ext/session session.c
   /php-src/ext/shmop shmop.c
   /php-src/ext/simplexml simplexml.c
   /php-src/ext/skeleton skeleton.c
   /php-src/ext/snmp snmp.c winsnmp.c
   /php-src/ext/soap soap.c
   /php-src/ext/sockets sockets.c
   /php-src/ext/spl php_spl.c spl_array.c spl_directory.c
   spl_functions.c spl_functions.h spl_iterators.c
   spl_observer.c spl_sxe.c
   /php-src/ext/sqlite pdo_sqlite2.c sqlite.c
   /php-src/ext/standard basic_functions.c dir.c dl.c info.c
user_filters.c
   /php-src/ext/sybase php_sybase_db.c
   /php-src/ext/sybase_ct php_sybase_ct.c
   /php-src/ext/sysvmsg sysvmsg.c
   /php-src/ext/sysvsem sysvsem.c
   /php-src/ext/sysvshm sysvshm.c
   /php-src/ext/tidy tidy.c
   /php-src/ext/tokenizer tokenizer.c
   /php-src/ext/wddx wddx.c
   /php-src/ext/xml xml.c
   /php-src/ext/xmlreader php_xmlreader.c
   /php-src/ext/xmlrpc xmlrpc-epi-php.c
   /php-src/ext/xmlwriter php_xmlwriter.c
   /php-src/ext/xsl php_xsl.c xsl_fe.h xsltprocessor.c
   /php-src/ext/zip php_zip.c
   /php-src/ext/zlib zlib.c
   /php-src/sapi/aolserver aolserver.c
   /php-src/sapi/apache php_apache.c
   /php-src/sapi/apache2filter php_functions.c
   /php-src/sapi/apache2handler php_functions.c
   /php-src/sapi/apache_hooks php_apache.c
   /php-src/sapi/continuity capi.c
   /php-src/sapi/milter php_milter.c
   /php-src/sapi/nsapi nsapi.c
 Log:
 Improved memory usage by movig constants to read only memory. (Dmitry, 
Pierre) 


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



[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/cgi cgi_main.c

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 22:09:46 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  MFH: ws + cs
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.1&r2=1.267.2.15.2.50.2.2&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.1 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.2
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.1 Thu Sep 27 08:23:58 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Sep 27 22:09:46 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.1 2007/09/27 08:23:58 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.2 2007/09/27 22:09:46 jani Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -83,8 +83,7 @@
 #include "fastcgi.h"
 
 #ifndef PHP_WIN32
-/* XXX this will need to change later when threaded fastcgi is
-   implemented.  shane */
+/* XXX this will need to change later when threaded fastcgi is implemented.  
shane */
 struct sigaction act, old_term, old_quit, old_int;
 #endif
 
@@ -187,8 +186,8 @@
Bucket *f = *((Bucket **) a);
Bucket *s = *((Bucket **) b);
 
-   return strcasecmp(((zend_module_entry *)f->pData)->name,
- ((zend_module_entry 
*)s->pData)->name);
+   return strcasecmp(  ((zend_module_entry *)f->pData)->name,
+   ((zend_module_entry 
*)s->pData)->name);
 }
 
 static void print_modules(TSRMLS_D)
@@ -209,11 +208,10 @@
return 0;
 }
 
-static int extension_name_cmp(const zend_llist_element **f,
- const 
zend_llist_element **s TSRMLS_DC)
+static int extension_name_cmp(const zend_llist_element **f, const 
zend_llist_element **s TSRMLS_DC)
 {
-   return strcmp(((zend_extension *)(*f)->data)->name,
- ((zend_extension *)(*s)->data)->name);
+   return strcmp(  ((zend_extension *)(*f)->data)->name,
+   ((zend_extension *)(*s)->data)->name);
 }
 
 static void print_extensions(TSRMLS_D)
@@ -312,8 +310,7 @@
int len;
 
if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) 
{
-   len = slprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
-  "%s\r\n", 
SG(sapi_headers).http_status_line);
+   len = slprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH, 
"%s\r\n", SG(sapi_headers).http_status_line);
 
if (len > SAPI_CGI_MAX_HEADER_LENGTH) {
len = SAPI_CGI_MAX_HEADER_LENGTH;
@@ -323,9 +320,10 @@
char *s;
 
if (SG(sapi_headers).http_status_line &&
-   (s = strchr(SG(sapi_headers).http_status_line, ' 
')) != 0 &&
-   (s - SG(sapi_headers).http_status_line) >= 5 &&
-   strncasecmp(SG(sapi_headers).http_status_line, 
"HTTP/", 5) == 0) {
+   (s = strchr(SG(sapi_headers).http_status_line, 
' ')) != 0 &&
+   (s - SG(sapi_headers).http_status_line) >= 5 &&
+   strncasecmp(SG(sapi_headers).http_status_line, 
"HTTP/", 5) == 0
+   ) {
len = slprintf(buf, sizeof(buf), 
"Status:%s\r\n", s);
} else {
len = slprintf(buf, sizeof(buf), "Status: 
%d\r\n", SG(sapi_headers).http_response_code);
@@ -453,18 +451,20 @@
 void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
 {
if (PG(http_globals)[TRACK_VARS_ENV] &&
-   array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
-   Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
-   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0) {
+   array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
+   Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
+   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0
+   ) {
zval_dtor(array_ptr);
*array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
INIT_PZVAL(array_ptr);
zval_copy_ctor(array_ptr);
return;
} else if (PG(http_globals)[TRACK_VARS_SERVER] &&
-  array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
-  Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
-  
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER])) > 0) {
+   array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
+   Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
+   
zend_hash_n

[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 22:08:55 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  ws + cs fixes
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.337&r2=1.338&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.337 php-src/sapi/cgi/cgi_main.c:1.338
--- php-src/sapi/cgi/cgi_main.c:1.337   Thu Sep 27 18:28:43 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Sep 27 22:08:54 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.337 2007/09/27 18:28:43 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.338 2007/09/27 22:08:54 jani Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -83,8 +83,7 @@
 #include "fastcgi.h"
 
 #ifndef PHP_WIN32
-/* XXX this will need to change later when threaded fastcgi is
-   implemented.  shane */
+/* XXX this will need to change later when threaded fastcgi is implemented.  
shane */
 struct sigaction act, old_term, old_quit, old_int;
 #endif
 
@@ -187,8 +186,8 @@
Bucket *f = *((Bucket **) a);
Bucket *s = *((Bucket **) b);
 
-   return strcasecmp(((zend_module_entry *)f->pData)->name,
- ((zend_module_entry 
*)s->pData)->name);
+   return strcasecmp(  ((zend_module_entry *)f->pData)->name,
+   ((zend_module_entry 
*)s->pData)->name);
 }
 
 static void print_modules(TSRMLS_D)
@@ -209,11 +208,10 @@
return 0;
 }
 
-static int extension_name_cmp(const zend_llist_element **f,
- const 
zend_llist_element **s TSRMLS_DC)
+static int extension_name_cmp(const zend_llist_element **f, const 
zend_llist_element **s TSRMLS_DC)
 {
-   return strcmp(((zend_extension *)(*f)->data)->name,
- ((zend_extension *)(*s)->data)->name);
+   return strcmp(  ((zend_extension *)(*f)->data)->name,
+   ((zend_extension *)(*s)->data)->name);
 }
 
 static void print_extensions(TSRMLS_D)
@@ -312,8 +310,7 @@
int len;
 
if (CGIG(rfc2616_headers) && SG(sapi_headers).http_status_line) 
{
-   len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH,
-  "%s\r\n", 
SG(sapi_headers).http_status_line);
+   len = snprintf(buf, SAPI_CGI_MAX_HEADER_LENGTH, 
"%s\r\n", SG(sapi_headers).http_status_line);
 
if (len > SAPI_CGI_MAX_HEADER_LENGTH) {
len = SAPI_CGI_MAX_HEADER_LENGTH;
@@ -323,9 +320,10 @@
char *s;
 
if (SG(sapi_headers).http_status_line &&
-   (s = strchr(SG(sapi_headers).http_status_line, ' 
')) != 0 &&
-   (s - SG(sapi_headers).http_status_line) >= 5 &&
-   strncasecmp(SG(sapi_headers).http_status_line, 
"HTTP/", 5) == 0) {
+   (s = strchr(SG(sapi_headers).http_status_line, 
' ')) != 0 &&
+   (s - SG(sapi_headers).http_status_line) >= 5 &&
+   strncasecmp(SG(sapi_headers).http_status_line, 
"HTTP/", 5) == 0
+   ) {
len = sprintf(buf, "Status:%s\r\n", s);
} else {
len = sprintf(buf, "Status: %d\r\n", 
SG(sapi_headers).http_response_code);
@@ -453,18 +451,20 @@
 void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
 {
if (PG(http_globals)[TRACK_VARS_ENV] &&
-   array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
-   Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
-   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0) {
+   array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
+   Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
+   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0
+   ) {
zval_dtor(array_ptr);
*array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
INIT_PZVAL(array_ptr);
zval_copy_ctor(array_ptr);
return;
} else if (PG(http_globals)[TRACK_VARS_SERVER] &&
-  array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
-  Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
-  
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER])) > 0) {
+   array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
+   Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
+   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER])) > 0
+   ) {
zval_dtor(array_ptr);
*array_ptr = *P

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

2007-09-27 Thread Sebastian Bergmann
sebastian   Thu Sep 27 18:15:22 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Fugbix typo.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.6&r2=1.2027.2.547.2.965.2.7&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.6 php-src/NEWS:1.2027.2.547.2.965.2.7
--- php-src/NEWS:1.2027.2.547.2.965.2.6 Thu Sep 27 18:00:36 2007
+++ php-src/NEWSThu Sep 27 18:15:22 2007
@@ -1,7 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
-- Improved memory usage by movig constants to read only memory. (Dmitry,Pierre)
+- Improved memory usage by moving constants to read only memory.
+  (Dmitry,Pierre)
 - Improved ext/soap to support element names in context of XMLShema's .
   (Dmitry)
 - Improved ext/openssl (Dmitry)

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



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

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 17:06:37 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.4&r2=1.2027.2.547.2.965.2.5&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.4 php-src/NEWS:1.2027.2.547.2.965.2.5
--- php-src/NEWS:1.2027.2.547.2.965.2.4 Thu Sep 27 10:01:43 2007
+++ php-src/NEWSThu Sep 27 17:06:36 2007
@@ -9,9 +9,13 @@
   . Added access to internal values of DSA, RSA and DH keys
 - Improved and cleaned CGI code. FastCGI is now always enabled and can not be
   disabled. See sapi/cgi/CHANGES for more details. (Dmitry)
+
 - Added support for dynamic access of static members using $foo::myFunc().
   (Etienne Kneuss)
 
+- Fixed bug #42657 (ini_get() returns incorrect value when default is NULL).
+  (Jani)
+
 30 Aug 2007, PHP 5.2.4
 - Removed --enable-versioning configure option. (Jani)
 

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



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

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 13:16:09 2007 UTC

  Modified files:  
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  MFB52: cs+ws (and synced the folding wrap style!)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.97&r2=1.98&diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.97 
php-src/ext/standard/ftp_fopen_wrapper.c:1.98
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.97   Fri Sep 21 12:57:23 2007
+++ php-src/ext/standard/ftp_fopen_wrapper.cThu Sep 27 13:16:09 2007
@@ -18,7 +18,7 @@
|  Sara Golemon <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.97 2007/09/21 12:57:23 tony2001 Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.98 2007/09/27 13:16:09 jani Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -69,8 +69,12 @@
 
 #include "php_fopen_wrappers.h"
 
+#define FTPS_ENCRYPT_DATA 1
+#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
 
-static inline int get_ftp_result(php_stream *stream, char *buffer, size_t 
buffer_size TSRMLS_DC) /* {{{ */
+/* {{{ get_ftp_result
+ */
+static inline int get_ftp_result(php_stream *stream, char *buffer, size_t 
buffer_size TSRMLS_DC)
 {
while (php_stream_gets(stream, ZSTR(buffer), buffer_size-1) &&
   !(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
@@ -78,11 +82,10 @@
return strtol(buffer, NULL, 10);
 }
 /* }}} */
-#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
 
-#define FTPS_ENCRYPT_DATA 1
-
-static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper, php_stream 
*stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */
+/* {{{ php_stream_ftp_stream_stat
+ */
+static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper, php_stream 
*stream, php_stream_statbuf *ssb TSRMLS_DC)
 {
/* For now, we return with a failure code to prevent the underlying
 * file's details from being used instead. */
@@ -90,7 +93,9 @@
 }
 /* }}} */
 
-static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper, php_stream 
*stream TSRMLS_DC) /* {{{ */
+/* {{{ php_stream_ftp_stream_close
+ */
+static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper, php_stream 
*stream TSRMLS_DC)
 {
php_stream *controlstream = (php_stream *)stream->wrapperdata;

@@ -561,7 +566,7 @@
php_url_free(resource);
return datastream;
 
- errexit:
+errexit:
if (resource) {
php_url_free(resource);
}
@@ -725,7 +730,7 @@
php_url_free(resource);
return php_stream_alloc(&php_ftp_dirstream_ops, datastream, 0, mode);
 
- opendir_errexit:
+opendir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -825,7 +830,7 @@
 #endif
} else {
/* error or unsupported command */
- mdtm_error:
+mdtm_error:
 #ifdef NETWARE
ssb->sb.st_mtime.tv_sec = -1;
 #else
@@ -857,7 +862,7 @@
php_url_free(resource);
return 0;
 
- stat_errexit:
+stat_errexit:
if (resource) {
php_url_free(resource);
}
@@ -907,7 +912,7 @@
php_stream_close(stream);
return 1;
 
- unlink_errexit:
+unlink_errexit:
if (resource) {
php_url_free(resource);
}
@@ -983,7 +988,7 @@
php_stream_close(stream);
return 1;
 
- rename_errexit:
+rename_errexit:
if (resource_from) {
php_url_free(resource_from);
}
@@ -1080,7 +1085,7 @@
 
return 1;
 
- mkdir_errexit:
+mkdir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -1130,7 +1135,7 @@
 
return 1;
 
- rmdir_errexit:
+rmdir_errexit:
if (resource) {
php_url_free(resource);
}

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard ftp_fopen_wrapper.c

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 13:15:40 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  MFB52: ws+cs
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.85.2.4.2.4&r2=1.85.2.4.2.4.2.1&diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4 
php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4.2.1
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4   Fri Sep 21 
12:57:38 2007
+++ php-src/ext/standard/ftp_fopen_wrapper.cThu Sep 27 13:15:40 2007
@@ -18,7 +18,7 @@
|  Sara Golemon <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.4 2007/09/21 12:57:38 tony2001 Exp $ 
*/
+/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.4.2.1 2007/09/27 13:15:40 jani Exp $ 
*/
 
 #include "php.h"
 #include "php_globals.h"
@@ -69,7 +69,11 @@
 
 #include "php_fopen_wrappers.h"
 
+#define FTPS_ENCRYPT_DATA 1
+#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
 
+/* {{{ get_ftp_result
+ */
 static inline int get_ftp_result(php_stream *stream, char *buffer, size_t 
buffer_size TSRMLS_DC)
 {
while (php_stream_gets(stream, buffer, buffer_size-1) &&
@@ -77,24 +81,21 @@
 isdigit((int) buffer[2]) && buffer[3] == ' '));
return strtol(buffer, NULL, 10);
 }
-#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
-
-#define FTPS_ENCRYPT_DATA 1
+/* }}} */
 
-static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper,
-   php_stream *stream,
-   php_stream_statbuf *ssb
-   TSRMLS_DC)
+/* {{{ php_stream_ftp_stream_stat
+ */
+static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper, php_stream 
*stream, php_stream_statbuf *ssb TSRMLS_DC)
 {
/* For now, we return with a failure code to prevent the underlying
 * file's details from being used instead. */
return -1;
 }
+/* }}} */
 
-
-static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper,
-   php_stream *stream
-   TSRMLS_DC)
+/* {{{ php_stream_ftp_stream_close
+ */
+static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper, php_stream 
*stream TSRMLS_DC)
 {
php_stream *controlstream = (php_stream *)stream->wrapperdata;

@@ -105,6 +106,7 @@
}
return 0;
 }
+/* }}} */
 
 /* {{{ php_ftp_fopen_connect
  */
@@ -564,7 +566,7 @@
php_url_free(resource);
return datastream;
 
- errexit:
+errexit:
if (resource) {
php_url_free(resource);
}
@@ -728,7 +730,7 @@
php_url_free(resource);
return php_stream_alloc(&php_ftp_dirstream_ops, datastream, 0, mode);
 
- opendir_errexit:
+opendir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -828,7 +830,7 @@
 #endif
} else {
/* error or unsupported command */
- mdtm_error:
+mdtm_error:
 #ifdef NETWARE
ssb->sb.st_mtime.tv_sec = -1;
 #else
@@ -860,7 +862,7 @@
php_url_free(resource);
return 0;
 
- stat_errexit:
+stat_errexit:
if (resource) {
php_url_free(resource);
}
@@ -910,7 +912,7 @@
php_stream_close(stream);
return 1;
 
- unlink_errexit:
+unlink_errexit:
if (resource) {
php_url_free(resource);
}
@@ -986,7 +988,7 @@
php_stream_close(stream);
return 1;
 
- rename_errexit:
+rename_errexit:
if (resource_from) {
php_url_free(resource_from);
}
@@ -1083,7 +1085,7 @@
 
return 1;
 
- mkdir_errexit:
+mkdir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -1133,7 +1135,7 @@
 
return 1;
 
- rmdir_errexit:
+rmdir_errexit:
if (resource) {
php_url_free(resource);
}

-- 
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/standard ftp_fopen_wrapper.c

2007-09-27 Thread Jani Taskinen
janiThu Sep 27 13:15:09 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  ws + cs fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.85.2.4.2.4&r2=1.85.2.4.2.5&diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4 
php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.5
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.85.2.4.2.4   Fri Sep 21 
12:57:38 2007
+++ php-src/ext/standard/ftp_fopen_wrapper.cThu Sep 27 13:15:09 2007
@@ -18,7 +18,7 @@
|  Sara Golemon <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.4 2007/09/21 12:57:38 tony2001 Exp $ 
*/
+/* $Id: ftp_fopen_wrapper.c,v 1.85.2.4.2.5 2007/09/27 13:15:09 jani Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -69,7 +69,11 @@
 
 #include "php_fopen_wrappers.h"
 
+#define FTPS_ENCRYPT_DATA 1
+#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
 
+/* {{{ get_ftp_result
+ */
 static inline int get_ftp_result(php_stream *stream, char *buffer, size_t 
buffer_size TSRMLS_DC)
 {
while (php_stream_gets(stream, buffer, buffer_size-1) &&
@@ -77,24 +81,21 @@
 isdigit((int) buffer[2]) && buffer[3] == ' '));
return strtol(buffer, NULL, 10);
 }
-#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, 
sizeof(tmp_line) TSRMLS_CC)
-
-#define FTPS_ENCRYPT_DATA 1
+/* }}} */
 
-static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper,
-   php_stream *stream,
-   php_stream_statbuf *ssb
-   TSRMLS_DC)
+/* {{{ php_stream_ftp_stream_stat
+ */
+static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper, php_stream 
*stream, php_stream_statbuf *ssb TSRMLS_DC)
 {
/* For now, we return with a failure code to prevent the underlying
 * file's details from being used instead. */
return -1;
 }
+/* }}} */
 
-
-static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper,
-   php_stream *stream
-   TSRMLS_DC)
+/* {{{ php_stream_ftp_stream_close
+ */
+static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper, php_stream 
*stream TSRMLS_DC)
 {
php_stream *controlstream = (php_stream *)stream->wrapperdata;

@@ -105,6 +106,7 @@
}
return 0;
 }
+/* }}} */
 
 /* {{{ php_ftp_fopen_connect
  */
@@ -564,7 +566,7 @@
php_url_free(resource);
return datastream;
 
- errexit:
+errexit:
if (resource) {
php_url_free(resource);
}
@@ -728,7 +730,7 @@
php_url_free(resource);
return php_stream_alloc(&php_ftp_dirstream_ops, datastream, 0, mode);
 
- opendir_errexit:
+opendir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -828,7 +830,7 @@
 #endif
} else {
/* error or unsupported command */
- mdtm_error:
+mdtm_error:
 #ifdef NETWARE
ssb->sb.st_mtime.tv_sec = -1;
 #else
@@ -860,7 +862,7 @@
php_url_free(resource);
return 0;
 
- stat_errexit:
+stat_errexit:
if (resource) {
php_url_free(resource);
}
@@ -910,7 +912,7 @@
php_stream_close(stream);
return 1;
 
- unlink_errexit:
+unlink_errexit:
if (resource) {
php_url_free(resource);
}
@@ -986,7 +988,7 @@
php_stream_close(stream);
return 1;
 
- rename_errexit:
+rename_errexit:
if (resource_from) {
php_url_free(resource_from);
}
@@ -1083,7 +1085,7 @@
 
return 1;
 
- mkdir_errexit:
+mkdir_errexit:
if (resource) {
php_url_free(resource);
}
@@ -1133,7 +1135,7 @@
 
return 1;
 
- rmdir_errexit:
+rmdir_errexit:
if (resource) {
php_url_free(resource);
}

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



[PHP-CVS] cvs: php-src /ext/soap php_encoding.c /ext/soap/tests any.phpt

2007-09-27 Thread Dmitry Stogov
dmitry  Thu Sep 27 10:02:04 2007 UTC

  Modified files:  
/php-src/ext/soap   php_encoding.c 
/php-src/ext/soap/tests any.phpt 
  Log:
  Improved ext/soap to support element names in context of XMLShema's 
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.162&r2=1.163&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.162 
php-src/ext/soap/php_encoding.c:1.163
--- php-src/ext/soap/php_encoding.c:1.162   Fri Aug 31 08:07:46 2007
+++ php-src/ext/soap/php_encoding.c Thu Sep 27 10:02:04 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.162 2007/08/31 08:07:46 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.163 2007/09/27 10:02:04 dmitry Exp $ */
 
 #include 
 
@@ -1182,44 +1182,84 @@
 static void model_to_zval_any(zval *ret, xmlNodePtr node TSRMLS_DC)
 {
zval* any = NULL;
+   char* name = NULL;
 
while (node != NULL) {
if (get_zval_property(ret, (char*)node->name TSRMLS_CC) == 
NULL) {
zval* val = master_to_zval(get_conversion(XSD_ANYXML), 
node);
-   if (get_attribute_ex(node->properties,"type", 
XSI_NAMESPACE) == NULL &&
-   (Z_TYPE_P(val) == IS_STRING || Z_TYPE_P(val) == 
IS_UNICODE)) {
-   while (node->next != NULL &&
-  get_zval_property(ret, 
(char*)node->next->name TSRMLS_CC) == NULL &&
-  
get_attribute_ex(node->next->properties,"type", XSI_NAMESPACE) == NULL) {
+   
+   if (any && Z_TYPE_P(any) != IS_ARRAY) {
+   /* Convert into array */
+   zval *arr;
+
+   MAKE_STD_ZVAL(arr);
+   array_init(arr);
+   if (name) {
+   add_rt_assoc_zval(arr, name, any);
+   } else {
+   add_next_index_zval(arr, any);
+   }
+   any = arr;
+   }
+
+   if ((Z_TYPE_P(val) == IS_STRING && *Z_STRVAL_P(val) == 
'<') ||
+   (Z_TYPE_P(val) == IS_UNICODE && 
*Z_USTRVAL_P(val) == '<')) {
+   name = NULL;
+   while (node->next != NULL) {
zval* val2 = 
master_to_zval(get_conversion(XSD_ANYXML), node->next);
-   if (Z_TYPE_P(val2) != IS_STRING && 
Z_TYPE_P(val2) != IS_UNICODE) {
+   if ((Z_TYPE_P(val2) != IS_STRING ||  
*Z_STRVAL_P(val) != '<') &&
+   (Z_TYPE_P(val2) != IS_UNICODE ||  
*Z_USTRVAL_P(val) != '<')) {
break;
}
add_string_to_string(val, val, val2);
zval_ptr_dtor(&val2);
node = node->next;
}
+   } else {
+   name = (char*)node->name;
}
+
if (any == NULL) {
-   any = val;
-   } else {
-   if (Z_TYPE_P(any) != IS_ARRAY) {
+   if (name) {
/* Convert into array */
zval *arr;
 
MAKE_STD_ZVAL(arr);
array_init(arr);
-   add_next_index_zval(arr, any);
+   add_rt_assoc_zval(arr, name, val);
any = arr;
+   name = NULL;
+   } else {
+   any = val;
}
+   } else {
/* Add array element */
-   add_next_index_zval(any, val);
+   if (name) {
+   zval **el;
+   if (zend_rt_hash_find(Z_ARRVAL_P(any), 
name, strlen(name)+1, (void**)&el) == SUCCESS) {
+   if (Z_TYPE_PP(el) != IS_ARRAY) {
+   /* Convert into array */
+   zval *arr;
+ 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/soap php_encoding.c /ext/soap/tests any.phpt

2007-09-27 Thread Dmitry Stogov
dmitry  Thu Sep 27 10:01:44 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/soap   php_encoding.c 
/php-src/ext/soap/tests any.phpt 
  Log:
  Improved ext/soap to support element names in context of XMLShema's 
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.3&r2=1.2027.2.547.2.965.2.4&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.3 php-src/NEWS:1.2027.2.547.2.965.2.4
--- php-src/NEWS:1.2027.2.547.2.965.2.3 Thu Sep 27 08:45:59 2007
+++ php-src/NEWSThu Sep 27 10:01:43 2007
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
+- Improved ext/soap to support element names in context of XMLShema's .
+  (Dmitry)
 - Improved ext/openssl (Dmitry)
   . Added support for OpenSSL digest functions
   . Added support for OpenSSL cipher functions
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.37&r2=1.103.2.21.2.37.2.1&diff_format=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.37 
php-src/ext/soap/php_encoding.c:1.103.2.21.2.37.2.1
--- php-src/ext/soap/php_encoding.c:1.103.2.21.2.37 Wed Sep  5 10:18:22 2007
+++ php-src/ext/soap/php_encoding.c Thu Sep 27 10:01:43 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov <[EMAIL PROTECTED]> |
   +--+
 */
-/* $Id: php_encoding.c,v 1.103.2.21.2.37 2007/09/05 10:18:22 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.103.2.21.2.37.2.1 2007/09/27 10:01:43 dmitry Exp $ 
*/
 
 #include 
 
@@ -1254,44 +1254,82 @@
 static void model_to_zval_any(zval *ret, xmlNodePtr node TSRMLS_DC)
 {
zval* any = NULL;
+   char* name = NULL;
 
while (node != NULL) {
if (get_zval_property(ret, (char*)node->name TSRMLS_CC) == 
NULL) {
zval* val = master_to_zval(get_conversion(XSD_ANYXML), 
node);
-   if (get_attribute_ex(node->properties,"type", 
XSI_NAMESPACE) == NULL &&
-   Z_TYPE_P(val) == IS_STRING) {
-   while (node->next != NULL &&
-  get_zval_property(ret, 
(char*)node->next->name TSRMLS_CC) == NULL &&
-  
get_attribute_ex(node->next->properties,"type", XSI_NAMESPACE) == NULL) {
+   
+   if (any && Z_TYPE_P(any) != IS_ARRAY) {
+   /* Convert into array */
+   zval *arr;
+
+   MAKE_STD_ZVAL(arr);
+   array_init(arr);
+   if (name) {
+   add_assoc_zval(arr, name, any);
+   } else {
+   add_next_index_zval(arr, any);
+   }
+   any = arr;
+   }
+
+   if (Z_TYPE_P(val) == IS_STRING && *Z_STRVAL_P(val) == 
'<') {
+   name = NULL;
+   while (node->next != NULL) {
zval* val2 = 
master_to_zval(get_conversion(XSD_ANYXML), node->next);
-   if (Z_TYPE_P(val2) != IS_STRING) {
+   if (Z_TYPE_P(val2) != IS_STRING ||  
*Z_STRVAL_P(val) != '<') {
break;
}
add_string_to_string(val, val, val2);
zval_ptr_dtor(&val2);
node = node->next;
}
+   } else {
+   name = (char*)node->name;
}
+
if (any == NULL) {
-   any = val;
-   } else {
-   if (Z_TYPE_P(any) != IS_ARRAY) {
+   if (name) {
/* Convert into array */
zval *arr;
 
MAKE_STD_ZVAL(arr);
array_init(arr);
-   add_next_index_zval(arr, any);
+   add_assoc_zval(arr, name, val);
any = arr;
+   name = NULL;
+   } else {
+   any = val;
}
+   } else

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

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:19:07 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/iconv  iconv.c 
  Log:
  MFH: fix coverity issue #412
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.20&r2=1.124.2.8.2.21&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.20 
php-src/ext/iconv/iconv.c:1.124.2.8.2.21
--- php-src/ext/iconv/iconv.c:1.124.2.8.2.20Fri Sep 21 13:37:30 2007
+++ php-src/ext/iconv/iconv.c   Thu Sep 27 09:19:06 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.124.2.8.2.20 2007/09/21 13:37:30 tony2001 Exp $ */
+/* $Id: iconv.c,v 1.124.2.8.2.21 2007/09/27 09:19:06 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2271,12 +2271,10 @@
}
 
if (header_name != NULL) {
-   zval **elem;
+   zval **elem, *new_elem;
 
if (zend_hash_find(Z_ARRVAL_P(return_value), 
header_name, header_name_len, (void **)&elem) == SUCCESS) {
if (Z_TYPE_PP(elem) != IS_ARRAY) {
-   zval *new_elem;
-
MAKE_STD_ZVAL(new_elem);
array_init(new_elem);
 

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/iconv iconv.c

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:18:50 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/iconv  iconv.c 
  Log:
  MFH: fix coverity issue #412
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.20&r2=1.124.2.8.2.20.2.1&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.20 
php-src/ext/iconv/iconv.c:1.124.2.8.2.20.2.1
--- php-src/ext/iconv/iconv.c:1.124.2.8.2.20Fri Sep 21 13:37:30 2007
+++ php-src/ext/iconv/iconv.c   Thu Sep 27 09:18:50 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.124.2.8.2.20 2007/09/21 13:37:30 tony2001 Exp $ */
+/* $Id: iconv.c,v 1.124.2.8.2.20.2.1 2007/09/27 09:18:50 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2271,12 +2271,10 @@
}
 
if (header_name != NULL) {
-   zval **elem;
+   zval **elem, *new_elem;
 
if (zend_hash_find(Z_ARRVAL_P(return_value), 
header_name, header_name_len, (void **)&elem) == SUCCESS) {
if (Z_TYPE_PP(elem) != IS_ARRAY) {
-   zval *new_elem;
-
MAKE_STD_ZVAL(new_elem);
array_init(new_elem);
 

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



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

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:18:36 2007 UTC

  Modified files:  
/php-src/ext/iconv  iconv.c 
  Log:
  fix coverity issue #412
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.157&r2=1.158&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.157 php-src/ext/iconv/iconv.c:1.158
--- php-src/ext/iconv/iconv.c:1.157 Fri Sep 21 13:41:02 2007
+++ php-src/ext/iconv/iconv.c   Thu Sep 27 09:18:36 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.157 2007/09/21 13:41:02 tony2001 Exp $ */
+/* $Id: iconv.c,v 1.158 2007/09/27 09:18:36 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2338,12 +2338,10 @@
}
 
if (header_name != NULL) {
-   zval **elem;
+   zval **elem, *new_elem;
 
if (zend_hash_find(Z_ARRVAL_P(return_value), 
header_name, header_name_len, (void **)&elem) == SUCCESS) {
if (Z_TYPE_PP(elem) != IS_ARRAY) {
-   zval *new_elem;
-
MAKE_STD_ZVAL(new_elem);
array_init(new_elem);
 

-- 
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/reflection php_reflection.c

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:15:20 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/reflection php_reflection.c 
  Log:
  MFH: fix coverity issue #411
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45&r2=1.164.2.33.2.46&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.46
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45 Mon Aug 20 
17:01:22 2007
+++ php-src/ext/reflection/php_reflection.c Thu Sep 27 09:15:20 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45 2007/08/20 17:01:22 sebastian Exp $ 
*/
+/* $Id: php_reflection.c,v 1.164.2.33.2.46 2007/09/27 09:15:20 tony2001 Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1992,7 +1992,7 @@
 {
reflection_object *intern;
parameter_reference *param;
-   zend_class_entry **pce;
+   zend_class_entry **pce, *ce;
 
METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
GET_REFLECTION_OBJECT_PTR(param);
@@ -2011,7 +2011,7 @@
 * lint-mode.
 */
if (0 == strncmp(param->arg_info->class_name, "self", 
sizeof("self")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'self' as type hint but 
function is not a class member!");
@@ -2019,7 +2019,7 @@
}
pce= &ce;
} else if (0 == strncmp(param->arg_info->class_name, "parent", 
sizeof("parent")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'parent' as type hint but 
function is not a class member!");
@@ -4903,7 +4903,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45 2007/08/20 17:01:22 sebastian Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.46 2007/09/27 09:15:20 tony2001 Exp $");
 
php_info_print_table_end();
 } /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection php_reflection.c

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:15:10 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/reflection php_reflection.c 
  Log:
  MFH: fix coverity issue #411
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45&r2=1.164.2.33.2.45.2.1&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.1
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45 Mon Aug 20 
17:01:22 2007
+++ php-src/ext/reflection/php_reflection.c Thu Sep 27 09:15:09 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45 2007/08/20 17:01:22 sebastian Exp $ 
*/
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.1 2007/09/27 09:15:09 tony2001 
Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1992,7 +1992,7 @@
 {
reflection_object *intern;
parameter_reference *param;
-   zend_class_entry **pce;
+   zend_class_entry **pce, *ce;
 
METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
GET_REFLECTION_OBJECT_PTR(param);
@@ -2011,7 +2011,7 @@
 * lint-mode.
 */
if (0 == strncmp(param->arg_info->class_name, "self", 
sizeof("self")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'self' as type hint but 
function is not a class member!");
@@ -2019,7 +2019,7 @@
}
pce= &ce;
} else if (0 == strncmp(param->arg_info->class_name, "parent", 
sizeof("parent")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'parent' as type hint but 
function is not a class member!");
@@ -4903,7 +4903,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45 2007/08/20 17:01:22 sebastian Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.1 2007/09/27 09:15:09 tony2001 Exp $");
 
php_info_print_table_end();
 } /* }}} */

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



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

2007-09-27 Thread Antony Dovgal
tony2001Thu Sep 27 09:14:56 2007 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  fix coverity issue #411
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.283&r2=1.284&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.283 
php-src/ext/reflection/php_reflection.c:1.284
--- php-src/ext/reflection/php_reflection.c:1.283   Tue Sep 11 11:16:46 2007
+++ php-src/ext/reflection/php_reflection.c Thu Sep 27 09:14:56 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.283 2007/09/11 11:16:46 dmitry Exp $ */
+/* $Id: php_reflection.c,v 1.284 2007/09/27 09:14:56 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2018,7 +2018,7 @@
 {
reflection_object *intern;
parameter_reference *param;
-   zend_class_entry **pce;
+   zend_class_entry **pce, *ce;
 
METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0);
GET_REFLECTION_OBJECT_PTR(param);
@@ -2038,7 +2038,7 @@
 * lint-mode.
 */
if (ZEND_U_EQUAL(ZEND_STR_TYPE, param->arg_info->class_name, 
param->arg_info->class_name_len, "self", sizeof("self")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'self' as type hint but 
function is not a class member!");
@@ -2046,7 +2046,7 @@
}
pce= &ce;
} else if (ZEND_U_EQUAL(ZEND_STR_TYPE, 
param->arg_info->class_name,  param->arg_info->class_name_len, "parent", 
sizeof("parent")- 1)) {
-   zend_class_entry *ce= param->fptr->common.scope;
+   ce = param->fptr->common.scope;
if (!ce) {
   zend_throw_exception_ex(reflection_exception_ptr, 0 
TSRMLS_CC, 
   "Parameter uses 'parent' as type hint but 
function is not a class member!");
@@ -5022,7 +5022,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
 
-   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.283 
2007/09/11 11:16:46 dmitry Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.284 
2007/09/27 09:14:56 tony2001 Exp $");
 
php_info_print_table_end();
 } /* }}} */

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



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

2007-09-27 Thread Dmitry Stogov
dmitry  Thu Sep 27 08:46:00 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
/php-src/ext/opensslopenssl.c 
  Log:
  MFH: Improved ext/openssl
  . Added support for OpenSSL digest functions
  . Added support for OpenSSL cipher functions
  . Added access to internal values of DSA, RSA and DH keys
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.2&r2=1.2027.2.547.2.965.2.3&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.2 php-src/NEWS:1.2027.2.547.2.965.2.3
--- php-src/NEWS:1.2027.2.547.2.965.2.2 Thu Sep 27 08:23:58 2007
+++ php-src/NEWSThu Sep 27 08:45:59 2007
@@ -1,6 +1,10 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
+- Improved ext/openssl (Dmitry)
+  . Added support for OpenSSL digest functions
+  . Added support for OpenSSL cipher functions
+  . Added access to internal values of DSA, RSA and DH keys
 - Improved and cleaned CGI code. FastCGI is now always enabled and can not be
   disabled. See sapi/cgi/CHANGES for more details. (Dmitry)
 - Added support for dynamic access of static members using $foo::myFunc().
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.41&r2=1.98.2.5.2.41.2.1&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.41 
php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.1
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.41 Wed Aug  8 06:29:46 2007
+++ php-src/ext/openssl/openssl.c   Thu Sep 27 08:46:00 2007
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.41 2007/08/08 06:29:46 pajoye Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.41.2.1 2007/09/27 08:46:00 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -33,6 +33,8 @@
 #include "ext/standard/file.h"
 #include "ext/standard/info.h"
 #include "ext/standard/php_fopen_wrappers.h"
+#include "ext/standard/md5.h"
+#include "ext/standard/base64.h"
 
 /* OpenSSL includes */
 #include 
@@ -88,6 +90,15 @@
PHP_OPENSSL_CIPHER_DEFAULT = PHP_OPENSSL_CIPHER_RC2_40
 };
 
+PHP_FUNCTION(openssl_get_md_methods);
+PHP_FUNCTION(openssl_get_cipher_methods);
+
+PHP_FUNCTION(openssl_digest);
+PHP_FUNCTION(openssl_encrypt);
+PHP_FUNCTION(openssl_decrypt);
+
+PHP_FUNCTION(openssl_dh_compute_key);
+
 /* {{{ openssl_functions[]
  */
 zend_function_entry openssl_functions[] = {
@@ -126,10 +137,13 @@
PHP_FE(openssl_csr_get_subject, NULL)
PHP_FE(openssl_csr_get_public_key,  NULL)
 
-   PHP_FE(openssl_sign,second_arg_force_ref)
-   PHP_FE(openssl_verify,  NULL)
-   PHP_FE(openssl_seal,arg2and3_force_ref)
-   PHP_FE(openssl_open,second_arg_force_ref)
+   PHP_FE(openssl_digest,  NULL)
+   PHP_FE(openssl_encrypt, NULL)
+   PHP_FE(openssl_decrypt, NULL)
+   PHP_FE(openssl_sign,second_arg_force_ref)
+   PHP_FE(openssl_verify,  NULL)
+   PHP_FE(openssl_seal,arg2and3_force_ref)
+   PHP_FE(openssl_open,second_arg_force_ref)
 
 /* for S/MIME handling */
PHP_FE(openssl_pkcs7_verify,NULL)
@@ -142,6 +156,11 @@
PHP_FE(openssl_public_encrypt,  second_arg_force_ref)
PHP_FE(openssl_public_decrypt,  second_arg_force_ref)
 
+   PHP_FE(openssl_get_md_methods,  NULL)
+   PHP_FE(openssl_get_cipher_methods,  NULL)
+
+   PHP_FE(openssl_dh_compute_key,  NULL)
+
PHP_FE(openssl_error_string, NULL)
{NULL, NULL, NULL}
 };
@@ -645,6 +664,34 @@
return mdtype;
 }
 /* }}} */
+
+static const EVP_CIPHER * php_openssl_get_evp_cipher_from_algo(long algo) { /* 
{{{ */
+   switch (algo) {
+#ifndef OPENSSL_NO_RC2
+   case PHP_OPENSSL_CIPHER_RC2_40:
+   return EVP_rc2_40_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_RC2_64:
+   return EVP_rc2_64_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_RC2_128:
+   return EVP_rc2_cbc();
+   break;
+#endif
+
+#ifndef OPENSSL_NO_DES
+   case PHP_OPENSSL_CIPHER_DES:
+   return EVP_des_cbc();
+   break;
+   case PHP_OPENSSL_CIPHER_3DES:
+   return EVP_des_ede3_cbc();
+   break;
+#endif
+   default:
+   return NULL;
+   break;
+   }
+}
 /* }}} */
 
 /* {{{ PHP_MINIT_FUNCTION
@@ -2433,6 +2480,25 @@
}
 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /sapi/cgi CHANGES cgi_main.c config.w32 config9.m4

2007-09-27 Thread Dmitry Stogov
dmitry  Thu Sep 27 08:23:59 2007 UTC

  Added files: (Branch: PHP_5_3)
/php-src/sapi/cgi   CHANGES 

  Modified files:  
/php-srcNEWS 
/php-src/sapi/cgi   cgi_main.c config.w32 config9.m4 
  Log:
  MFH: Improved and cleaned CGI code. FastCGI is now always enabled and can not 
be disabled. See sapi/cgi/CHANGES for more details.
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.1&r2=1.2027.2.547.2.965.2.2&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.1 php-src/NEWS:1.2027.2.547.2.965.2.2
--- php-src/NEWS:1.2027.2.547.2.965.2.1 Thu Sep 27 00:32:40 2007
+++ php-src/NEWSThu Sep 27 08:23:58 2007
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
+- Improved and cleaned CGI code. FastCGI is now always enabled and can not be
+  disabled. See sapi/cgi/CHANGES for more details. (Dmitry)
 - Added support for dynamic access of static members using $foo::myFunc().
   (Etienne Kneuss)
 
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50&r2=1.267.2.15.2.50.2.1&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50.2.1
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.50 Mon Sep 24 11:40:05 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Sep 27 08:23:58 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.50 2007/09/24 11:40:05 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.50.2.1 2007/09/27 08:23:58 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -80,7 +80,6 @@
 
 #include "php_getopt.h"
 
-#if PHP_FASTCGI
 #include "fastcgi.h"
 
 #ifndef PHP_WIN32
@@ -109,8 +108,6 @@
 static pid_t pgroup;
 #endif
 
-#endif
-
 #define PHP_MODE_STANDARD  1
 #define PHP_MODE_HIGHLIGHT 2
 #define PHP_MODE_INDENT3
@@ -148,18 +145,13 @@
zend_bool rfc2616_headers;
zend_bool nph;
zend_bool check_shebang_line;
-#if ENABLE_PATHINFO_CHECK
zend_bool fix_pathinfo;
-#endif
-#if FORCE_CGI_REDIRECT
zend_bool force_redirect;
-   char *redirect_status_env;
-#endif
-#if PHP_FASTCGI
+   zend_bool discard_path;
zend_bool fcgi_logging;
-# ifdef PHP_WIN32
+   char *redirect_status_env;
+#ifdef PHP_WIN32
zend_bool impersonate;
-# endif
 #endif
 } php_cgi_globals_struct;
 
@@ -246,7 +238,6 @@
size_t ret;
 #endif
 
-#if PHP_FASTCGI
if (fcgi_is_fastcgi()) {
fcgi_request *request = (fcgi_request*) SG(server_context);
long ret = fcgi_write(request, FCGI_STDOUT, str, str_length);
@@ -255,7 +246,7 @@
}
return ret;
}
-#endif
+
 #ifdef PHP_WRITE_STDOUT
ret = write(STDOUT_FILENO, str, str_length);
if (ret <= 0) return 0;
@@ -288,19 +279,17 @@
 
 static void sapi_cgibin_flush(void *server_context)
 {
-#if PHP_FASTCGI
if (fcgi_is_fastcgi()) {
fcgi_request *request = (fcgi_request*) server_context;
if (
 #ifndef PHP_WIN32
-   !parent && 
+   !parent &&
 #endif
request && !fcgi_flush(request, 0)) {
php_handle_aborted_connection();
}
return;
}
-#endif
if (fflush(stdout) == EOF) {
php_handle_aborted_connection();
}
@@ -367,17 +356,12 @@
 
count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - 
SG(read_post_bytes));
while (read_bytes < count_bytes) {
-#if PHP_FASTCGI
if (fcgi_is_fastcgi()) {
fcgi_request *request = (fcgi_request*) 
SG(server_context);
tmp_read_bytes = fcgi_read(request, buffer + 
read_bytes, count_bytes - read_bytes);
} else {
tmp_read_bytes = read(0, buffer + read_bytes, 
count_bytes - read_bytes);
}
-#else
-   tmp_read_bytes = read(0, buffer + read_bytes, count_bytes - 
read_bytes);
-#endif
-
if (tmp_read_bytes <= 0) {
break;
}
@@ -388,7 +372,6 @@
 
 static char *sapi_cgibin_getenv(char *name, size_t name_len TSRMLS_DC)
 {
-#if PHP_FASTCGI
/* when php is started by mod_fastcgi, no regular environment
   is provided to PHP.  It is always sent to PHP at the start
   of a request.  So we have to do our own lookup to get env
@@ -397,7 +380,6 @@
fcgi_request *request = (fcgi_request*) SG(server_context);
return fcgi_getenv(request, name, name_len);
}
-#endif
/*  if cgi, or fastcgi and not found in fcgi env
check the regular env

[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2007-09-27 Thread Dmitry Stogov
dmitry  Thu Sep 27 07:29:58 2007 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  ws
  
  http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.335&r2=1.336&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.335 php-src/sapi/cgi/cgi_main.c:1.336
--- php-src/sapi/cgi/cgi_main.c:1.335   Mon Sep 24 11:43:02 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Sep 27 07:29:58 2007
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.335 2007/09/24 11:43:02 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.336 2007/09/27 07:29:58 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -148,8 +148,8 @@
zend_bool fix_pathinfo;
zend_bool force_redirect;
zend_bool discard_path;
-   char *redirect_status_env;
zend_bool fcgi_logging;
+   char *redirect_status_env;
 #ifdef PHP_WIN32
zend_bool impersonate;
 #endif
@@ -283,7 +283,7 @@
fcgi_request *request = (fcgi_request*) server_context;
if (
 #ifndef PHP_WIN32
-   !parent && 
+   !parent &&
 #endif
request && !fcgi_flush(request, 0)) {
php_handle_aborted_connection();
@@ -420,7 +420,7 @@
 
 #if !HAVE_SETENV || !HAVE_UNSETENV
/*  if cgi, or fastcgi and not found in fcgi env
-   check the regular environment 
+   check the regular environment
this leaks, but it's only cgi anyway, we'll fix
it for 5.0
*/
@@ -457,19 +457,19 @@
Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&

zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0) {
zval_dtor(array_ptr);
-   *array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
-   INIT_PZVAL(array_ptr);
-   zval_copy_ctor(array_ptr);
-   return;
+   *array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
+   INIT_PZVAL(array_ptr);
+   zval_copy_ctor(array_ptr);
+   return;
} else if (PG(http_globals)[TRACK_VARS_SERVER] &&
-   array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
-   Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
-   
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER])) > 0) {
+  array_ptr != PG(http_globals)[TRACK_VARS_SERVER] &&
+  Z_TYPE_P(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
+  
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER])) > 0) {
zval_dtor(array_ptr);
-   *array_ptr = *PG(http_globals)[TRACK_VARS_SERVER];
-   INIT_PZVAL(array_ptr);
-   zval_copy_ctor(array_ptr);
-   return;
+   *array_ptr = *PG(http_globals)[TRACK_VARS_SERVER];
+   INIT_PZVAL(array_ptr);
+   zval_copy_ctor(array_ptr);
+   return;
}
 
/* call php's original import as a catch-all */
@@ -511,7 +511,7 @@
unsigned int script_name_len = script_name ? 
strlen(script_name) : 0;
char *path_info = sapi_cgibin_getenv("PATH_INFO", 
sizeof("PATH_INFO")-1 TSRMLS_CC);
unsigned int path_info_len = path_info ? strlen(path_info) : 0;
-   
+
php_self_len = script_name_len + path_info_len;
php_self = emalloc(php_self_len + 1);
 
@@ -542,9 +542,9 @@
 
if (fcgi_is_fastcgi() && CGIG(fcgi_logging)) {
fcgi_request *request;
-   
+
request = (fcgi_request*) SG(server_context);
-   if (request) {  
+   if (request) {
int len = strlen(message);
char *buf = malloc(len+2);
 
@@ -565,7 +565,7 @@
 {
/* flush only when SAPI was started. The reasons are:
1. SAPI Deactivate is called from two places: module init and 
request shutdown
-   2. When the first call occurs and the request is not set up, 
flush fails on 
+   2. When the first call occurs and the request is not set up, 
flush fails on
FastCGI.
*/
if (SG(sapi_started)) {
@@ -672,14 +672,14 @@
   for:
 
   PATH_INFO
-   derived from the portion of the URI path following 
+   derived from the portion of the URI path following
the script name but preceding any query data
may be empty
 
   PATH_TRANSLATED
-derived by taking any path-info component of the 
-   request URI and performing any virtual-to-physical 
-   translation appropriate to map it onto the server's 
+derived by taking any path-info component of the
+   request URI and performing any virtual-to-physical
+   translation appropriate to map it onto the se