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

2009-05-13 Thread changelog
changelog   Thu May 14 01:32:47 2009 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3402r2=1.3403diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3402 php-src/ChangeLog:1.3403
--- php-src/ChangeLog:1.3402Wed May 13 01:32:42 2009
+++ php-src/ChangeLog   Thu May 14 01:32:45 2009
@@ -1,3 +1,93 @@
+2009-05-13  Greg Beaver  g...@chiaraquartet.net
+
+* ext/phar/phar.c
+  ext/phar/phar_internal.h
+  ext/phar/tar.c
+  ext/phar/tests/tar/require_hash.phpt
+  ext/phar/tests/tar/files/Net_URL-1.0.15.tgz:
+  MFB: fix Bug #48257: PharData throws exception with non-phar tar
+
+* (PHP_5_3)
+  NEWS
+  ext/phar/phar.c
+  ext/phar/phar_internal.h
+  ext/phar/tar.c
+  ext/phar/tests/tar/require_hash.phpt
+  ext/phar/tests/tar/tar_nohash.phpt
+  ext/phar/tests/tar/tar_nohash.phpt
+  ext/phar/tests/tar/files/Net_URL-1.0.15.tgz
+  ext/phar/tests/tar/files/Net_URL-1.0.15.tgz:
+  fix Bug #48257: PharData throws exception with non-phar tar
+
+2009-05-13  Jani Taskinen  jani.taski...@sci.fi
+
+* (PHP_5_3)
+  ZendEngine2/zend.c
+  build/order_by_dep.awk
+  ext/date/config.m4
+  ext/date/config0.m4
+  ext/date/php_date.c:
+  MFH: Fixed module loading order and made request shutdown functions also 
to
+   be loaded in reverse like all other shutdowns are.
+
+2009-05-13  Kalle Sommer Nielsen  kalle@gmail.com
+
+* (PHP_5_3)
+  ext/standard/uuencode.c:
+  MFH: Fix compiler warnings, safe_emalloc expects size_t, not double as 
ceil
+  returns
+
+* ext/standard/uuencode.c:
+  Fix compiler warnings, safe_emalloc expects size_t, not double as ceil
+  returns
+
+* ext/phar/func_interceptors.c:
+  Nuke compiler warning
+
+2009-05-13  Ilia Alshanetsky  i...@prohost.org
+
+* (PHP_5_2)
+  NEWS
+  ext/xmlrpc/xmlrpc-epi-php.c:
+  
+  MFB: Fixed bug #44996 (xmlrpc_decode() ignores time zone on
+  iso8601.datetime).
+
+* ext/xmlrpc/xmlrpc-epi-php.c:
+  
+  MFB: Fixed bug #44996 (xmlrpc_decode() ignores time zone on
+  iso8601.datetime)
+
+* (PHP_5_3)
+  ext/xmlrpc/xmlrpc-epi-php.c:
+  Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime)
+
+2009-05-13  Felipe Pena  felipe...@gmail.com
+
+* (PHP_5_2)
+  NEWS
+  ext/dba/dba_db4.c
+  ext/dba/dba_db4.c
+  ext/dba/tests/bug48240.phpt
+  ext/dba/tests/bug48240.phpt:
+  - MFH: Fixed bug #48240 (DBA Segmentation fault dba_nextkey)
+
+* ext/dba/dba_db4.c
+  ext/dba/tests/bug48240.phpt
+  ext/dba/tests/bug48240.phpt
+  ext/dba/tests/bug48240.phpt:
+  - Fixed bug #48240 (DBA Segmentation fault dba_nextkey)
+
+2009-05-13  Jani Taskinen  jani.taski...@sci.fi
+
+* ZendEngine2/zend.c
+  build/order_by_dep.awk
+  ext/date/config.m4
+  ext/date/config0.m4
+  ext/date/config0.m4
+  ext/date/php_date.c:
+  - Fixed bug #48247 (PHP crashes on errors during startup)
+
 2009-05-12  Matteo Beccati  mat...@beccati.com
 
 * (PHP_5_3)
@@ -39365,7 +39455,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3402 2009/05/13 01:32:42 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3403 2009/05/14 01:32:45 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2009-05-13 Thread changelog
changelog   Thu May 14 01:32:51 2009 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1483r2=1.1484diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1483 ZendEngine2/ChangeLog:1.1484
--- ZendEngine2/ChangeLog:1.1483Wed May 13 01:32:51 2009
+++ ZendEngine2/ChangeLog   Thu May 14 01:32:51 2009
@@ -1,3 +1,13 @@
+2009-05-13  Jani Taskinen  jani.taski...@sci.fi
+
+* (PHP_5_3)
+  zend.c:
+  MFH: Fixed module loading order and made request shutdown functions also 
to
+   be loaded in reverse like all other shutdowns are.
+
+* zend.c:
+  - Fixed bug #48247 (PHP crashes on errors during startup)
+
 2009-05-12  Felipe Pena  felipe...@gmail.com
 
 * (PHP_5_2)
@@ -28644,7 +28654,7 @@
 2003-06-10  Jani Taskinen  sni...@iki.fi
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1483 2009/05/13 01:32:51 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1484 2009/05/14 01:32:51 changelog Exp $ tag
 
 2003-06-10  James Cox  ja...@imajes.info
 
@@ -30368,7 +30378,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1483 2009/05/13 01:32:51 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1484 2009/05/14 01:32:51 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  i...@prohost.org
 




Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Dmitry Stogov

Hi Jani,

Unfortunately this patch doesn't fix the bug.
I'm not sure if it fixes module dependency issues (let me know how to 
check it), but the original bug has the same two problems.


1) Possible infinity recursion in php_log_err()

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() so 
any error messages befor this may crash PHP.


To test it I just inserted a warning message into main.c around line 
2130, right before module_initialized assignment.


+   zend_error(E_WARNING, test);
module_initialized = 1;

Then run something like this

$ sapi/cli/php -n -ddate.timezone= -derror_log=/tmp/php.log -r 'echo 
ok\n;'
/home/dmitry/php/php6/Zend/zend_hash.c(91) : Bailed out without a 
bailout address!


It may bailout or crash.

Thanks. Dmitry.







Jani Taskinen wrote:

janiWed May 13 00:45:57 2009 UTC

  Added files: 
/php-src/ext/date	config0.m4 

  Removed files:   
/php-src/ext/date	config.m4 

  Modified files:  
/ZendEngine2	zend.c 
/php-src/build	order_by_dep.awk 
/php-src/ext/date	php_date.c 
  Log:

  - Fixed bug #48247 (PHP crashes on errors during startup)
  # 
  # This was sum of many little things:
  # 1. Wrong assumption made in order_by_dep.awk on the ordering 
  #(that script was done prior to adding runtime deps..?)

  # 2. request shutdown calls weren't done in reverse order like all other
  #shutdown funcs are called.
  # 3. config0.m4 rename is necessary for keeping things simple.
  #
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.432r2=1.433diff_format=u

Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.432 ZendEngine2/zend.c:1.433
--- ZendEngine2/zend.c:1.432Thu Mar 26 20:01:37 2009
+++ ZendEngine2/zend.c  Wed May 13 00:45:57 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.c,v 1.432 2009/03/26 20:01:37 felipe Exp $ */

+/* $Id: zend.c,v 1.433 2009/05/13 00:45:57 jani Exp $ */
 
 #include zend.h

 #include zend_extensions.h
