File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / oci8 / tests / password_new.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:59 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
oci_password_change()
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on thes
require(dirname(__FILE__).'/skipif.inc');
if (empty($dbase)) die ("skip requires database connection string be set");
if ($test_drcp) die("skip password change not supported in DRCP Mode");

// This test is known to fail with Oracle 10.2.0.4 client libraries
// connecting to Oracle Database 11 (Oracle bug 6277160, fixed 10.2.0.5)
if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 &&
    preg_match('/^10\.2\.0\.[1234]/', oci_client_version()) === 1) {
    die ("skip test known to fail using Oracle 10.2.0.4 client libs connecting to Oracle 11 (6277160)");
}
?>
--FILE--
<?php

// This test will diff if either the client or the server is 11.2.0.3
// (or greater) and the other is 11.2.0.2 (or earlier).  Both client
// and server must be upgraded at the same time.

require dirname(__FILE__)."/connect.inc";

$new_password = "test";
var_dump(oci_password_change($dbase, $user, $password, $new_password));

if (!empty($dbase)) {
	var_dump($new_c = ocilogon($user,$new_password,$dbase));
}
else {
	var_dump($new_c = ocilogon($user,$new_password));
}

var_dump(oci_password_change($dbase, $user, $new_password, $password));


echo "Done\n";

?>
--EXPECTF--
resource(%d) of type (oci8 connection)
resource(%d) of type (oci8 connection)
resource(%d) of type (oci8 connection)
Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>