[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ UPGRADING
rasmus Mon, 12 Mar 2012 06:11:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=324124 Log: This change was badly worded and filed in the wrong section. This isn't an ini change at all. Changed paths: U php/php-src/branches/PHP_5_4/UPGRADING Modified: php/php-src/branches/PHP_5_4/UPGRADING === --- php/php-src/branches/PHP_5_4/UPGRADING 2012-03-12 05:58:15 UTC (rev 324123) +++ php/php-src/branches/PHP_5_4/UPGRADING 2012-03-12 06:11:58 UTC (rev 324124) @@ -36,15 +36,6 @@ 1. Changes to INI directives = -- The default character set is now UTF-8 when the default_charset - php.ini directive is not explicitly set. This applies to functions - such as htmlentities() and htmlspecialchars(). If you were relying - on the previous default of ISO-8859-1 you will need to add: - -default_charset = iso-8859-1 - - to your php.ini to preserve pre-PHP 5.4 behavior. - - PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom are present. If either is available, session.entropy_file now defaults to that file and session.entropy_length defaults to 32. @@ -200,6 +191,13 @@ - call_user_func_array() no longer allows call-time pass by reference. +- the default character set for htmlspecialchars() and htmlentities() is + now UTF-8. In previous versions it was ISO-8859-1. Note that changing + your output charset via the php.ini default_charset directive does not + affect htmlspecialchars/htmlentities unless you are passing (an + empty string) as the encoding parameter to your htmlspecialchars/htmlentities + calls. + - htmlentities() and htmlspecialchars() are stricter in the code units they accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/Zend/tests/bug61273.phpt branches/PHP_5_4/Zend/tests/bug61273.phpt trunk/Zend/tests/bug61273.phpt
laruence Mon, 12 Mar 2012 14:52:02 + Revision: http://svn.php.net/viewvc?view=revisionrevision=324159 Log: reduce memory usage Changed paths: U php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt U php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt U php/php-src/trunk/Zend/tests/bug61273.phpt Modified: php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, *); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function($a) {}, $args); echo strval(okey); --EXPECTF-- Modified: php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, *); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function($a) {}, $args); echo strval(okey); --EXPECTF-- Modified: php/php-src/trunk/Zend/tests/bug61273.phpt === --- php/php-src/trunk/Zend/tests/bug61273.phpt 2012-03-12 14:22:08 UTC (rev 324158) +++ php/php-src/trunk/Zend/tests/bug61273.phpt 2012-03-12 14:52:02 UTC (rev 324159) @@ -7,7 +7,7 @@ * for 5.4 #define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16) * we should trick EG(argument_stack) into growing */ -$args = array_fill(0, 64 * 1024 - 64, *); +$args = array_fill(0, 64 * 1024 - 64, 0); call_user_func_array(function($a) {}, $args); echo strval(okey); --EXPECTF-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_4/ NEWS
rasmus Mon, 12 Mar 2012 15:21:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=324160 Log: Remove reference to default_charset here since the it isn't really about the ini option at all. That only comes into play when you force it by passing and empty encoding string to those functions. Changed paths: U php/php-src/branches/PHP_5_4/NEWS Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-12 14:52:02 UTC (rev 324159) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-12 15:21:15 UTC (rev 324160) @@ -168,8 +168,8 @@ . Changed error handlers to only generate docref links when the docref_root php.ini setting is not empty. (Derick) . Changed silent conversion of array to string to produce a notice. (Patrick) - . Changed default value of default_charset php.ini option from ISO-8859-1 to -UTF-8. (Rasmus) + . Changed default encoding from ISO-8859-1 to UTF-8 when not specified in +htmlspecialchars and htmlentities. (Rasmus) . Changed casting of null/''/false into an Object when adding a property from E_STRICT into a warning. (Scott) . Changed E_ALL to include E_STRICT. (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] [git] karma.git branch PHP_POST_RECEIVE updated. 4d61fb5
The branch PHP_POST_RECEIVE on karma.git has been updated via 4d61fb520544f543d8c6120fb02548de4bfc2f06 (commit) via fc047465fda04319c5a14707d7709fff1f2a3f57 (commit) via b1240df188897323ee2c550d62fcab4a245bec37 (commit) via fc9c78fe12aa756060684e565adf8fb8a4373120 (commit) via c388fdc594d5cf8f8f695eef47c179e2e1acc39e (commit) from 8507e88c7abde403c9bdf1b385d5d4f2b284d1f3 (commit) http://git.php.net/?p=karma.git;a=log;h=4d61fb520544f543d8c6120fb02548de4bfc2f06;hp=8507e88c7abde403c9bdf1b385d5d4f2b284d1f3 Summary of changes: hooks/pre-receive | 10 +++- lib/Git.php | 29 -- lib/Git/PostReceiveHook.php | 88 +-- lib/Git/PreReceiveHook.php | 67 ++--- lib/Git/PushInformation.php | 18 ++--- lib/Git/ReceiveHook.php | 55 -- 6 files changed, 141 insertions(+), 126 deletions(-) -- Log commit 4d61fb520544f543d8c6120fb02548de4bfc2f06 Author: Alexander Moskaliov ir...@php.net Date: Sun Mar 11 13:13:29 2012 +0400 next part of refactoring diff --git a/lib/Git.php b/lib/Git.php index ee3e95c..87e5fa9 100644 --- a/lib/Git.php +++ b/lib/Git.php @@ -5,6 +5,8 @@ class Git const GIT_EXECUTABLE = 'git'; const NULLREV = ''; +private static $repositoryPath = null; + /** * Returns the path to the current repository. * @@ -15,11 +17,30 @@ class Git */ public static function getRepositoryPath() { -$path = exec(sprintf('%s rev-parse --git-dir', self::GIT_EXECUTABLE)); -if (!is_dir($path)) { -return false; +if (is_null(self::$repositoryPath)) { +$path = exec(sprintf('%s rev-parse --git-dir', self::GIT_EXECUTABLE)); +self::$repositoryPath = is_dir($path) ? realpath($path) : false; } -return realpath($path); +return self::$repositoryPath; +} + +/** + * Run git shell command and return result + * + * @param $cmd string + * @param $arg string + * @param ... string + * @return string + */ +public static function gitExec($cmd) +{ +$cmd = self::GIT_EXECUTABLE . --git-dir= . self::getRepositoryPath() . . $cmd; +$args = func_get_args(); +array_shift($args); +$cmd = vsprintf($cmd, $args); +$output = shell_exec($cmd); +if ($output === NULL) throw new \Exception('Failed to call git'); +return $output; } } diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 0f36aa0..1d5daee 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -92,20 +92,22 @@ class PostReceiveHook extends ReceiveHook if ($changeType == self::TYPE_UPDATED) { // check if push was with --force option -if ($replacedRevisions = $this-getRevisions($newrev . '..' . $oldrev)) { +if ($replacedRevisions = $this-getRevisions(escapeshellarg($newrev . '..' . $oldrev))) { $message .= Discarded revisions: \n . implode(\n, $replacedRevisions) . \n; } // git rev-list old..new -$revisions = $this-getRevisions($oldrev . '..' . $newrev); +$revisions = $this-getRevisions(escapeshellarg($oldrev . '..' . $newrev)); } else { // for new branch we write log about new commits only -$revisions = $this-getRevisions($newrev. ' --not ' . implode(' ', array_diff($this-allBranches, $this-newBranches))); +$revisions = $this-getRevisions( +escapeshellarg($newrev) . ' --not ' . implode(' ', $this-escapeArrayShellArgs(array_diff($this-allBranches, $this-newBranches))) +); foreach ($this-updatedBranches as $refname) { if ($this-isRevExistsInBranches($this-refs[$refname]['old'], [$name])) { -$this-cacheRevisions($name, $this-getRevisions($this-refs[$refname]['old'] . '..' . $newrev)); +$this-cacheRevisions($name, $this-getRevisions(escapeshellarg($this-refs[$refname]['old'] . '..' . $newrev))); } } } @@ -115,9 +117,9 @@ class PostReceiveHook extends ReceiveHook if (count($revisions)) { $message .= LOG\n; foreach ($revisions as $revision) { -$diff = $this-gitExecute( +$diff = \Git::gitExec( 'diff-tree --stat --pretty=medium -c %s', -$revision +escapeshellarg($revision) ); $message .= $diff.\n\n; @@ -185,7 +187,7 @@ class
[PHP-CVS] [git] karma.git branch PHP_POST_RECEIVE updated. a7fabb3
The branch PHP_POST_RECEIVE on karma.git has been updated via a7fabb3c3cf3274a48efe8d7ae948af68984f0d1 (commit) from 4d61fb520544f543d8c6120fb02548de4bfc2f06 (commit) http://git.php.net/?p=karma.git;a=log;h=a7fabb3c3cf3274a48efe8d7ae948af68984f0d1;hp=4d61fb520544f543d8c6120fb02548de4bfc2f06 Summary of changes: hooks/pre-receive |1 + lib/Git/PostReceiveHook.php | 65 +++--- lib/Git/PreReceiveHook.php |7 ++-- lib/Git/ReceiveHook.php |3 +- 4 files changed, 66 insertions(+), 10 deletions(-) -- Log commit a7fabb3c3cf3274a48efe8d7ae948af68984f0d1 Author: Alexander Moskaliov ir...@php.net Date: Mon Mar 12 20:27:48 2012 +0400 refactoring and add commets for branch and tag mail format diff --git a/hooks/pre-receive b/hooks/pre-receive index c0e838d..250b609 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -112,6 +112,7 @@ if ($hook-isKarmaIgnored()) { accept(No karma check necessary. Thank you for your contribution.\n); } +$hook-hookInput(); $repo_name = $hook-getRepositoryName(); $pi= new \Git\PushInformation($hook); $req_paths = ($pi-isForced()) ? [''] : $hook-getReceivedPaths(); diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index 1d5daee..821303a 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -8,8 +8,6 @@ class PostReceiveHook extends ReceiveHook private $mailingList = ''; private $emailPrefix = ''; - -private $refs = []; private $newBranches = []; private $updatedBranches = []; private $revisions = []; @@ -38,7 +36,7 @@ class PostReceiveHook extends ReceiveHook */ public function process() { -$this-refs = $this-hookInput(); +$this-hookInput(); //cache list of new and updated branches foreach ($this-refs as $ref) { @@ -70,6 +68,37 @@ class PostReceiveHook extends ReceiveHook } /** + * Send mail about branch. + * Subject: [git] [branch] %STATUS% branch %BRANCH_NAME% in %PROJECT% + * Body: + * Branch %BRANCH_NAME% in %PROJECT% was %STATUS% + * Date: Thu, 08 Mar 2012 12:39:48 +(current mail date) + * + * Link: http://git.php.net/?p=%PROJECT_PATH%;a=shortlog;h=refs/heads/%BRANCH_NAME% + * + * --part1-- + * Log: + * + * --per commit-- + * Commit: %SHA% + * Author: %USER% Thu, 08 Mar 2012 12:39:48 + + * Committer: %USER% Thu, 08 Mar 2012 12:39:48 + + * Link: http://git.php.net/?p=%PROJECT_PATH%;a=commitdiff;h=%SHA% + * Shortlog: %SHORT_MESSAGE% + * --/per commit-- + * + * --/part1-- + * + * (if part1 exceeded maximum size) + * --part1-- + * Commits: + * + * --per commit-- + * Commit: %SHA% + * --/per commit-- + * + * --/part1-- + * * @param $name string * @param $changeType int * @param $oldrev string @@ -77,6 +106,7 @@ class PostReceiveHook extends ReceiveHook */ private function sendBranchMail($name, $changeType, $oldrev, $newrev) { +// FIXME: work in progress if ($changeType == self::TYPE_UPDATED) { $title = Branch . $name . was updated; @@ -146,6 +176,31 @@ class PostReceiveHook extends ReceiveHook /** + * Send mail about tag. + * Subject: [git] [tag] %STATUS% tag %TAGNAME% in %PROJECT% + * Body: + * Tag %TAGNAME% in %PROJECT% was %STATUS% (if sha was changed)from %OLD_SHA% + * Tag(if annotaded): %SHA% + * Tagger(if annotaded): %USER% Thu, 08 Mar 2012 12:39:48 + + * + * Link: http://git.php.net/?p=%PROJECT_PATH%;a=tag;h=%SHA% + * + * Log(if annotaded): + * %MESSAGE% + * + * Target: %SHA% + * Author: %USER% Thu, 08 Mar 2012 12:39:48 + + * Committer: %USER% Thu, 08 Mar 2012 12:39:48 + + * Parents: %SHA_PARENTS% + * Target link: http://git.php.net/?p=%PROJECT_PATH%;a=commitdiff;h=%SHA% + * Target log: + * %MESSAGE% + * + * --part1-- + * Changed paths: + * %PATHS% + * --/part1-- + * * @param $name string * @param $changetype int * @param $oldrev string @@ -153,7 +208,7 @@ class PostReceiveHook extends ReceiveHook */ private function sendTagMail($name, $changetype, $oldrev, $newrev) { - +// FIXME: work in progress if ($changetype == self::TYPE_UPDATED) { $title = Tag . $name . was updated; } elseif ($changetype == self::TYPE_CREATED) { @@ -262,7 +317,7 @@ class PostReceiveHook extends ReceiveHook * Committer: %USER% Thu, 08 Mar 2012 12:39:48 + * Parents: %SHA_PARENTS% * - * Commit:
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/basic_functions.c branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt branches/PHP_5_4/NEWS branches/PHP_5_4/ext/sta
iliaaMon, 12 Mar 2012 16:53:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=324163 Log: Fixed bug #60222 (time_nanosleep() does validate input params). Bug: https://bugs.php.net/60222 (Open) time_nanosleep won't throw a warning for negative second Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c A php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c A php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt U php/php-src/trunk/ext/standard/basic_functions.c A php/php-src/trunk/ext/standard/tests/time/bug60222.phpt Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_3/NEWS 2012-03-12 16:53:07 UTC (rev 324163) @@ -24,6 +24,7 @@ . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia) . Fixed bug #60227 (header() cannot detect the multi-line header with CR). (rui, Gustavo) + . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia) . Fixed bug #52719 (array_walk_recursive crashes if third param of the function is by reference). (Nikita Popov) . Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry) Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2012-03-12 16:53:07 UTC (rev 324163) @@ -4497,6 +4497,15 @@ return; } + if (tv_sec 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, The seconds value must be greater than 0); + RETURN_FALSE; + } + if (tv_nsec 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, The nanoseconds value must be greater than 0); + RETURN_FALSE; + } + php_req.tv_sec = (time_t) tv_sec; php_req.tv_nsec = tv_nsec; if (!nanosleep(php_req, php_rem)) { Added: php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/time/bug60222.phpt 2012-03-12 16:53:07 UTC (rev 324163) @@ -0,0 +1,15 @@ +--TEST-- +Bug #60222 (time_nanosleep() does validate input params) +--FILE-- +?php + var_dump(time_nanosleep(-1, 0)); + var_dump(time_nanosleep(0, -1)); +? +===DONE=== +--EXPECTF-- +Warning: time_nanosleep(): The seconds value must be greater than 0 in %s on line %d +bool(false) + +Warning: time_nanosleep(): The nanoseconds value must be greater than 0 in %s on line %d +bool(false) +===DONE=== Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-12 16:53:07 UTC (rev 324163) @@ -87,6 +87,7 @@ - Standard: . Fixed memory leak in substr_replace. (Pierrick) . Make max_file_uploads ini directive settable outside of php.ini (Rasmus) + . Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia) . Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths). (Ilia) Modified: php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c === --- php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 16:19:10 UTC (rev 324162) +++ php/php-src/branches/PHP_5_4/ext/standard/basic_functions.c 2012-03-12 16:53:07 UTC (rev 324163) @@ -4432,6 +4432,15 @@ return; } + if (tv_sec 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, The seconds value must be greater than 0); + RETURN_FALSE; + } + if (tv_nsec 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, The nanoseconds value must be greater than 0); + RETURN_FALSE; + } + php_req.tv_sec = (time_t) tv_sec; php_req.tv_nsec = tv_nsec; if (!nanosleep(php_req, php_rem)) { Added: php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt === --- php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/ext/standard/tests/time/bug60222.phpt
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt branches/PHP
sixd Mon, 12 Mar 2012 18:08:34 + Revision: http://svn.php.net/viewvc?view=revisionrevision=324165 Log: Test portability and coverage changes Changed paths: U php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt U php/php-src/branches/PHP_5_3/ext/oci8/tests/drcp_privileged.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/branches/PHP_5_4/ext/oci8/tests/bind_raw_2.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/bug43497_92.phpt U php/php-src/branches/PHP_5_4/ext/oci8/tests/drcp_privileged.phpt U php/php-src/trunk/ext/oci8/tests/array_bind_bdouble.phpt U php/php-src/trunk/ext/oci8/tests/array_bind_bfloat.phpt A php/php-src/trunk/ext/oci8/tests/bind_raw_2.phpt U php/php-src/trunk/ext/oci8/tests/bug43497_92.phpt U php/php-src/trunk/ext/oci8/tests/drcp_privileged.phpt Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bdouble.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -4,6 +4,7 @@ ?php $target_dbs = array('oracledb' = true, 'timesten' = false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); ? --FILE-- ?php Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/array_bind_bfloat.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -4,6 +4,7 @@ ?php $target_dbs = array('oracledb' = true, 'timesten' = false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); ? --FILE-- ?php Added: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -0,0 +1,42 @@ +--TEST-- +bind RAW field with OCI_B_BIN +--SKIPIF-- +?php +$target_dbs = array('oracledb' = true, 'timesten' = false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +? +--FILE-- +?php + +require dirname(__FILE__)./connect.inc; + +$stmt = oci_parse($c, create table phptestrawtable( id number(10), fileimage raw(1000))); +oci_execute($stmt); + +$stmt = oci_parse ($c, insert into phptestrawtable (id, fileimage) values (:id, :fileimage)); +$i=1; +$fileimage = file_get_contents( dirname(__FILE__)./test.gif); +$fileimage = substr($fileimage, 0, 300); + +oci_bind_by_name( $stmt, :id, $i, -1); +oci_bind_by_name( $stmt, :fileimage, $fileimage, -1, OCI_B_BIN); +oci_execute($stmt, OCI_DEFAULT); +oci_commit($c); + +$stmt = oci_parse($c, SELECT fileimage FROM phptestrawtable); +oci_execute($stmt); + +$row = oci_fetch_row($stmt); +var_dump(md5($row[0])); +var_dump(strlen($row[0])); + +$stmt = oci_parse($c, drop table phptestrawtable); +oci_execute($stmt); + +echo Done\n; + +? +--EXPECT-- +string(32) 88b274d7a257ac6f70435b83abd4e26e +int(300) +Done Property changes on: php/php-src/branches/PHP_5_3/ext/oci8/tests/bind_raw_2.phpt ___ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Modified: php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt === --- php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt 2012-03-12 17:40:24 UTC (rev 324164) +++ php/php-src/branches/PHP_5_3/ext/oci8/tests/bug43497_92.phpt 2012-03-12 18:08:34 UTC (rev 324165) @@ -5,8 +5,12 @@ $target_dbs = array('oracledb' = true, 'timesten' = false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -if (preg_match('/Unknown/', oci_client_version()) != 1) { -die(skip expected output only valid with Oracle 9gR2 clients); +ob_start(); +phpinfo(INFO_MODULES); +$phpinfo = ob_get_clean(); +$iv = preg_match('/Oracle .*Version = (9\.2)/', $phpinfo); +if ($iv != 1) { +die (skip