@@ -1418,7 +1418,7 @@
EG(opline_ptr) = NULL; /* we're no longer executing anything */
 
 	zend_try {

-   zend_hash_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
+   zend_hash_reverse_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1r2=1.2diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1 php-src/build/order_by_dep.awk:1.2
--- php-src/build/order_by_dep.awk:1.1  Sun Jul 18 12:03:51 2004
+++ php-src/build/order_by_dep.awk  Wed May 13 00:45:57 2009
@@ -79,8 +79,7 @@
out_count = 0;

while (count(mods)) {
-   # count down, since we need to assemble it in reverse order
-   for (i = mod_count-1; i = 0; --i) {
+   for (i = 0; i = mod_count; i++) {
if (i in mods) {
do_deps(i);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.230r2=1.231diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.230 php-src/ext/date/php_date.c:1.231
--- php-src/ext/date/php_date.c:1.230   Tue May  5 12:34:03 2009
+++ php-src/ext/date/php_date.c Wed May 13 00:45:57 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.230 2009/05/05 12:34:03 iliaa Exp $ */

+/* $Id: php_date.c,v 1.231 2009/05/13 00:45:57 jani Exp $ */
 
 #define _ISOC9X_SOURCE
 
@@ -570,17 +570,11 @@

 zval *date_interval_read_property(zval *object, zval *member, int type 
TSRMLS_DC);
 void date_interval_write_property(zval *object, zval *member, zval *value 
TSRMLS_DC);
 
-/* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ 
-static const zend_module_dep date_deps[] = {

-   ZEND_MOD_OPTIONAL(session)
-   {NULL, NULL, NULL}
-};
-
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
-   date_deps,
+   NULL,
date, /* extension name */
date_functions, /* function list */
PHP_MINIT(date),/* process startup */

http://cvs.php.net/viewvc.cgi/php-src/ext/date/config0.m4?view=markuprev=1.1
Index: php-src/ext/date/config0.m4
+++ php-src/ext/date/config0.m4
dnl $Id: config0.m4,v 1.1 2009/05/13 00:45:57 jani Exp $
dnl config.m4 for date extension

sinclude(ext/date/lib/timelib.m4)
sinclude(lib/timelib.m4)

PHP_DATE_CFLAGS=-...@ext_builddir@/lib
timelib_sources=lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 
 lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Stanislav Malyshev

Hi!

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() so 
any error messages befor this may crash PHP.


This isn't the first time we see extension being used before 
initialization. Maybe we need some infrastructure to prevent that.

--
Stanislav Malyshev, Zend Software Architect
s...@zend.com   http://www.zend.com/
(408)253-8829   MSN: s...@zend.com

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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Derick Rethans
On Wed, 13 May 2009, Stanislav Malyshev wrote:

  2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() so any
  error messages befor this may crash PHP.
 
 This isn't the first time we see extension being used before initialization.
 Maybe we need some infrastructure to prevent that.

In this case, I don't see why I can't init the tzcache in MINIT() 
though. But would that solve things?

regards,
Derick

-- 
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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Dmitry Stogov



Derick Rethans wrote:

On Wed, 13 May 2009, Stanislav Malyshev wrote:


2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() so any
error messages befor this may crash PHP.

This isn't the first time we see extension being used before initialization.
Maybe we need some infrastructure to prevent that.


In this case, I don't see why I can't init the tzcache in MINIT() 
though. But would that solve things?


Not in general, but it'll fix error logging for all extensions 
initialized after ext/date.


Thanks. Dmitry.


regards,
Derick



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



[PHP-CVS] cvs: phpruntests /tests/configuration rtRuntestsConfigurationTest.php

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 10:02:49 2009 UTC

  Modified files:  
/phpruntests/tests/configurationrtRuntestsConfigurationTest.php 
  Log:
  fixing stupidity in check
  
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtRuntestsConfigurationTest.php?r1=1.5r2=1.6diff_format=u
Index: phpruntests/tests/configuration/rtRuntestsConfigurationTest.php
diff -u phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.5 
phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.6
--- phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.5 Wed May 
13 01:36:14 2009
+++ phpruntests/tests/configuration/rtRuntestsConfigurationTest.php Wed May 
13 10:02:48 2009
@@ -17,7 +17,7 @@
 
 $testFiles = $config-getSetting('TestFiles');
 
-$this-assertEquals('/usr/local/bin/php', 
$config-getSetting('PhpExecutable'));
+$this-assertEquals($this-php, $config-getSetting('PhpExecutable'));
 $this-assertEquals('test.phpt', $testFiles[0]);
 }  
 
@@ -28,7 +28,7 @@
 
 $testFiles = $config-getSetting('TestFiles');
 
-$this-assertEquals('/usr/local/bin/php', 
$config-getSetting('PhpExecutable'));
+$this-assertEquals($this-php, $config-getSetting('PhpExecutable'));
 $this-assertEquals('test.phpt', $testFiles[0]);
 } 
 }



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



[PHP-CVS] cvs: phpruntests /tests/testcase rtTestConfigurationTest.php

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 10:04:43 2009 UTC

  Modified files:  
/phpruntests/tests/testcase rtTestConfigurationTest.php 
  Log:
  fixing stupidity in check
  
http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestConfigurationTest.php?r1=1.6r2=1.7diff_format=u
Index: phpruntests/tests/testcase/rtTestConfigurationTest.php
diff -u phpruntests/tests/testcase/rtTestConfigurationTest.php:1.6 
phpruntests/tests/testcase/rtTestConfigurationTest.php:1.7
--- phpruntests/tests/testcase/rtTestConfigurationTest.php:1.6  Wed May 13 
01:48:53 2009
+++ phpruntests/tests/testcase/rtTestConfigurationTest.php  Wed May 13 
10:04:42 2009
@@ -72,7 +72,7 @@
 $testConfiguration = new rtTestConfiguration($config, $this-sections, 
array(),$this-sections['FILE']);
 $phpExe = $testConfiguration-getPhpExecutable();
 
-$this-assertEquals('/usr/local/bin/php', $phpExe);
+$this-assertEquals($this-php, $phpExe);
 }
 
 public function testPHPCgiExecutable()



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



[PHP-CVS] cvs: phpruntests /src/configuration rtRuntestsConfiguration.php

2009-05-13 Thread Stefan Priebsch
spriebsch   Wed May 13 11:08:32 2009 UTC

  Modified files:  
/phpruntests/src/configuration  rtRuntestsConfiguration.php 
  Log:
  Moved factory method for better readability.
  
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtRuntestsConfiguration.php?r1=1.8r2=1.9diff_format=u
Index: phpruntests/src/configuration/rtRuntestsConfiguration.php
diff -u phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8 
phpruntests/src/configuration/rtRuntestsConfiguration.php:1.9
--- phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8   Wed May 
13 01:36:57 2009
+++ phpruntests/src/configuration/rtRuntestsConfiguration.php   Wed May 13 
11:08:32 2009
@@ -46,6 +46,20 @@
 'PhpCommandLineArguments' = 'rtPhpCommandLineArgSetting',
 );
 
+/**
+ * Factory: returns rtRuntestsConfiguration subclass for the given os.
+ *
+ * @returns rtEnvironment
+ */
+static public function getInstance ($commandLineArgs, $os = 'Unix')
+{
+if ($os == 'Windows') {
+return new rtWinConfiguration($commandLineArgs);
+} else {
+return new rtUnixConfiguration($commandLineArgs);
+}
+}
+
 protected function init()
 {
 //parse command line
@@ -58,7 +72,7 @@
 }
 
 /**
- * @todo spriebsch: is configure() the right name for this method, it 
checks preconditions?
+ *
  */
 public function configure()
 {
@@ -71,28 +85,6 @@
 $object = new $className($this);
 $this-settings[$name] = $object-get();
 }
-   //1 var_dump($this-settings);
-
-//check configuration preconditions
-$preConditionList = rtPreConditionList::getInstance();
-
-// $preConditionList-check($this-commandLine, 
$this-environmentVariables);
-
-$preConditionList-check($this);
-}
-
-/**
- * Factory: returns rtRuntestsConfiguration subclass for the given os.
- *
- * @returns rtEnvironment
- */
-static public function getInstance ($commandLineArgs, $os = 'Unix')
-{
-if ($os == 'Windows') {
-return new rtWinConfiguration($commandLineArgs);
-} else {
-return new rtUnixConfiguration($commandLineArgs);
-}
 }
 
 /**



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



[PHP-CVS] cvs: phpruntests /src/configuration rtPreConditionList.php /tests/configuration rtPreconditionListTest.php

2009-05-13 Thread Stefan Priebsch
spriebsch   Wed May 13 11:10:55 2009 UTC

  Modified files:  
/phpruntests/src/configuration  rtPreConditionList.php 
/phpruntests/tests/configurationrtPreconditionListTest.php 
  Log:
  Fixed test and removed obsolete code from rtPreConditionList.
  
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtPreConditionList.php?r1=1.4r2=1.5diff_format=u
Index: phpruntests/src/configuration/rtPreConditionList.php
diff -u phpruntests/src/configuration/rtPreConditionList.php:1.4 
phpruntests/src/configuration/rtPreConditionList.php:1.5
--- phpruntests/src/configuration/rtPreConditionList.php:1.4Wed May  6 
20:45:42 2009
+++ phpruntests/src/configuration/rtPreConditionList.phpWed May 13 
11:10:54 2009
@@ -25,7 +25,7 @@
 static public function getInstance($os = 'Unix')
 {
 if ($os == 'Windows') {
-return new rtWinPreconditionList('Windows');
+return new rtWinPreConditionList();
 } else {
 return new rtUnixPreConditionList();
 }
@@ -37,34 +37,19 @@
  * @param rtCommandLineOptions $commandLine
  * @param rtEnvironmentVariables $environmentVariables
  * @return boolean
+ * @todo modify to check all preconditions, and return a list of failed 
ones
  */
 public function check(rtRuntestsConfiguration $config)
 {
 foreach ($this-preConditions as $preCon) {
 $p = new $preCon;
 
-// if (!$p-check($commandLine, $environmentVariables)) {
 if (!$p-check($config)) {
-die($p-getMessage());
+throw new Exception($p-getMessage());
 }
 }
 
 return true;
 }
-
-/**
- * Test to ensure that a particular pre-condition exists (used in testing)
- *
- * @param string $pc
- * @return boolean
- */
-public function hasPreCondition($pc)
-{
-if (in_array($pc, $this-preConditions)) {
-return true;
-}
-
-return false;
-}
 }
 ?
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtPreconditionListTest.php?r1=1.3r2=1.4diff_format=u
Index: phpruntests/tests/configuration/rtPreconditionListTest.php
diff -u phpruntests/tests/configuration/rtPreconditionListTest.php:1.3 
phpruntests/tests/configuration/rtPreconditionListTest.php:1.4
--- phpruntests/tests/configuration/rtPreconditionListTest.php:1.3  Fri Apr 
24 09:42:01 2009
+++ phpruntests/tests/configuration/rtPreconditionListTest.php  Wed May 13 
11:10:54 2009
@@ -1,36 +1,65 @@
 ?php
