Annotation of embedaddon/php/ext/oci8/tests/drcp_privileged.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: DRCP: privileged connect
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded('oci8')) die("skip no oci8 extension");
                      6: if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user");
                      7: require(dirname(__FILE__)."/details.inc");
                      8: if (preg_match('/Compile-time ORACLE_HOME/', $phpinfo) !== 1) {
                      9:     // Assume building PHP with an ORACLE_HOME means the tested DB is on the same machine as PHP
                     10:     die("skip this test is unlikely to work with remote Oracle - unless an Oracle password file has been created");
                     11: }
                     12: ?>
                     13: --INI--
                     14: oci8.privileged_connect=1
                     15: --FILE--
                     16: <?php
                     17: 
                     18: // Connecting as SYSDBA or SYSOPER through DRCP will give ORA-1031
                     19: 
                     20: require dirname(__FILE__)."/details.inc";
                     21: var_dump(oci_connect($user,$password,$dbase,false,OCI_SYSDBA));
                     22: var_dump(oci_connect($user,$password,$dbase,false,OCI_SYSOPER));
                     23: var_dump(oci_new_connect($user,$password,$dbase,false,OCI_SYSDBA));
                     24: var_dump(oci_new_connect($user,$password,$dbase,false,OCI_SYSOPER));
                     25: var_dump(oci_pconnect($user,$password,$dbase,false,OCI_SYSDBA));
                     26: var_dump(oci_pconnect($user,$password,$dbase,false,OCI_SYSOPER));
                     27: 
                     28: echo "Done\n";
                     29: 
                     30: ?>
                     31: --EXPECTF--
                     32: Warning: oci_connect(): ORA-01031: %s in %s on line %d
                     33: bool(false)
                     34: 
                     35: Warning: oci_connect(): ORA-01031: %s in %s on line %d
                     36: bool(false)
                     37: 
                     38: Warning: oci_new_connect(): ORA-01031: %s in %s on line %d
                     39: bool(false)
                     40: 
                     41: Warning: oci_new_connect(): ORA-01031: %s in %s on line %d
                     42: bool(false)
                     43: 
                     44: Warning: oci_pconnect(): ORA-01031: %s in %s on line %d
                     45: bool(false)
                     46: 
                     47: Warning: oci_pconnect(): ORA-01031: %s in %s on line %d
                     48: bool(false)
                     49: Done
                     50: 

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