Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.41
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
pdo /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
bug_34630.phpt
1.54
KB
-rw-rw-r--
2022-10-31 11:36
bug_34687.phpt
784
B
-rw-rw-r--
2022-10-31 11:36
bug_35671.phpt
1.03
KB
-rw-rw-r--
2022-10-31 11:36
bug_36428.phpt
908
B
-rw-rw-r--
2022-10-31 11:36
bug_36798.phpt
1.05
KB
-rw-rw-r--
2022-10-31 11:36
bug_38253.phpt
1.32
KB
-rw-rw-r--
2022-10-31 11:36
bug_38394.phpt
1.2
KB
-rw-rw-r--
2022-10-31 11:36
bug_39398.phpt
853
B
-rw-rw-r--
2022-10-31 11:36
bug_39656.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
bug_40285.phpt
766
B
-rw-rw-r--
2022-10-31 11:36
bug_42917.phpt
954
B
-rw-rw-r--
2022-10-31 11:36
bug_43130.phpt
1.74
KB
-rw-rw-r--
2022-10-31 11:36
bug_43139.phpt
1.03
KB
-rw-rw-r--
2022-10-31 11:36
bug_43663.phpt
780
B
-rw-rw-r--
2022-10-31 11:36
bug_44159.phpt
1.49
KB
-rw-rw-r--
2022-10-31 11:36
bug_44173.phpt
1.92
KB
-rw-rw-r--
2022-10-31 11:36
bug_44409.phpt
1.11
KB
-rw-rw-r--
2022-10-31 11:36
bug_44861.phpt
2.34
KB
-rw-rw-r--
2022-10-31 11:36
bug_47769.phpt
782
B
-rw-rw-r--
2022-10-31 11:36
bug_50458.phpt
755
B
-rw-rw-r--
2022-10-31 11:36
bug_52098.phpt
1.42
KB
-rw-rw-r--
2022-10-31 11:36
bug_60665.phpt
1.13
KB
-rw-rw-r--
2022-10-31 11:36
bug_61292.phpt
999
B
-rw-rw-r--
2022-10-31 11:36
bug_64172.phpt
1.65
KB
-rw-rw-r--
2022-10-31 11:36
bug_65946.phpt
1.44
KB
-rw-rw-r--
2022-10-31 11:36
bug_69356.phpt
2.24
KB
-rw-rw-r--
2022-10-31 11:36
bug_71447.phpt
2.09
KB
-rw-rw-r--
2022-10-31 11:36
bug_71885.phpt
1.37
KB
-rw-rw-r--
2022-10-31 11:36
bug_72788.phpt
840
B
-rw-rw-r--
2022-10-31 11:36
bug_73234.phpt
975
B
-rw-rw-r--
2022-10-31 11:36
bug_77849.phpt
654
B
-rw-rw-r--
2022-10-31 11:36
bug_77849_2.phpt
361
B
-rw-rw-r--
2022-10-31 11:36
debug_emulated_prepares.phpt
1.67
KB
-rw-rw-r--
2022-10-31 11:36
pdo.inc
124
B
-rw-rw-r--
2022-10-31 11:36
pdo_001.phpt
1.02
KB
-rw-rw-r--
2022-10-31 11:36
pdo_002.phpt
1015
B
-rw-rw-r--
2022-10-31 11:36
pdo_003.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
pdo_004.phpt
1.06
KB
-rw-rw-r--
2022-10-31 11:36
pdo_005.phpt
2.86
KB
-rw-rw-r--
2022-10-31 11:36
pdo_006.phpt
1.35
KB
-rw-rw-r--
2022-10-31 11:36
pdo_007.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
pdo_008.phpt
929
B
-rw-rw-r--
2022-10-31 11:36
pdo_009.phpt
2.44
KB
-rw-rw-r--
2022-10-31 11:36
pdo_010.phpt
2.56
KB
-rw-rw-r--
2022-10-31 11:36
pdo_011.phpt
5.21
KB
-rw-rw-r--
2022-10-31 11:36
pdo_012.phpt
1.81
KB
-rw-rw-r--
2022-10-31 11:36
pdo_013.phpt
1.68
KB
-rw-rw-r--
2022-10-31 11:36
pdo_014.phpt
2.14
KB
-rw-rw-r--
2022-10-31 11:36
pdo_015.phpt
1.98
KB
-rw-rw-r--
2022-10-31 11:36
pdo_016.phpt
3.89
KB
-rw-rw-r--
2022-10-31 11:36
pdo_016a.phpt
3.89
KB
-rw-rw-r--
2022-10-31 11:36
pdo_017.phpt
1.97
KB
-rw-rw-r--
2022-10-31 11:36
pdo_018.phpt
8.48
KB
-rw-rw-r--
2022-10-31 11:36
pdo_019.phpt
1.44
KB
-rw-rw-r--
2022-10-31 11:36
pdo_020.phpt
1.07
KB
-rw-rw-r--
2022-10-31 11:36
pdo_021.phpt
1.57
KB
-rw-rw-r--
2022-10-31 11:36
pdo_022.phpt
1.82
KB
-rw-rw-r--
2022-10-31 11:36
pdo_023.phpt
2.15
KB
-rw-rw-r--
2022-10-31 11:36
pdo_024.phpt
1.24
KB
-rw-rw-r--
2022-10-31 11:36
pdo_025.phpt
2.07
KB
-rw-rw-r--
2022-10-31 11:36
pdo_026.phpt
2.1
KB
-rw-rw-r--
2022-10-31 11:36
pdo_027.phpt
768
B
-rw-rw-r--
2022-10-31 11:36
pdo_028.phpt
1012
B
-rw-rw-r--
2022-10-31 11:36
pdo_029.phpt
2.3
KB
-rw-rw-r--
2022-10-31 11:36
pdo_030.phpt
2.53
KB
-rw-rw-r--
2022-10-31 11:36
pdo_031.phpt
1.2
KB
-rw-rw-r--
2022-10-31 11:36
pdo_032.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
pdo_033.phpt
1.16
KB
-rw-rw-r--
2022-10-31 11:36
pdo_034.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
pdo_035.phpt
484
B
-rw-rw-r--
2022-10-31 11:36
pdo_036.phpt
608
B
-rw-rw-r--
2022-10-31 11:36
pdo_037.phpt
392
B
-rw-rw-r--
2022-10-31 11:36
pdo_038.phpt
1.12
KB
-rw-rw-r--
2022-10-31 11:36
pdo_drivers_basic.phpt
310
B
-rw-rw-r--
2022-10-31 11:36
pdo_drivers_error.phpt
447
B
-rw-rw-r--
2022-10-31 11:36
pdo_dsn_containing_credentials.phpt
1.31
KB
-rw-rw-r--
2022-10-31 11:36
pdo_test.inc
1.9
KB
-rw-rw-r--
2022-10-31 11:36
pdorow.phpt
309
B
-rw-rw-r--
2022-10-31 11:36
pecl_bug_5217.phpt
802
B
-rw-rw-r--
2022-10-31 11:36
pecl_bug_5772.phpt
760
B
-rw-rw-r--
2022-10-31 11:36
pecl_bug_5809.phpt
796
B
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- PDO Common: serializing --SKIPIF-- <?php if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); class TestBase implements Serializable { public $BasePub = 'Public'; protected $BasePro = 'Protected'; private $BasePri = 'Private'; function serialize() { $serialized = array(); foreach($this as $prop => $val) { $serialized[$prop] = $val; } $serialized = serialize($serialized); echo __METHOD__ . "() = '$serialized'\n"; return $serialized; } function unserialize($serialized) { echo __METHOD__ . "($serialized)\n"; foreach(unserialize($serialized) as $prop => $val) { $this->$prop = '#'.$val; } return true; } } class TestDerived extends TestBase { public $BasePub = 'DerivedPublic'; protected $BasePro = 'DerivdeProtected'; public $DerivedPub = 'Public'; protected $DerivedPro = 'Protected'; private $DerivedPri = 'Private'; function serialize() { echo __METHOD__ . "()\n"; return TestBase::serialize(); } function unserialize($serialized) { echo __METHOD__ . "()\n"; return TestBase::unserialize($serialized); } } class TestLeaf extends TestDerived { } $db->exec('CREATE TABLE classtypes(id int NOT NULL PRIMARY KEY, name VARCHAR(20) NOT NULL UNIQUE)'); $db->exec('INSERT INTO classtypes VALUES(0, \'stdClass\')'); $db->exec('INSERT INTO classtypes VALUES(1, \'TestBase\')'); $db->exec('INSERT INTO classtypes VALUES(2, \'TestDerived\')'); switch ($db->getAttribute(PDO::ATTR_DRIVER_NAME)) { case 'dblib': // environment settings can influence how the table is created if specifics are missing // https://msdn.microsoft.com/en-us/library/ms174979.aspx#Nullability Rules Within a Table Definition $sql = 'CREATE TABLE test(id int NOT NULL PRIMARY KEY, classtype int NULL, val VARCHAR(255) NULL)'; break; default: $sql = 'CREATE TABLE test(id int NOT NULL PRIMARY KEY, classtype int, val VARCHAR(255))'; break; } $db->exec($sql); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); var_dump($db->query('SELECT COUNT(*) FROM classtypes')->fetchColumn()); var_dump($db->query('SELECT id, name FROM classtypes ORDER by id')->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_UNIQUE)); $objs = array(); $objs[0] = new stdClass; $objs[1] = new TestBase; $objs[2] = new TestDerived; $objs[3] = new TestLeaf; $stmt = $db->prepare('SELECT id FROM classtypes WHERE name=:cname'); $stmt->bindParam(':cname', $cname); $ctypes = array(); foreach($objs as $obj) { $cname = get_class($obj); $ctype = NULL; /* set default for non stored class name */ $stmt->execute(); $stmt->bindColumn('id', $ctype); $stmt->fetch(PDO::FETCH_BOUND); $ctypes[$cname] = $ctype; } echo "===TYPES===\n"; var_dump($ctypes); unset($stmt); echo "===INSERT===\n"; $stmt = $db->prepare('INSERT INTO test VALUES(:id, :classtype, :val)'); $stmt->bindParam(':id', $idx); $stmt->bindParam(':classtype', $ctype); $stmt->bindParam(':val', $val); foreach($objs as $idx => $obj) { $ctype = $ctypes[get_class($obj)]; if (method_exists($obj, 'serialize')) { $val = $obj->serialize(); } else { $val = ''; } $stmt->execute(); } unset($stmt); echo "===DATA===\n"; $res = $db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN); switch ($db->getAttribute(PDO::ATTR_DRIVER_NAME)) { case 'dblib': // map whitespace (from early TDS versions) to empty string so the test doesn't diff if ($res[0] === ' ') { $res[0] = ''; } break; case 'oci': // map NULL to empty string so the test doesn't diff if ($res[0] === null) { $res[0] = ''; } break; } var_dump($res); echo "===FAILURE===\n"; try { $db->query('SELECT classtypes.name AS name, test.val AS val FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id')->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_CLASSTYPE|PDO::FETCH_SERIALIZE, 'TestLeaf', array()); } catch (PDOException $e) { echo 'Exception:'; echo $e->getMessage()."\n"; } echo "===COUNT===\n"; var_dump($db->query('SELECT COUNT(*) FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id WHERE (classtypes.id IS NULL OR classtypes.id > 0)')->fetchColumn()); echo "===DATABASE===\n"; $stmt = $db->prepare('SELECT classtypes.name AS name, test.val AS val FROM test LEFT JOIN classtypes ON test.classtype=classtypes.id WHERE (classtypes.id IS NULL OR classtypes.id > 0)'); $stmt->execute(); var_dump($stmt->fetchAll(PDO::FETCH_ASSOC)); echo "===FETCHCLASS===\n"; $stmt->execute(); var_dump($stmt->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_CLASSTYPE|PDO::FETCH_SERIALIZE, 'TestLeaf')); ?> --EXPECTF-- string(1) "3" array(3) { [0]=> string(8) "stdClass" [1]=> string(8) "TestBase" [2]=> string(11) "TestDerived" } ===TYPES=== array(4) { ["stdClass"]=> string(1) "0" ["TestBase"]=> string(1) "1" ["TestDerived"]=> string(1) "2" ["TestLeaf"]=> NULL } ===INSERT=== TestBase::serialize() = 'a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}' TestDerived::serialize() TestBase::serialize() = 'a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}' TestDerived::serialize() TestBase::serialize() = 'a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}' ===DATA=== array(4) { [0]=> string(0) "" [1]=> string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" [2]=> string(172) "a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" [3]=> string(172) "a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" } ===FAILURE=== Exception:SQLSTATE[HY000]: General error: cannot unserialize class ===COUNT=== string(1) "3" ===DATABASE=== array(3) { [0]=> array(2) { ["name"]=> string(8) "TestBase" ["val"]=> string(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" } [1]=> array(2) { ["name"]=> string(11) "TestDerived" ["val"]=> string(172) "a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" } [2]=> array(2) { ["name"]=> NULL ["val"]=> string(172) "a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}" } } ===FETCHCLASS=== TestBase::unserialize(a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}) TestDerived::unserialize() TestBase::unserialize(a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}) TestDerived::unserialize() TestBase::unserialize(a:5:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}) array(3) { [0]=> object(TestBase)#%d (3) { ["BasePub"]=> string(7) "#Public" ["BasePro":protected]=> string(10) "#Protected" ["BasePri":"TestBase":private]=> string(8) "#Private" } [1]=> object(TestDerived)#%d (6) { ["BasePub"]=> string(14) "#DerivedPublic" ["BasePro":protected]=> string(17) "#DerivdeProtected" ["DerivedPub"]=> string(7) "#Public" ["DerivedPro":protected]=> string(10) "#Protected" ["DerivedPri":"TestDerived":private]=> string(7) "Private" ["BasePri":"TestBase":private]=> string(8) "#Private" } [2]=> object(TestLeaf)#%d (6) { ["BasePub"]=> string(14) "#DerivedPublic" ["BasePro":protected]=> string(17) "#DerivdeProtected" ["DerivedPub"]=> string(7) "#Public" ["DerivedPro":protected]=> string(10) "#Protected" ["DerivedPri":"TestDerived":private]=> string(7) "Private" ["BasePri":"TestBase":private]=> string(8) "#Private" } }