+/**
+ * rtPreCondtionListTest
+ *
+ * @category  Testing
+ * @package   RUNTESTS
+ * @authorZoe Slattery z...@php.net
+ * @authorStefan Priebsch sprieb...@php.net
+ * @copyright 2009 The PHP Group
+ * @license   http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link  http://qa.php.net/
+ */
 
 require_once 'PHPUnit/Framework.php';
 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
 
+/**
+ * Tests for rtPreCondtionListTest precondition.
+ *
+ * @category  Testing
+ * @package   RUNTESTS
+ * @authorZoe Slattery z...@php.net
+ * @authorStefan Priebsch sprieb...@php.net
+ * @copyright 2009 The PHP Group
+ * @license   http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link  http://qa.php.net/
+ */
 class rtPreCondtionListTest extends PHPUnit_Framework_TestCase
 {
-protected $clo;
-protected $env;
-protected $ge;
-
-public function setUp()
+protected function setUp()
 {
-$this-clo = new rtCommandLineOptions();
-$this-clo-parse(array('run-tests.php', '-p', 'some-php-exe', 
'a-test.phpt'));
+$this-preConditionList = rtPreConditionList::getInstance();
+}
 
-$this-env = rtEnvironmentVariables::getInstance();
-$this-env-getUserSuppliedVariables();  
+protected function tearDown()
+{
+unset($this-preConditionList);
 }
 
 public function testCheck()
 {
-$sl = rtPreConditionList::getInstance();
+$php = trim(shell_exec(which php));
+
+$preConditionList = rtPreConditionList::getInstance();
+$runtestsConfiguration = 
rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $php, 
'a-test.phpt'));
+$runtestsConfiguration-configure();
+
+$this-assertTrue($preConditionList-check($runtestsConfiguration));
+}
+
+public function testGetInstanceOnUnix()
+{
+$preConditionList = rtPreConditionList::getInstance('Unix');
 
-$this-assertTrue($sl-check($this-clo, $this-env));
+$this-assertTrue($preConditionList instanceOf rtUnixPreConditionList);
 }
 
