????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 18.218.75.143
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/mysqli/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/mysqli/tests/bug66124.phpt
--TEST--
Bug #66124 (mysqli under mysqlnd loses precision when bind_param with 'i')
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('connect.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
$table_drop = "DROP TABLE IF EXISTS `bug66124`";
$table_create = "CREATE TABLE `bug66124` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8";

$table_insert = "INSERT INTO `bug66124` SET `id`=?";
$table_select = "SELECT * FROM `bug66124`";
$table_delete = "DELETE FROM `bug66124`";
$id = '1311200011005001566';


require_once('connect.inc');

if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
	printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
		$host, $user, $db, $port, $socket);
	exit(1);
}

$link->query($table_drop);
$link->query($table_create);

$stmt = $link->prepare($table_insert);
if (!$stmt) {
	printf("Can't prepare\n");
	exit(1);
}

echo "Using 'i':\n";
$stmt->bind_param('i', $id);

if ($stmt->execute()){
    echo "insert id:{$id}=>{$stmt->insert_id}\n";
} else {
	printf("Can't execute\n");
	exit(1);
}


$result = $link->query($table_select);

if ($result){
    while ($row = $result->fetch_assoc()) {
        echo "fetch  id:{$row['id']}\n";
    }
} else {
	printf("Can't select\n");
	exit(1);
}

$stmt->close();

$link->query($table_drop);
$link->query($table_create);


$stmt = $link->prepare($table_insert);
$stmt->bind_param('s', $id);

echo "Using 's':\n";

if ($stmt->execute()){
    echo "insert id:{$id}\n";
} else{
	printf("Can't execute\n");
	exit(1);
}

$result = $link->query($table_select);

if ($result){
    while ($row = $result->fetch_assoc()) {
        echo "fetch  id:{$row['id']}\n";
    }
} else {
	printf("Can't select\n");
	exit(1);
}

$link->close();
?>
done
--EXPECTF--
Using 'i':
insert id:1311200011005001566=>1311200011005001566
fetch  id:1311200011005001566
Using 's':
insert id:1311200011005001566
fetch  id:1311200011005001566
done

Youez - 2016 - github.com/yon3zu
LinuXploit