-public function testUnix()
+public function testGetInstanceOnWindows()
 {
-$sl = rtPreConditionList::getInstance();
-$sl-adaptList();
+$preConditionList = rtPreConditionList::getInstance('Windows');
 
-

[PHP-CVS] cvs: phpruntests /src/testrun rtPhpTestRun.php

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 11:42:15 2009 UTC

  Modified files:  
/phpruntests/src/testrunrtPhpTestRun.php 
  Log:
  Moving precondition check in line with Stefans changes
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testrun/rtPhpTestRun.php?r1=1.4r2=1.5diff_format=u
Index: phpruntests/src/testrun/rtPhpTestRun.php
diff -u phpruntests/src/testrun/rtPhpTestRun.php:1.4 
phpruntests/src/testrun/rtPhpTestRun.php:1.5
--- phpruntests/src/testrun/rtPhpTestRun.php:1.4Fri Apr 24 08:52:21 2009
+++ phpruntests/src/testrun/rtPhpTestRun.phpWed May 13 11:42:15 2009
@@ -20,6 +20,12 @@
 $runConfiguration = 
rtRuntestsConfiguration::getInstance($this-commandLineArguments);
 $runConfiguration-configure();
 
+//Check the preconditions
+$preConditionList = rtPreConditionList::getInstance();
+
+// $preConditionList-check($this-commandLine, 
$this-environmentVariables);
+$preConditionList-check($this);
+
 if ($runConfiguration-getSetting('TestDirectories') != null) {
 
 foreach ($runConfiguration-getSetting('TestDirectories') as 
$testDirectory) {
@@ -76,7 +82,7 @@
 if ($testFile-arePreconditionsMet()) {
 
 $testCase = new rtPhpTest($testFile-getContents(), 
$testFile-getTestName(), $testFile-getSectionHeadings(), $runConfiguration);
-   
+ 
 //Setup and set the local environment for the test case
 $testCase-executeTest($runConfiguration);
 



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



[PHP-CVS] cvs: phpruntests /phpt-tests sample_deflatepost.phpt

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 11:51:56 2009 UTC

  Modified files:  
/phpruntests/phpt-tests sample_deflatepost.phpt 
  Log:
  fixing the delate post test failure
  
http://cvs.php.net/viewvc.cgi/phpruntests/phpt-tests/sample_deflatepost.phpt?r1=1.1r2=1.2diff_format=u
Index: phpruntests/phpt-tests/sample_deflatepost.phpt
diff -u phpruntests/phpt-tests/sample_deflatepost.phpt:1.1 
phpruntests/phpt-tests/sample_deflatepost.phpt:1.2
--- phpruntests/phpt-tests/sample_deflatepost.phpt:1.1  Thu Apr 23 20:37:17 2009
+++ phpruntests/phpt-tests/sample_deflatepost.phpt  Wed May 13 11:51:56 2009
@@ -1,9 +1,7 @@
 --TEST--
 Sample test for DEFLATE_POST
---POST--
-blahblah=blah
 --DEFLATE_POST--
-1
+blahblah=blah
 --FILE--
 ?php
 $content = file_get_contents('php://input');



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



[PHP-CVS] cvs: phpruntests /src/testrun rtPhpTestRun.php

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 13:39:49 2009 UTC

  Modified files:  
/phpruntests/src/testrunrtPhpTestRun.php 
  Log:
  fix typo
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testrun/rtPhpTestRun.php?r1=1.5r2=1.6diff_format=u
Index: phpruntests/src/testrun/rtPhpTestRun.php
diff -u phpruntests/src/testrun/rtPhpTestRun.php:1.5 
phpruntests/src/testrun/rtPhpTestRun.php:1.6
--- phpruntests/src/testrun/rtPhpTestRun.php:1.5Wed May 13 11:42:15 2009
+++ phpruntests/src/testrun/rtPhpTestRun.phpWed May 13 13:39:49 2009
@@ -24,7 +24,7 @@
 $preConditionList = rtPreConditionList::getInstance();
 
 // $preConditionList-check($this-commandLine, 
$this-environmentVariables);
-$preConditionList-check($this);
+$preConditionList-check($runConfiguration);
 
 if ($runConfiguration-getSetting('TestDirectories') != null) {
 



-- 
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/xmlrpc xmlrpc-epi-php.c

2009-05-13 Thread Ilia Alshanetsky
iliaa   Wed May 13 14:23:14 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime)
  # Original patch by kawai at apache dot org
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.6.2.20r2=1.39.2.5.2.6.2.21diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.20 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.21
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.6.2.20   Thu Apr  2 
15:52:57 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Wed May 13 14:23:14 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.20 2009/04/02 15:52:57 felipe Exp $ 
*/
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.6.2.21 2009/05/13 14:23:14 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -1344,8 +1344,8 @@
if (newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if (v) {
-   time_t timestamp = 
XMLRPC_GetValueDateTime(v);
-   if (timestamp) {
+   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
+   if (timestamp) {
zval* ztimestamp;
 
MAKE_STD_ZVAL(ztimestamp);



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



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

2009-05-13 Thread Ilia Alshanetsky
iliaa   Wed May 13 14:23:29 2009 UTC

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  
  MFB: Fixed bug #44996 (xmlrpc_decode() ignores time zone on
  iso8601.datetime)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.69r2=1.70diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.69 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.70
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.69Thu Apr  2 15:52:26 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Wed May 13 14:23:29 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.69 2009/04/02 15:52:26 felipe Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.70 2009/05/13 14:23:29 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -1350,8 +1350,8 @@
if (newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if (v) {
-   time_t timestamp = 
XMLRPC_GetValueDateTime(v);
-   if (timestamp) {
+   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
+   if (timestamp) {
zval* ztimestamp;
 
MAKE_STD_ZVAL(ztimestamp);



-- 
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 /ext/xmlrpc xmlrpc-epi-php.c

2009-05-13 Thread Ilia Alshanetsky
iliaa   Wed May 13 14:25:59 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
/php-srcNEWS 
  Log:
  
  MFB: Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.14r2=1.39.2.5.2.15diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.14 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.15
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.14   Thu Apr  2 15:55:01 2009
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Wed May 13 14:25:58 2009
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.14 2009/04/02 15:55:01 felipe Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.15 2009/05/13 14:25:58 iliaa Exp $ */
 
 /**
 * BUGS:   *
@@ -1300,7 +1300,7 @@
if(newtype == xmlrpc_datetime) {
XMLRPC_VALUE v = 
XMLRPC_CreateValueDateTime_ISO8601(NULL, value-value.str.val);
if(v) {
-   time_t timestamp = 
XMLRPC_GetValueDateTime(v);
+   time_t timestamp = (time_t) 
php_parse_date(XMLRPC_GetValueDateTime_ISO8601(v), NULL);
if(timestamp) {
zval* ztimestamp;
 
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1503r2=1.2027.2.547.2.1504diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1503 php-src/NEWS:1.2027.2.547.2.1504
--- php-src/NEWS:1.2027.2.547.2.1503Wed May 13 02:16:36 2009
+++ php-src/NEWSWed May 13 14:25:58 2009
@@ -91,6 +91,8 @@
   setting logging timestamps). (Derick)
 - Fixed bug #45092 (header HTTP context option not being used when compiled
   using --with-curlwrappers). (Jani)
+- Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
+  (Ilia, kawai at apache dot org) 
 - Fixed bug #43073 (TrueType bounding box is wrong for angle0).
   (Martin McNickle)
 - Fixed bug #38805 (PDO truncates text from SQL Server text data type



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



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

2009-05-13 Thread Kalle Sommer Nielsen
kalle   Wed May 13 15:54:49 2009 UTC

  Modified files:  
/php-src/ext/phar   func_interceptors.c 
  Log:
  Nuke compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.30r2=1.31diff_format=u
Index: php-src/ext/phar/func_interceptors.c
diff -u php-src/ext/phar/func_interceptors.c:1.30 
php-src/ext/phar/func_interceptors.c:1.31
--- php-src/ext/phar/func_interceptors.c:1.30   Wed Dec 31 11:12:35 2008
+++ php-src/ext/phar/func_interceptors.cWed May 13 15:54:48 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: func_interceptors.c,v 1.30 2008/12/31 11:12:35 sebastian Exp $ */
+/* $Id: func_interceptors.c,v 1.31 2009/05/13 15:54:48 kalle Exp $ */
 
 #include phar_internal.h
 
@@ -98,7 +98,7 @@
char *contents;
zend_bool use_include_path = 0;
php_stream *stream;
-   int len, newlen;
+   int len;
long offset = -1;
long maxlen = PHP_STREAM_COPY_ALL;
zval *zcontext = NULL;
@@ -205,6 +205,7 @@
if ((len = php_stream_copy_to_mem(stream, contents, 
maxlen, 0))  0) {
 #if PHP_MAJOR_VERSION  6
if (PG(magic_quotes_runtime)) {
+   int newlen;
contents = php_addslashes(contents, 
len, newlen, 1 TSRMLS_CC); /* 1 = free source string */
len = newlen;
}



-- 
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/phar func_interceptors.c

2009-05-13 Thread Kalle Sommer Nielsen
kalle   Wed May 13 15:55:12 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   func_interceptors.c 
  Log:
  MFH: Nuke compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.20.2.21r2=1.20.2.22diff_format=u
Index: php-src/ext/phar/func_interceptors.c
diff -u php-src/ext/phar/func_interceptors.c:1.20.2.21 
php-src/ext/phar/func_interceptors.c:1.20.2.22
--- php-src/ext/phar/func_interceptors.c:1.20.2.21  Wed Dec 31 11:15:42 2008
+++ php-src/ext/phar/func_interceptors.cWed May 13 15:55:12 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: func_interceptors.c,v 1.20.2.21 2008/12/31 11:15:42 sebastian Exp $ */
+/* $Id: func_interceptors.c,v 1.20.2.22 2009/05/13 15:55:12 kalle Exp $ */
 
 #include phar_internal.h
 
@@ -98,7 +98,7 @@
char *contents;
zend_bool use_include_path = 0;
php_stream *stream;
-   int len, newlen;
+   int len;
long offset = -1;
long maxlen = PHP_STREAM_COPY_ALL;
zval *zcontext = NULL;
@@ -205,6 +205,7 @@
if ((len = php_stream_copy_to_mem(stream, contents, 
maxlen, 0))  0) {
 #if PHP_MAJOR_VERSION  6
if (PG(magic_quotes_runtime)) {
+   int newlen;
contents = php_addslashes(contents, 
len, newlen, 1 TSRMLS_CC); /* 1 = free source string */
len = newlen;
}



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



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

2009-05-13 Thread Kalle Sommer Nielsen
kalle   Wed May 13 16:29:03 2009 UTC

  Modified files:  
/php-src/ext/standard   uuencode.c 
  Log:
  Fix compiler warnings, safe_emalloc expects size_t, not double as ceil returns
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/uuencode.c?r1=1.15r2=1.16diff_format=u
Index: php-src/ext/standard/uuencode.c
diff -u php-src/ext/standard/uuencode.c:1.15 
php-src/ext/standard/uuencode.c:1.16
--- php-src/ext/standard/uuencode.c:1.15Tue Mar 10 23:39:41 2009
+++ php-src/ext/standard/uuencode.c Wed May 13 16:29:03 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uuencode.c,v 1.15 2009/03/10 23:39:41 helly Exp $ */
+/* $Id: uuencode.c,v 1.16 2009/05/13 16:29:03 kalle Exp $ */
 
 /*
  * Portions of this code are based on Berkeley's uuencode/uudecode
@@ -71,7 +71,7 @@
char *p, *s, *e, *ee;
 
/* encoded length is ~ 38% greater then the original */
-   p = *dest = safe_emalloc(ceil(src_len * 1.38), 1, 46);
+   p = *dest = safe_emalloc((size_t) ceil(src_len * 1.38), 1, 46);
s = src;
e = src + src_len;
 
@@ -129,7 +129,7 @@
int len, total_len=0;
char *s, *e, *p, *ee;
 
-   p = *dest = safe_emalloc(ceil(src_len * 0.75), 1, 1);
+   p = *dest = safe_emalloc((size_t) ceil(src_len * 0.75), 1, 1);
s = src;
e = src + src_len;
 



-- 
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 uuencode.c

2009-05-13 Thread Kalle Sommer Nielsen
kalle   Wed May 13 16:29:26 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   uuencode.c 
  Log:
  MFH: Fix compiler warnings, safe_emalloc expects size_t, not double as ceil 
returns
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/uuencode.c?r1=1.5.2.1.2.4.2.3r2=1.5.2.1.2.4.2.4diff_format=u
Index: php-src/ext/standard/uuencode.c
diff -u php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.3 
php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.4
--- php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.3 Wed Dec 31 11:15:46 2008
+++ php-src/ext/standard/uuencode.c Wed May 13 16:29:26 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uuencode.c,v 1.5.2.1.2.4.2.3 2008/12/31 11:15:46 sebastian Exp $ */
+/* $Id: uuencode.c,v 1.5.2.1.2.4.2.4 2009/05/13 16:29:26 kalle Exp $ */
 
 /*
  * Portions of this code are based on Berkeley's uuencode/uudecode
@@ -71,7 +71,7 @@
char *p, *s, *e, *ee;
 
/* encoded length is ~ 38% greater then the original */
-   p = *dest = safe_emalloc(ceil(src_len * 1.38), 1, 46);
+   p = *dest = safe_emalloc((size_t) ceil(src_len * 1.38), 1, 46);
s = src;
e = src + src_len;
 
@@ -129,7 +129,7 @@
int len, total_len=0;
char *s, *e, *p, *ee;
 
-   p = *dest = safe_emalloc(ceil(src_len * 0.75), 1, 1);
+   p = *dest = safe_emalloc((size_t) ceil(src_len * 0.75), 1, 1);
s = src;
e = src + src_len;
 



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



[PHP-CVS] cvs: phpruntests /src/testcase/sections/outputsections rtExpectFSection.php

2009-05-13 Thread Zoe Slattery
zoe Wed May 13 16:58:27 2009 UTC

  Modified files:  
/phpruntests/src/testcase/sections/outputsections   
rtExpectFSection.php 
  Log:
  Added support for %r
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php?r1=1.2r2=1.3diff_format=u
Index: phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php
diff -u 
phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php:1.2 
phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php:1.3
--- phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php:1.2   
Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/sections/outputsections/rtExpectFSection.php   
Wed May 13 16:58:27 2009
@@ -9,18 +9,19 @@
 parent::createPattern();
 $this-createPattern();
 }
-   
+ 
 /**
  * Create the pattern used to match against actual output
  *
  */
 protected function createPattern()
-{
-$this-expectedPattern = preg_quote($this-expectedPattern, '/'); 
-$this-expectedPattern = $this-expectfUnicodeSubstitutions 
($this-expectedPattern);   
-$this-expectedPattern = 
$this-expectfRegexSubstitutions($this-expectedPattern);  
+{  
+   
+$this-expectedPattern = 
$this-expectfEmbeddedRegex($this-expectedPattern);
+$this-expectedPattern = $this-expectfUnicodeSubstitutions 
($this-expectedPattern);
+$this-expectedPattern = 
$this-expectfRegexSubstitutions($this-expectedPattern);
 }
-
+
 /*
  * Replaces string with unicode and vice versa. Allows same tests for PHP5 
and PHP6
  * @param string
@@ -29,25 +30,25 @@
 private function expectfUnicodeSubstitutions($string)
 {
 $string = str_replace(
-array('%unicode_string_optional%'),
-version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 
'Unicode string', $string
+array('%unicode_string_optional%'),
+version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'Unicode 
string', $string
 );
-
+
 $string = str_replace(
-array('%unicode\|string%', '%string\|unicode%'),
-version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 
'unicode',
-$string
+array('%unicode\|string%', '%string\|unicode%'),
+version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? 'string' : 'unicode',
+$string
 );
-
+
 $string = str_replace(
-array('%u\|b%', '%b\|u%'),
-version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? '' : 'u',
-$string
+array('%u\|b%', '%b\|u%'),
+version_compare(PHP_VERSION, '6.0.0-dev') == -1 ? '' : 'u',
+$string
 );
 
 return $string;
 }
-
+
 /*
  * Substitute the %strings used in EXPECTF sections with a regular 
expression
  * @param string
@@ -68,7 +69,40 @@
 $string = str_replace('%c', '.', $string);
 
 return $string;
-}  
+}
+
+/*
+ * Deal with embedded regular expressions between %r tags. 
+ * @param string
+ * @return string
+ */
+private function expectfEmbeddedRegex($string) {
+$temp = ;
+$r = %r;
+$startOffset = 0;
+
+$length = strlen($string);
+while($startOffset  $length) {
+$start = strpos($string, $r, $startOffset);
+if ($start !== false) {
+// we have found a start tag
+$end = strpos($string, $r, $start+2);
+if ($end === false) {
+// unbalanced tag, ignore it.
+$end = $start = $length;
+}
+} else {
+// no more %r sections
+$start = $end = $length;
+}
+// quote a non re portion of the string
+$temp = $temp . preg_quote(substr($string, $startOffset, ($start - 
$startOffset)),  '/');
+// add the re unquoted.
+$temp = $temp . '(' .substr($string, $start+2, ($end - $start-2)) 
. ')';
+$startOffset = $end + 2;
+}
+return substr($temp, 0, -2);
+}
 
 /**
  * Compare the test output with the expected pattern
@@ -79,14 +113,14 @@
 public function compare($testOutput)
 {
 $testOutput = trim(preg_replace(/$this-carriageReturnLineFeed/, 
$this-lineFeed, $testOutput));
-
+
 /*For debugging:
-
+
 file_put_contents(sys_get_temp_dir().'/zrtexp',$this-expectedPattern 
);
 file_put_contents(sys_get_temp_dir().'/zrtout', $testOutput );
 
 */
-
+
 if (preg_match((binary) /^$this-expectedPattern\$/s, $testOutput)) {
 return true;
 } else {



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

Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Jani Taskinen

Dmitry Stogov kirjoitti:

Hi Jani,

Unfortunately this patch doesn't fix the bug.
I'm not sure if it fixes module dependency issues (let me know how to 
check it), but the original bug has the same two problems.


1) Possible infinity recursion in php_log_err()


I did not even try to fix that problem, I wanted to fix the dependancy issues 
first. Now ext/date is the first to init (after Core) and last to shutdown.


Preventing infinite recursion is for someone else to fix how they want. :)

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() so 
any error messages befor this may crash PHP.


Eh..I did fix that until I found out it didn't help at all without THIS stuff 
being fixed first. :)


To test it I just inserted a warning message into main.c around line 
2130, right before module_initialized assignment.


+zend_error(E_WARNING, test);
module_initialized = 1;


Yes, of course, ext/date needs the stuff fixed now that it's actually possible.
But what about the part #1 of this..? Can I MFH to PHP_5_* ?

--Jani


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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Jani Taskinen

Stanislav Malyshev kirjoitti:

Hi!

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() 
so any error messages befor this may crash PHP.


This isn't the first time we see extension being used before 
initialization. Maybe we need some infrastructure to prevent that.


Yes, we have that, the loading order stuff + dependancies.
There just was a bug in all of it which I fixed now.. ;)

--Jani


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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Jani Taskinen

Dmitry Stogov kirjoitti:

Derick Rethans wrote:

On Wed, 13 May 2009, Stanislav Malyshev wrote:

2) Uninitialized DATEG(tzcache. It's initialized only during RINIT() 
so any

error messages befor this may crash PHP.
This isn't the first time we see extension being used before 
initialization.

Maybe we need some infrastructure to prevent that.


In this case, I don't see why I can't init the tzcache in MINIT() 
though. But would that solve things?


Not in general, but it'll fix error logging for all extensions 
initialized after ext/date.


I had a patch first which added the init (also) in GINIT along with that RINIT 
one but that was useless without fixing the core issues first. And then I lost 
it. :D


In case of ext/date: It should be moved to core.

--Jani


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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Johannes Schlüter
On Wed, 2009-05-13 at 00:45 +, Jani Taskinen wrote:
   Log:
   - Fixed bug #48247 (PHP crashes on errors during startup)

Looks good for 5.3 to me.

One comment though:

 cat  $ext_builddir/lib/timelib_config.h EOF
 #ifdef PHP_WIN32
 # include config.w32.h
 #else
 # include php_config.h
 #endif
 EOF

Any issue with this file being committed instead of being generated? -
Just to reduce the complexity and number of things that might break.
People using the timelib for other purpose should still be able to
overwrite this file ...

johannes


-- 
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) /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Jani Taskinen
janiWed May 13 18:48:21 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date   config0.m4 

  Removed files:   
/php-src/ext/date   config.m4 

  Modified files:  
/ZendEngine2zend.c 
/php-src/build  order_by_dep.awk 
/php-src/ext/date   php_date.c 
  Log:
  MFH: Fixed module loading order and made request shutdown functions also to
   be loaded in reverse like all other shutdowns are.
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.31r2=1.308.2.12.2.35.2.32diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.31 
ZendEngine2/zend.c:1.308.2.12.2.35.2.32
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.31 Thu Mar 26 10:56:45 2009
+++ ZendEngine2/zend.c  Wed May 13 18:48:20 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.31 2009/03/26 10:56:45 dmitry Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.32 2009/05/13 18:48:20 jani Exp $ */
 
 #include zend.h
 #include zend_extensions.h
@@ -863,7 +863,7 @@
EG(opline_ptr) = NULL; /* we're no longer executing anything */
 
zend_try {
-   zend_hash_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
+   zend_hash_reverse_apply(module_registry, (apply_func_t) 
module_registry_cleanup TSRMLS_CC);
} zend_end_try();
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/build/order_by_dep.awk?r1=1.1r2=1.1.6.1diff_format=u
Index: php-src/build/order_by_dep.awk
diff -u php-src/build/order_by_dep.awk:1.1 
php-src/build/order_by_dep.awk:1.1.6.1
--- php-src/build/order_by_dep.awk:1.1  Sun Jul 18 12:03:51 2004
+++ php-src/build/order_by_dep.awk  Wed May 13 18:48:20 2009
@@ -79,8 +79,7 @@
out_count = 0;

while (count(mods)) {
-   # count down, since we need to assemble it in reverse order
-   for (i = mod_count-1; i = 0; --i) {
+   for (i = 0; i = mod_count; i++) {
if (i in mods) {
do_deps(i);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.74r2=1.43.2.45.2.51.2.75diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.74 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.75
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.74 Tue May  5 12:33:39 2009
+++ php-src/ext/date/php_date.c Wed May 13 18:48:20 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.74 2009/05/05 12:33:39 iliaa Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.75 2009/05/13 18:48:20 jani Exp $ */
 
 #define _ISOC9X_SOURCE
 
@@ -563,17 +563,11 @@
 zval *date_interval_read_property(zval *object, zval *member, int type 
TSRMLS_DC);
 void date_interval_write_property(zval *object, zval *member, zval *value 
TSRMLS_DC);
 
-/* This is need to ensure that session extension request shutdown occurs 1st, 
because it uses the date extension */ 
-static const zend_module_dep date_deps[] = {
-   ZEND_MOD_OPTIONAL(session)
-   {NULL, NULL, NULL}
-};
-
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
-   date_deps,
+   NULL,
date, /* extension name */
date_functions, /* function list */
PHP_MINIT(date),/* process startup */

http://cvs.php.net/viewvc.cgi/php-src/ext/date/config0.m4?view=markuprev=1.1
Index: php-src/ext/date/config0.m4
+++ php-src/ext/date/config0.m4
dnl $Id: config0.m4,v 1.1 2009/05/13 00:45:57 jani Exp $
dnl config.m4 for date extension

sinclude(ext/date/lib/timelib.m4)
sinclude(lib/timelib.m4)

PHP_DATE_CFLAGS=-...@ext_builddir@/lib
timelib_sources=lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 
 lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c 
lib/parse_iso_intervals.c lib/interval.c

PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)

PHP_ADD_BUILD_DIR([$ext_builddir/lib], 1)
PHP_ADD_INCLUDE([$ext_builddir/lib])
PHP_ADD_INCLUDE([$ext_srcdir/lib])

PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_structs.h 
lib/timelib_config.h])

cat  $ext_builddir/lib/timelib_config.h EOF
#ifdef PHP_WIN32
# include config.w32.h
#else
# include php_config.h
#endif
EOF



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



Re: [PHP-CVS] cvs: php-src /build order_by_dep.awk /ext/date config.m4 config0.m4 php_date.c ZendEngine2 zend.c

2009-05-13 Thread Jani Taskinen

Johannes Schlüter kirjoitti:

On Wed, 2009-05-13 at 00:45 +, Jani Taskinen wrote:

  Log:
  - Fixed bug #48247 (PHP crashes on errors during startup)


Looks good for 5.3 to me.


Committed.


One comment though:


cat  $ext_builddir/lib/timelib_config.h EOF
#ifdef PHP_WIN32
# include config.w32.h
#else
# include php_config.h
#endif
EOF


Any issue with this file being committed instead of being generated? -
Just to reduce the complexity and number of things that might break.
People using the timelib for other purpose should still be able to
overwrite this file ...


I only renamed that file, I did not change anything in it. :)
So this is up to Derick to fix/change.

--Jani


--
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/phar phar.c phar_internal.h tar.c /ext/phar/tests/tar require_hash.phpt tar_nohash.phpt /ext/phar/tests/tar/files Net_URL-1.0.15.tgz

2009-05-13 Thread Greg Beaver
cellog  Wed May 13 20:25:44 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/phar/tests/tar tar_nohash.phpt 
/php-src/ext/phar/tests/tar/files   Net_URL-1.0.15.tgz 

  Modified files:  
/php-srcNEWS 
/php-src/ext/phar   phar.c phar_internal.h tar.c 
/php-src/ext/phar/tests/tar require_hash.phpt 
  Log:
  fix Bug #48257: PharData throws exception with non-phar tar
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.599r2=1.2027.2.547.2.965.2.600diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.599 
php-src/NEWS:1.2027.2.547.2.965.2.600
--- php-src/NEWS:1.2027.2.547.2.965.2.599   Tue May 12 22:18:14 2009
+++ php-src/NEWSWed May 13 20:25:43 2009
@@ -6,6 +6,7 @@
 
 - Disabled SQLite3::loadExtension for threaded SAPIs. (Scott)
 
+- Fixed bug #48257 (PharData throws exception with non-phar tar). (Greg)
 - Fixed bug #48227 (NumberFormatter::format leaks memory). (Felipe)
 - Fixed bug #48200 (compile failure with mbstring.c when 
   --enable-zend-multibyte is used). (Jani)
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.61r2=1.370.2.62diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.61 php-src/ext/phar/phar.c:1.370.2.62
--- php-src/ext/phar/phar.c:1.370.2.61  Fri May  1 09:22:16 2009
+++ php-src/ext/phar/phar.c Wed May 13 20:25:43 2009
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.61 2009/05/01 09:22:16 tony2001 Exp $ */
+/* $Id: phar.c,v 1.370.2.62 2009/05/13 20:25:43 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -1345,7 +1345,7 @@
}
 
if (fp) {
-   if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
+   if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, is_data, error TSRMLS_CC) == SUCCESS) {
if ((*pphar)-is_data || !PHAR_G(readonly)) {
(*pphar)-is_writeable = 1;
}
@@ -1519,7 +1519,7 @@
fname_len = strlen(actual);
}
 
-   ret =  phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC);
+   ret =  phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, is_data, error TSRMLS_CC);
 
if (actual) {
efree(actual);
@@ -1563,7 +1563,7 @@
  * that the manifest is proper, then pass it to phar_parse_pharfile().  SUCCESS
  * or FAILURE is returned and pphar is set to a pointer to the phar's manifest
  */
-static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
+static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, int is_data, 
char **error TSRMLS_DC) /* {{{ */
 {
const char token[] = __HALT_COMPILER();;
const char zip_magic[] = PK\x03\x04;
@@ -1706,7 +1706,7 @@
if (got  512) {
if (phar_is_tar(pos, fname)) {
php_stream_rewind(fp);
-   return phar_parse_tarfile(fp, fname, 
fname_len, alias, alias_len, pphar, compression, error TSRMLS_CC);
+   return phar_parse_tarfile(fp, fname, 
fname_len, alias, alias_len, pphar, is_data, compression, error TSRMLS_CC);
}
}
}
@@ -2380,7 +2380,7 @@
fname_len = strlen(actual);
}
 
-   ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, error TSRMLS_CC);
+   ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, 0, error TSRMLS_CC);
 
if (actual) {
efree(actual);
@@ -3635,7 +3635,7 @@
php_info_print_table_header(2, Phar: PHP Archive support, enabled);
php_info_print_table_row(2, Phar EXT version, PHP_PHAR_VERSION);
php_info_print_table_row(2, Phar API version, PHP_PHAR_API_VERSION);
-   php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.61 $);
+   php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.62 $);
php_info_print_table_row(2, Phar-based phar archives, enabled);
php_info_print_table_row(2, Tar-based phar archives, enabled);
php_info_print_table_row(2, ZIP-based phar archives, enabled);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.109.2.30r2=1.109.2.31diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.109.2.30 
php-src/ext/phar/phar_internal.h:1.109.2.31
--- 

[PHP-CVS] cvs: php-src /ext/phar phar.c phar_internal.h tar.c /ext/phar/tests/tar require_hash.phpt /ext/phar/tests/tar/files Net_URL-1.0.15.tgz

2009-05-13 Thread Greg Beaver
cellog  Wed May 13 20:26:18 2009 UTC

  Modified files:  
/php-src/ext/phar   phar.c phar_internal.h tar.c 
/php-src/ext/phar/tests/tar require_hash.phpt 
/php-src/ext/phar/tests/tar/files   Net_URL-1.0.15.tgz 
  Log:
  MFB: fix Bug #48257: PharData throws exception with non-phar tar
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.399r2=1.400diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.399 php-src/ext/phar/phar.c:1.400
--- php-src/ext/phar/phar.c:1.399   Fri May  1 09:22:02 2009
+++ php-src/ext/phar/phar.c Wed May 13 20:26:18 2009
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.399 2009/05/01 09:22:02 tony2001 Exp $ */
+/* $Id: phar.c,v 1.400 2009/05/13 20:26:18 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include phar_internal.h
@@ -1345,7 +1345,7 @@
}
 
if (fp) {
-   if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
+   if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, is_data, error TSRMLS_CC) == SUCCESS) {
if ((*pphar)-is_data || !PHAR_G(readonly)) {
(*pphar)-is_writeable = 1;
}
@@ -1519,7 +1519,7 @@
fname_len = strlen(actual);
}
 
-   ret =  phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC);
+   ret =  phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, is_data, error TSRMLS_CC);
 
if (actual) {
efree(actual);
@@ -1563,7 +1563,7 @@
  * that the manifest is proper, then pass it to phar_parse_pharfile().  SUCCESS
  * or FAILURE is returned and pphar is set to a pointer to the phar's manifest
  */
-static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
+static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, int is_data, 
char **error TSRMLS_DC) /* {{{ */
 {
const char token[] = __HALT_COMPILER();;
const char zip_magic[] = PK\x03\x04;
@@ -1706,7 +1706,7 @@
if (got  512) {
if (phar_is_tar(pos, fname)) {
php_stream_rewind(fp);
-   return phar_parse_tarfile(fp, fname, 
fname_len, alias, alias_len, pphar, compression, error TSRMLS_CC);
+   return phar_parse_tarfile(fp, fname, 
fname_len, alias, alias_len, pphar, is_data, compression, error TSRMLS_CC);
}
}
}
@@ -2380,7 +2380,7 @@
fname_len = strlen(actual);
}
 
-   ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, error TSRMLS_CC);
+   ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, 0, error TSRMLS_CC);
 
if (actual) {
efree(actual);
@@ -3635,7 +3635,7 @@
php_info_print_table_header(2, Phar: PHP Archive support, enabled);
php_info_print_table_row(2, Phar EXT version, PHP_PHAR_VERSION);
php_info_print_table_row(2, Phar API version, PHP_PHAR_API_VERSION);
-   php_info_print_table_row(2, CVS revision, $Revision: 1.399 $);
+   php_info_print_table_row(2, CVS revision, $Revision: 1.400 $);
php_info_print_table_row(2, Phar-based phar archives, enabled);
php_info_print_table_row(2, Tar-based phar archives, enabled);
php_info_print_table_row(2, ZIP-based phar archives, enabled);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.122r2=1.123diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.122 
php-src/ext/phar/phar_internal.h:1.123
--- php-src/ext/phar/phar_internal.h:1.122  Wed Apr 29 03:24:08 2009
+++ php-src/ext/phar/phar_internal.hWed May 13 20:26:18 2009
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar_internal.h,v 1.122 2009/04/29 03:24:08 cellog Exp $ */
+/* $Id: phar_internal.h,v 1.123 2009/05/13 20:26:18 cellog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -633,7 +633,7 @@
 
 /* tar functions in tar.c */
 int phar_is_tar(char *buf, char *fname);
-int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, phar_archive_data** pphar, php_uint32 compression, char 
**error TSRMLS_DC);
+int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 
compression, char **error TSRMLS_DC);
 

[PHP-CVS] cvs: php-src /ext/json JSON_parser.c JSON_parser.h json.c

2009-05-13 Thread Scott MacVicar
scottmacThu May 14 00:13:57 2009 UTC

  Modified files:  
/php-src/ext/json   JSON_parser.c JSON_parser.h json.c 
  Log:
  Allow the json_decode() depth to be any size, but keep the static one around 
for now. It might make sense to allow an unbound depth.
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.25 php-src/ext/json/JSON_parser.c:1.26
--- php-src/ext/json/JSON_parser.c:1.25 Thu Mar 19 19:25:42 2009
+++ php-src/ext/json/JSON_parser.c  Thu May 14 00:13:57 2009
@@ -247,6 +247,11 @@
 jp-top = -1;
jp-error_code = PHP_JSON_ERROR_NONE;
 jp-stack = (int*)ecalloc(depth, sizeof(int));
+if (depth  JSON_PARSER_DEFAULT_DEPTH) {
+jp-the_zstack = (zval **)safe_emalloc(depth, sizeof(zval), 0);
+} else {
+jp-the_zstack = jp-the_static_zstack[0];
+}
 push(jp, MODE_DONE);
 return jp;
 }
@@ -258,6 +263,9 @@
 free_JSON_parser(JSON_parser jp)
 {
 efree((void*)jp-stack);
+if (jp-the_zstack != jp-the_static_zstack[0]) {
+efree(jp-the_zstack);
+}
 efree((void*)jp);
 return false;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.h?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/json/JSON_parser.h
diff -u php-src/ext/json/JSON_parser.h:1.4 php-src/ext/json/JSON_parser.h:1.5
--- php-src/ext/json/JSON_parser.h:1.4  Fri Dec 19 02:00:59 2008
+++ php-src/ext/json/JSON_parser.h  Thu May 14 00:13:57 2009
@@ -6,7 +6,7 @@
 #include php.h
 #include ext/standard/php_smart_str.h
 
-#define JSON_PARSER_MAX_DEPTH 512
+#define JSON_PARSER_DEFAULT_DEPTH 512
 
 typedef struct JSON_parser_struct {
 int state;
@@ -14,8 +14,8 @@
 int top;
 int error_code;
 int* stack;
-zval *the_zstack[JSON_PARSER_MAX_DEPTH];
-
+zval **the_zstack;
+zval *the_static_zstack[JSON_PARSER_DEFAULT_DEPTH];
 } * JSON_parser;
 
 enum error_codes {
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.50r2=1.51diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.50 php-src/ext/json/json.c:1.51
--- php-src/ext/json/json.c:1.50Tue Mar 17 23:25:39 2009
+++ php-src/ext/json/json.c Thu May 14 00:13:57 2009
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: json.c,v 1.50 2009/03/17 23:25:39 scottmac Exp $ */
+/* $Id: json.c,v 1.51 2009/05/14 00:13:57 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -507,7 +507,7 @@
int str_len, utf16_len;
zend_uchar str_type;
zend_bool assoc = 0; /* return JS objects as PHP objects by default */
-   long depth = JSON_PARSER_MAX_DEPTH;
+   long depth = JSON_PARSER_DEFAULT_DEPTH;
zval *z;
unsigned short *utf16;
JSON_parser jp;
@@ -535,9 +535,8 @@
}
}
 
-   /* can be removed once we remove the max depth limit */
-   if (depth = 0 || depth  JSON_PARSER_MAX_DEPTH) {
-   depth = JSON_PARSER_MAX_DEPTH;
+   if (depth = 0) {
+   depth = JSON_PARSER_DEFAULT_DEPTH;
}
 
ALLOC_INIT_ZVAL(z);



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



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

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:25:17 2009 UTC

  Modified files:  
/php-src/ext/odbc   php_odbc.c 
  Log:
  - Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
driver)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.219r2=1.220diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.219 php-src/ext/odbc/php_odbc.c:1.220
--- php-src/ext/odbc/php_odbc.c:1.219   Fri May  1 03:02:32 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 01:25:17 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.219 2009/05/01 03:02:32 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.220 2009/05/14 01:25:17 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -3122,6 +3122,10 @@
schema = NULL;
}
 
+   if (cat  cat_len == 0) {
+   cat = NULL;
+   }
+
rc = SQLColumns(result-stmt, 
cat, (SQLSMALLINT) cat_len,
schema, (SQLSMALLINT) schema_len,
@@ -3184,6 +3188,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLColumnPrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3260,6 +3268,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (pcat_len == 0) {
+   pcat = NULL;
+   }
 
rc = SQLForeignKeys(result-stmt, 
pcat, SAFE_SQL_NTS(pcat), 
@@ -3385,6 +3397,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLPrimaryKeys(result-stmt, cat, SAFE_SQL_NTS(cat), schema, 
SAFE_SQL_NTS(schema), table, SAFE_SQL_NTS(table) );
 
@@ -3583,6 +3599,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLSpecialColumns(result-stmt, 
type,
@@ -3652,6 +3672,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLStatistics(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3715,6 +3739,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLTablePrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat), 



-- 
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/odbc php_odbc.c

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:26:39 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/odbc   php_odbc.c 
  Log:
  MFH:
  - Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
driver)
patch by: jhml at gmx dot net
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.7.2.19r2=1.189.2.4.2.7.2.20diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.19 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.20
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7.2.19  Fri May  1 03:02:46 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 01:26:39 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.19 2009/05/01 03:02:46 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.7.2.20 2009/05/14 01:26:39 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -3127,6 +3127,10 @@
schema = NULL;
}
 
+   if (cat  cat_len == 0) {
+   cat = NULL;
+   }
+
rc = SQLColumns(result-stmt, 
cat, (SQLSMALLINT) cat_len,
schema, (SQLSMALLINT) schema_len,
@@ -3189,6 +3193,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLColumnPrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3265,6 +3273,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (pcat_len == 0) {
+   pcat = NULL;
+   }
 
rc = SQLForeignKeys(result-stmt, 
pcat, SAFE_SQL_NTS(pcat), 
@@ -3388,6 +3400,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLPrimaryKeys(result-stmt, 
cat, SAFE_SQL_NTS(cat), 
@@ -3589,6 +3605,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLSpecialColumns(result-stmt, 
type,
@@ -3658,6 +3678,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLStatistics(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3721,6 +3745,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLTablePrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat), 



-- 
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/odbc php_odbc.c

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:27:24 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/odbc   php_odbc.c 
  Log:
  MFH:
  - Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
driver)
patch by: jhml at gmx dot net
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.12r2=1.189.2.4.2.13diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.12 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.13
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.12  Fri May  1 03:06:38 2009
+++ php-src/ext/odbc/php_odbc.c Thu May 14 01:27:23 2009
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.12 2009/05/01 03:06:38 felipe Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.13 2009/05/14 01:27:23 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2994,6 +2994,10 @@
 */
if (table  strlen(table)  schema  !strlen(schema)) schema = NULL;
 
+   if (cat  cat_len == 0) {
+   cat = NULL;
+   }
+
rc = SQLColumns(result-stmt, 
cat, cat_len,
schema, schema_len,
@@ -3068,6 +3072,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLColumnPrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3162,6 +3170,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (pcat_len == 0) {
+   pcat = NULL;
+   }
 
rc = SQLForeignKeys(result-stmt, 
pcat, SAFE_SQL_NTS(pcat), 
@@ -3305,6 +3317,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLPrimaryKeys(result-stmt, 
cat, SAFE_SQL_NTS(cat), 
@@ -3543,6 +3559,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLSpecialColumns(result-stmt, 
type,
@@ -3624,6 +3644,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLStatistics(result-stmt, 
cat, SAFE_SQL_NTS(cat),
@@ -3698,6 +3722,10 @@
efree(result);
RETURN_FALSE;
}
+   
+   if (cat_len == 0) {
+   cat = NULL;
+   }
 
rc = SQLTablePrivileges(result-stmt, 
cat, SAFE_SQL_NTS(cat), 



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



[PHP-CVS] cvs: php-src /ext/odbc/tests odbc_columnprivileges_001.phpt odbc_columns_001.phpt odbc_data_source_001.phpt odbc_exec_002.phpt odbc_free_result_001.phpt odbc_tables_001.phpt

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:28:23 2009 UTC

  Added files: 
/php-src/ext/odbc/tests odbc_columnprivileges_001.phpt 
odbc_columns_001.phpt 
odbc_data_source_001.phpt 
odbc_exec_002.phpt 
odbc_free_result_001.phpt 
odbc_tables_001.phpt 
  Log:
  - New tests
  

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
+++ php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
--TEST--
odbc_columnprivileges(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columnprivileges($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columns_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columns_001.phpt
+++ php-src/ext/odbc/tests/odbc_columns_001.phpt
--TEST--
odbc_columns(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columns($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

Warning: odbc_columns(): SQL error: Failed to fetch error message, SQL state 
HY000 in SQLColumns in %s on line %d
bool(false)

Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given in 
%s on line %d
NULL

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_data_source_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_data_source_001.phpt
+++ php-src/ext/odbc/tests/odbc_data_source_001.phpt
--TEST--
odbc_data_source(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump(odbc_data_source($conn, NULL));
var_dump(odbc_data_source($conn, ''));
var_dump(odbc_data_source($conn, SQL_FETCH_FIRST));

?
--EXPECTF--
Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
bool(false)

Warning: odbc_data_source() expects parameter 2 to be long, string given in %s 
on line %d
NULL
array(%d) {
%a
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_exec_002.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_exec_002.phpt
+++ php-src/ext/odbc/tests/odbc_exec_002.phpt
--TEST--
odbc_exec(): Getting data from query
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_fetch_array($res));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
array(1) {
  [TEST]=
  string(1) 2
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_free_result_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_free_result_001.phpt
+++ php-src/ext/odbc/tests/odbc_free_result_001.phpt
--TEST--
odbc_free_result(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');
odbc_exec($conn, 'ALTER TABLE FOO ADD PRIMARY KEY FOO(TEST)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_free_result($res));
var_dump(odbc_free_result($conn));
var_dump(odbc_free_result(NULL));
var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
bool(true)

Warning: odbc_free_result(): supplied resource is not a valid ODBC result 
resource 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/odbc/tests odbc_columnprivileges_001.phpt odbc_columns_001.phpt odbc_data_source_001.phpt odbc_exec_002.phpt odbc_free_result_001.phpt odbc_tables_001.phpt

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:28:58 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/odbc/tests odbc_columnprivileges_001.phpt 
odbc_columns_001.phpt 
odbc_data_source_001.phpt 
odbc_exec_002.phpt 
odbc_free_result_001.phpt 
odbc_tables_001.phpt 
  Log:
  - New tests
  

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
+++ php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
--TEST--
odbc_columnprivileges(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columnprivileges($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columns_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columns_001.phpt
+++ php-src/ext/odbc/tests/odbc_columns_001.phpt
--TEST--
odbc_columns(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columns($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

Warning: odbc_columns(): SQL error: Failed to fetch error message, SQL state 
HY000 in SQLColumns in %s on line %d
bool(false)

Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given in 
%s on line %d
NULL

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_data_source_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_data_source_001.phpt
+++ php-src/ext/odbc/tests/odbc_data_source_001.phpt
--TEST--
odbc_data_source(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump(odbc_data_source($conn, NULL));
var_dump(odbc_data_source($conn, ''));
var_dump(odbc_data_source($conn, SQL_FETCH_FIRST));

?
--EXPECTF--
Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
bool(false)

Warning: odbc_data_source() expects parameter 2 to be long, string given in %s 
on line %d
NULL
array(%d) {
%a
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_exec_002.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_exec_002.phpt
+++ php-src/ext/odbc/tests/odbc_exec_002.phpt
--TEST--
odbc_exec(): Getting data from query
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_fetch_array($res));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
array(1) {
  [TEST]=
  string(1) 2
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_free_result_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_free_result_001.phpt
+++ php-src/ext/odbc/tests/odbc_free_result_001.phpt
--TEST--
odbc_free_result(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');
odbc_exec($conn, 'ALTER TABLE FOO ADD PRIMARY KEY FOO(TEST)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_free_result($res));
var_dump(odbc_free_result($conn));
var_dump(odbc_free_result(NULL));
var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
bool(true)

Warning: odbc_free_result(): supplied resource is not a valid ODBC 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/odbc/tests odbc_columnprivileges_001.phpt odbc_columns_001.phpt odbc_data_source_001.phpt odbc_exec_002.phpt odbc_free_result_001.phpt odbc_tables_001.phpt

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:29:37 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/odbc/tests odbc_columnprivileges_001.phpt 
odbc_columns_001.phpt 
odbc_data_source_001.phpt 
odbc_exec_002.phpt 
odbc_free_result_001.phpt 
odbc_tables_001.phpt 
  Log:
  - New tests
  

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
+++ php-src/ext/odbc/tests/odbc_columnprivileges_001.phpt
--TEST--
odbc_columnprivileges(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columnprivileges($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columnprivileges($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_columns_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_columns_001.phpt
+++ php-src/ext/odbc/tests/odbc_columns_001.phpt
--TEST--
odbc_columns(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump($result = odbc_columns($conn, '', '', '', ''));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, NULL, NULL, NULL, NULL));
var_dump(odbc_fetch_row($result));

var_dump($result = odbc_columns($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
var_dump(odbc_fetch_row($result));

?
--EXPECTF--
resource(%d) of type (odbc result)
bool(false)
resource(%d) of type (odbc result)
bool(false)

Warning: odbc_columns(): SQL error: Failed to fetch error message, SQL state 
HY000 in SQLColumns in %s on line %d
bool(false)

Warning: odbc_fetch_row() expects parameter 1 to be resource, boolean given in 
%s on line %d
NULL

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_data_source_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_data_source_001.phpt
+++ php-src/ext/odbc/tests/odbc_data_source_001.phpt
--TEST--
odbc_data_source(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

var_dump(odbc_data_source($conn, NULL));
var_dump(odbc_data_source($conn, ''));
var_dump(odbc_data_source($conn, SQL_FETCH_FIRST));

?
--EXPECTF--
Warning: odbc_data_source(): Invalid fetch type (0) in %s on line %d
bool(false)

Warning: odbc_data_source() expects parameter 2 to be long, string given in %s 
on line %d
NULL
array(%d) {
%a
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_exec_002.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_exec_002.phpt
+++ php-src/ext/odbc/tests/odbc_exec_002.phpt
--TEST--
odbc_exec(): Getting data from query
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_fetch_array($res));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
array(1) {
  [TEST]=
  string(1) 2
}

http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/tests/odbc_free_result_001.phpt?view=markuprev=1.1
Index: php-src/ext/odbc/tests/odbc_free_result_001.phpt
+++ php-src/ext/odbc/tests/odbc_free_result_001.phpt
--TEST--
odbc_free_result(): Basic test
--SKIPIF--
?php include 'skipif.inc'; ?
--FILE--
?php

include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);

odbc_exec($conn, 'CREATE DATABASE odbcTEST');

odbc_exec($conn, 'CREATE TABLE FOO (TEST INT)');
odbc_exec($conn, 'ALTER TABLE FOO ADD PRIMARY KEY FOO(TEST)');

odbc_exec($conn, 'INSERT INTO FOO VALUES (1)');
odbc_exec($conn, 'INSERT INTO FOO VALUES (2)');

$res = odbc_exec($conn, 'SELECT * FROM FOO');

var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));
var_dump(odbc_free_result($res));
var_dump(odbc_free_result($conn));
var_dump(odbc_free_result(NULL));
var_dump(odbc_fetch_row($res));
var_dump(odbc_result($res, 'test'));

odbc_exec($conn, 'DROP TABLE FOO');

odbc_exec($conn, 'DROP DATABASE odbcTEST');

?
--EXPECTF--
bool(true)
string(1) 1
bool(true)

Warning: odbc_free_result(): supplied resource is not a valid ODBC 

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

2009-05-13 Thread Matt Wilmas
mattwil Thu May 14 01:31:02 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Now in 5.2 (or should the entry be here as well...?)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.600r2=1.2027.2.547.2.965.2.601diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.600 
php-src/NEWS:1.2027.2.547.2.965.2.601
--- php-src/NEWS:1.2027.2.547.2.965.2.600   Wed May 13 20:25:43 2009
+++ php-src/NEWSThu May 14 01:31:02 2009
@@ -143,7 +143,6 @@
 - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
 - Fixed bug #46048 (SimpleXML top-level @attributes not part of iterator).
   (David C.)
-- Fixed bug #45877 (Array key '2147483647' left as string). (Matt)
 - Fixed bug #45682 (Unable to var_dump(DateInterval)). (Derick)
 - Fixed bug #45432 (PDO: persistent connection leak). (Felipe)
 - Fixed bug #43831 ($this gets mangled when extending PDO with persistent 



-- 
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

2009-05-13 Thread Felipe Pena
felipe  Thu May 14 01:31:51 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1505r2=1.2027.2.547.2.1506diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1505 php-src/NEWS:1.2027.2.547.2.1506
--- php-src/NEWS:1.2027.2.547.2.1505Thu May 14 01:28:14 2009
+++ php-src/NEWSThu May 14 01:31:50 2009
@@ -96,6 +96,8 @@
   (Ilia, kawai at apache dot org) 
 - Fixed bug #43073 (TrueType bounding box is wrong for angle0).
   (Martin McNickle)
+- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC 
+  driver). (jhml at gmx dot net)
 - Fixed bug #38805 (PDO truncates text from SQL Server text data type
   field). (Steph)
 



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



[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtVersionCheckTest.php

2009-05-13 Thread Georg Gradwohl
g2  Wed May 13 12:20:48 2009 UTC

  Modified files:  
/phpruntests/tests/configuration/preconditions  
rtVersionCheckTest.php 
  Log:
  phpruntests - removed invalid assertion
  
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php?r1=1.1r2=1.2diff_format=u
Index: phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php
diff -u 
phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php:1.1 
phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php:1.2
--- phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php:1.1
Wed May  6 20:45:42 2009
+++ phpruntests/tests/configuration/preconditions/rtVersionCheckTest.php
Wed May 13 12:20:47 2009
@@ -41,7 +41,6 @@
 {
 $this-assertFalse($this-versionCheck-parseVersionString(5.3.0));
 $this-assertFalse($this-versionCheck-parseVersionString(PHP 5.2 
PHP 6.0));
-$this-assertFalse($this-versionCheck-parseVersionString(PHP 6));
 }
 }
 ?



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