Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- PDO_4D: send/receive jpg/png/gif images in a picture fields --SKIPIF-- <?php # vi..

Decoded Output download

--TEST--
PDO_4D: send/receive jpg/png/gif images in a picture fields
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip no PDO');
if (!extension_loaded('pdo_4d')) die('skip no PDO for 4D extension');

require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';

PDOTest::skip();
?>
--FILE--
<?php
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');


$db->query('CREATE TABLE IF NOT EXISTS testImage2 ( id INT, image PICTURE, type varchar(255) )');

$png = "89504e470d0a1a0a0000000d494844520000004e0000006908020000001b6182c4000000097048597300000b1300000b1301009a9c1800001b10494441547801ed5b799c1c559daf57dd75f57477557732e99e4998230999241088063441aef0f1588d7ea2bb2cb0a2aeaea8a0fb11810565575d143faecb475d2302062f40d998cd877557574522244834010c041630210933b966ba6732d35dddd35d4777d7dbefabd747cd4c469dc83fb3cefb546a5ebd7ed7ef3ede0b59fe86db853f8f22fe7980c9a09c03f5ff23ade7a83a47d5598d8139069ed5e49b66f373549d0631b3ba798eaab39a7cd36c7e8eaad320665637cf517556936f9acdcf51751ac4cceae639aace6af24db3f939aa4e839859dd3c47d5594dbe69363f47d5691033ab9be7a83aabc937cde6e7a83a0d626675f31c556735f9a6d9fc1c55a741ccac6e9ea3eaac26df349b9fa3ea348899d5cd73549dd5e49b66f373549d0631b3ba798eaab39a7cd36c7e8eaad320665637875fc5ddd7080951fa2a4e78caa9b0ca29db79e3efd9c0abc6c063b9626747ba64db7c2ba844759d7d0a76c5c9551cbbe20ac9b68578ac31aa89bae8b0bd69821051038fa64634352cab4450f02bfa60a04858d7904c30152614a845a55a2d6cbb4a05154760c8e56f591230161b285905344e2ae434ae3e637fd6a469040180f5f7bfdcdbbbcc2c143cdb4ab4c7fb078e250dd573f2eb5e7f4e58d49f78f2b9dc88a9296a4456c3119578b6401ca76663262ad85581788e87ba281b359735aaaaaa477422115aa1b6e500180c5515a568dba500eb68e825a865c1165d17a36ccb9289a01b46d96293340b70773a0c3c154ecc083092f3d29655b0cb6657c7828123fda97949c1cb7dfcc6775d7ee55b5551d8b7ef6dd9b17c2a69e8f164a13c6e24a3b572b9126e6da85a7501ed60369f2fd1d1ece0e8c8c9a1e399ec60667864cc761c226982031c1821418d13816d5d5125551ec96645958aa4823d2892029a83f0530b159c195395b393471983a1704e43a5609aa9b461e6f38a4a1c2b373f9578e5c0ef6ebee5431fbde6cd62ade8856256a92c88110d2c314db1195105202558f239616cb494cf993b773dfdec6ff7ed7ffeb81b52e3f134a86cd9ae55a9b5c5352daa9a853c46b5270ca7e6140a96aa695385f65503555335d3cc603d80aac9349b1d78d73b377cf6d6ab009b6de5a8a724daea508271d14d1528af0401e375c04cad32eacd21a88fe549d2a0631961d3b77ffc9f5bff2744a27ac7198a24e78a769ba19ecc99c5425e059d1526ab53e1c40c7f12a84d92f22d8249a08114e22a0a5535bafde16ff076bc01d8d32f0eeedaf1ec91e3c74e1c1b766bb5722e2f47d448a44d8986e627e6752f3aa36b49dfc28e64ef99f3f436360e437216113c06b3e8d6f444d4cc8dd79c68320d7a0af77fff375bbfbf6dff91e3b29156d5841ad36a2e653a4cd5c254ae12772ab4a70f2ad3b454c23ec23e955cc7d475d52e6413ba522ee51ed9fe6d95504d659be6d4fbe7cf6c79e08187e2890e91aaedc9a455f38868317de3d8ae2f5eb20aa5a32e4c6baf5dbbfce2b5972c5bb1b023cd006653609272498d301c0060808dcab1feecf71f7ce4e7bf7af968360f1d96363a472da646a084ad621ee4453d5842f3bb2e0b7effc17a55a842a6286140c204e09fe8831aa28e442ad5aae3944ffee0077775a5a45a9840afe229e705491576ec3af8f2fee38b7bceb25c62d79472ad2a54b01f5d518d48743e1e54c22129678eef7d72ff4fb63ffcd4ae7d4ed99bd7b9187031644972980292aacaa4b98a4737948b2e59e3daead123c747f3a38a1c2adbe35e8db445544872886d6d429931a854a8cab256ab5902a085c5b02b82e7854261c173621165287378f3e6afacea4b4a61505ba882149244602605e1e73fdf3370e2b84d89170ad350155ba1616c1910071f81d42071463c3a3f678f3ffaf8ae4776ec104472ceaa3341debc5d52c361d7ab8500bb00958b872c59b9e40d17ae7f74fbf642b960e80625e478ff40674fb70b4346083ef1704d3751df4dc0c2a93f00e7c9dc18380e9a1d8f1e8f48b200ee05d4bfdbfff457be7cdbead59d7c64693c0f960341b86aad8820052bd8c1740ffb59d1a9a2607a2227142d35743c7fe73d0ffdd55537ee3d9451b544ae2cc8a168365f643d49a45472121a6d93e903dffb7a5c813683349457ae3a77e8d811d66162993155c510a95684781ceab4963f79520c57e3f108ad99f678feefde77d5d5efb9a829a221cf13c312e3617002151e7dec9903874fd0484cf4eac61c5e01e41c1e0ff1ea1807053ce2946d570c9743214937e034442bd5daf0486ef7ee7d4b7a7a7a17778c7b241a49848966e69d981e07384983c4126449ef9aad0f6d9d974c144b105d8d0a61ccc6813d4daadae314e64b092976d11225117c5b2e0cc3705c7ad9eb3e71d346c716a08aa021a145426a042b71bdd2b496a18aaf66a8e4888a20aa809654264b95aab11618ea5cce04c3132511d13b06fa473e72dd6777ee1ea40e9b134b70e5c481a1367dcbface0f7de0eaecf09063dbd06fbc3df89e310363b05b13e02aa002af08ef6239dfd3bbe0a65bae713d219da82b4cb06ecd66760285c32979615954e1eb406f53aac855098f4265a6c69b0f7a534b966c8889aac9b6430a056a17a955ac75f7ac76bcf8b51ff9e4d3cfe6fc59eb2f2864d4805f58a6ebaeddb8f6bcd58aaac2790cf6e1f5d30115160c83a13de1835985a1658bcff8e8751fecee24b08758efe15ffc86eb214ed5094b322fb55588efc7b36fb8758cb8cc184a50241581566c2045d717b41b692d66484a2297b57b7bcf5d90ecbef29d57628465d799535158054486d0c25db9e1c60f3b96095e63d34e2c33065596196fc4551d1e62363bb4b0bbf7ddeffdcb4bd7759a2536f1a6afddf9df3ffb2967b0e642f8c4230a36f55898029088388e874388b724d878f0131ece7b8e4d1109819e05d3c2bbea28d9d11cb55d5556562f5ff9a6b75c0fcf09f303425583108d6a8a853a4af7c2d825eb2f458599fd896566a072f7080109e8065da7c7c97baede78e53bce868e0549b76cfbf53ddffaf754ba63e212ad2fe25300df4d578603d9ea01570136d16719e0545654592461518b696af7e2deb26565f3c39e26e54be5cddf79ac358a30a5802d41628d8470cd07afb0ed1c666e75f06bd3820a170f9124a244785bc01080c4537104db2c1a3aa2b48c6b1d7dffdfbee36fae58037a421a7fb8edb97bbff7431a9e2fab5dccc0d0c9482d14618a1162526e69006d1360ec04f143f0410bdc4c0477906b2259b66797ed3c73858892b3044f89dc7dff966c89003c1b7012e65d83718857c2fbccaef045e72d2fe4faf518f3733c075bf1a35f7c9cb2403c8060d7b5a029e155424b1041a5c4090bbeb271cc8b2e78fd07ae7e3380cc9bf4f903d5cdf7ff20336c27f40e4f6c837f06c9c1b430adcdc93d2263a36c5b5c09357f085426711da0e53f32efda6578c767c5236ac4285a95871f7b01dcc48d36efc69819418246df70fe6a5984956d05e88056e4e4e25d836f64032030106fa807172e4221ef09a64c6cc9d0f2859184a1dffbcd9ba0061064a5d2e4fa1b6ee8ef1f82dbad687ac12c4015f3a24a75851c9cf934ebd4868583aef55c8b0a0aa5f28f1efaa5ebd579c7b61a4bfab35fbcfe32356658307df05b7da901b22633301403df8a850909b480cea88f788bda21d989c0cdf6728244effdde1d201d1ec8c63bdf756376a4d0ddd91b8be8b069180eb9e52e7e489eec73f3c967fa667b202a120b50fba2ccd83516319e7be1c5a1573c6ec96a1eb4360444833dc7afbd8b4947473b36d39411f08b5841c8d3881e9a70a23728a930a3c1f68a05108512c1b19d2197da5ffed7cfc3b4e44d0154bdf6efbf31961997481c4e3cac194a4864120299e1aba2feaa146829680d442d2151876711d50dcf157ef3cc337c72be28af33b52cd0bededee0ba90d816558370a29322eb241cf32a845408f41370365eec2f39855b3f79fdb9e726d0011116e2b247b73faec553f0b34dd302abab9ace170055b9e404d73b8d7a535cf9586ed2cb05bbeab2b59e786c376f6faec5033d34f674f754bcba78f33e0c54f82ea02f74236fc29b310cc42212aa39ae436d6871dbca2675edbd57be6de386b3154d383248a1727ff4939f75762d3f70e0b01649c5e206c41ba36cb704c686dee78ab139e79f5e813481d7b037f098cfcc89c3af1cc55a4c58a0ed98c2634a1abb40cbc2ae0ea4e3386ab83e63a0b6bc96c076ac62b1067105797d0c78a2bdfab57dd77fe2fdbccbfefdaf7cf18eafe8f10ea4cd96ad58d33f90c50ee02d828155b90d8ccda0a616cffd05663dfd2aec1cac80ed3b0aba9e06336345cba5503d0cad7e092e9748ce0b2e06e5d462e0e00f9c6db4b670157a4f8139c9f7f52ebae38bffc8fb6cf98fbd5ffaea3721c62c83a76a5060715d87c043a44312611aa2917998a4965878d028d828f2ba8d2f96ef853981556bb64caa2019082b8085d08e0a288c0a14cf8963a33e3331cc869404272c1f8bd404180de952fe29b648ea1b62de8ab71a938e0c1ed664cfae3068bffb9daff29ff63c39b863cfce6c76d830528905ddd4a560aa362d41c159930a9fd0672a709457753c484fa030d77f26859b8d492390b099d4c23f811a16be2225de28c89630579b7f727f85d7939a6815338994ead6f29bbef679d80fa8f56c86de79d73dcfff763f12b6f982353692279e0a453d3a3c0cefa23127fb0b1dc8fe7011f23fc5b0c2a9ca7351ecd74061219d82ec4c9d1503bf70b769c2e4ad5f5dc1a9d60d1b6bf4d18abf7c759752840d48943289a5018e420f30151e36461032d9fe0b2e3eeba57d8f7ff1731f5fb726013d84c6bbbe7edfe1810ce24c6341a7a8687015e03344e286a8781ce5127124a9c596fe4cad17a72ad27940ee24d55aefd4407a6b4ca386fe3092cd51a834eb8db1f5e42bff745cc6b7d0b52c0fee17b84f50973e37237e6a70140c0fdccefe575ef8f075576d78eb99801386f4eebb9fd8b6e5a7ba9676bd90e3ca31cd80c0142dbb0cc99115e6d3ca2ddc33ad18289c81c1517c2d5839ee033653e781bed356f9900910ca81f3890649f9f8ccf11119390d8781c6900bb78906f6876f40cb090bbe5cb5a2e733b7be1b4e26e08469b9ef816dede9de8205a1942166d046d08a083ee061405ca163e06354f054ea11395f126fc0c9398a393a44039a7924d8ec00dc63c2a667d36c9f5c690203efad51142454a7b03d563c78e845e672370aa44614e052fad082d484caf019f8afe7bfb6ebdb9b3f7dd264933ef742f1868fddacd6a209a3039981a86ae0300a70a2e064c2688bba9e0dfcd96e5914ebea8e4fc2df7538c30a6760c7f59a3219e4398ee2a6040567401da86cc6db10ec66d1987f738af2f20b07a14d2165dcb4a24758f05d4ad4a08a29f290924d48411172b77fee4e34ced7d55dbbf6fcc38db775f7242c6b243f34222b64ecd8094ca18aaaed08632307b4185bd9951ca4ec6a7609fe063ea7966a254f9d6c192902209b3a382c53f9963d275c51fde4797d10877602a336a6e32e5dcd575e2cc0b405391c4057c08864464798526c702f2ae1b283f8978852cdcd0f253ad2e323598d580f6ed9cc33ebf0633be2c697bf70331b835c02c34800a5604e24fbfcbc8453120e1d3ab4e9ce2f456251f03cf7c2d19f9772a172ebc72e3fb8218b4fbd3d5d304ba974f7b29e794f3f7be29a6b3fd9d1d153f698d78d5fab725d098799f3d2127e7078d9c1d99746903e772d10b9e60a38045bda436a16092166245adeca1b9a01eeddbdf7d8f0a80bf5c9cf35f81ec2389facb88e2c793123d17f60dfd2c5a94f7de2268cb7e082a8025ccae5cbce58b27451d3b7e4c3826f4ccd3f7ff1180e8519220db1be5d960a0e25b08f485c3aeb9c3e3cc181300e2fbdf86cc28850cf85a71d57f442c04882c927a512e10f428d8920a5e7e0d4a398cfb52f5ec227e4d0e2108c6f66f7afea61407339ccc652b2b65d8e496d8a28c68df45bdeba71c35ff4f13c4dbd1f6da38dada35d6ea4172a0dc66906c763a3f9b26d958be3588fcb675bd4003ccdf57805bfe26803a60efae491ed4f298ae138d4152c4d3564aa706dc97bd68409676acc1b9389eb52afa220b2a855e879af391b3d5dff70087bc3c91d8407ded1233b1f87a35c21f5a347ae1a5a9eda91c1ec2597aefbd0356fc4564c8bd4bd2de48190896b483ea23a7cf2a70900e755bce3d1051df3bbc272123f71ecf23ec85f4210b0158e416001493004ba08034fe673aa2a6b71b6806d9b55c16c193f7f300c4cf0411b381932ce7c03557dddf96bd0d2dc9e3f42d8fecb1707074f02dbe8d95272a422baa60557d1ad086a58e9ee5a0eaf0805fbc0b6b05dbe3f54f8839f8275f6d94879a0521c2f2339c08d4dd00020370dfec78658fcdb9801b87f78e7de42d9399ac952a2aab14830b4aa9b7af446096489a14e415824507168bb381d39674582a30fa772983f9363f33ff8e0564274ae93fcf1f55718b889c575cb2c44e2ead66dfff5f8ce9d5d9ded65db9c9f40efaacd2e29d4dd46d7f760e530534b484d117e8d2154a7b8a2448e0c1c1a2b401a2688985b1b2fbb5548d1433f7e7cef9e2744717ed1a27012d9ed883d4f09621c68743c24b1189febf178b9580cc2cc0e01fc228529a8d2a6aaa027e0c43d8ad5e75facfb192cfc7e466f0a6f50e8178f1deeefcfe0800f52dd22a93f43b86cb25c93228b6d5a2a379c3d72a8df2e80d98abf45d6c82f2ca3897f2aa4947d071407fb6442e91b17846f7a444ba3a4926803b221d560759c26c19ce53d72f0e5c30fef7c2eae77d8c8cc693ae4335f26679fbdb2542a8f9b26860bd495658656100d4cc6660f9a2098568585da76210783b93099d8f8f60b38eb82d1b022128890f87bbf7b1f5205488910ff0a033c22a41dd9c910a5e1e48254decc297204a75789f969239d7ae97f9febe94aa9890eac85a37ebc3112595faef8158d255d8388c73a283a328a0c117973ac8cb5352ce12b24be0fe86470a940db543909d7db7190b94fbb746c7070145cc3d0148702134c73b84d63274e0da5ceaac1a288d4b4f3715959bcb877edeaba52c0bcc74d072ec0969ffdfaf9a7f727d22b7c9232cf8f8fe5464bac3a7654652e05d20855d7c6a582058b60e534ee9d961c150f53f16a923f94c6f140e29930044c36aede98f9314cad2a1128d866c13e002dff9444164c27b40e90d0b6694c4d488246bda8aac671b5c071f3b288fca7cf781313a8e05ecb36130a41fe19eee78245f17fbae506cc992b31e70c2c138da9fbf68dfecb1d9b13a99ea4b1a0e83b79f80924e54be3ddd2c0cda66685438b4fee6737dba1bb6b422386e600130d6756107bf4e948cdf7492ac0d6f121801cd0ae5c71be7f2147c0317e2a95769193abc0e4d4235804e58a6ce078068ec438529dfe252455d1949a2778b66b9a8b0cdc3ec82593527b5abbed333775329e63d6a5305ee6d1e5fbdeffd1dedea5e6883d9ab3313f7e0dc2894f584c160d05fd123647a0b4e0f431cd6d54e0f77a151c812b54b91c232c1721082a57a4fc7ca53da68c65711c8cc45f2e9bcd20b422610fde28cf0dc09c62063c8804c06591980e012b174d9c682ad4ee48a9278e0ca8aa55b646bf75ef57579db510b8c3333c6ec5a311045e37def25922e9030323bdcbfa860733a22f54d86a10b4df47556cba05e754e0d0d234035442c624e16743821d6bc0a15fc0c6e9cef6ce94aec882ae2770c3099b9088cbc274e8203cd482cce2d134380938b3cda2030e8a530b0c9cbe8c0f1f812e58b36ae5d607eeefeb9907c3c64fc300e78181d19b3ff585679eda3f2fdd2da969907441673a9b1b642469d80ebe8753dc460b823731b062511f6489b300736584d6292267444dd1926983d9e49a95880821c85de34eca9a7392175ef89aed3b9e2c96bdf6744f8561418329c18d0ab6159cbf289e4dc56ca61fa704b82c83b0c12a9876d94ab4097143bbfc8a8d1ff9e06538b08165805161b71305989617ff6dd3778e0e8e2eee5b319829b427bac02f1de91ee64efb70f2f0804b220315df4db16413fcdec2e144178e058e17d4e1b50d1ce977cd9c1e35c0c0c81936dd00a571fe77f9151b2445dbf7bb8303fd1938a1f0267000c364c877f4990291a8d19e64b9752b6f17a1dcdc7357adfcebb76f78e3fa35b8ae8402042412ec14170990db6ebfe7c9e75f3a7c68e0ccbed78c5b427b72c1f1c163a9f422d31a83145441066ac176c1747100c31c6efeae5b3336e71f2ef57c1f684334d4a19311cd77f52d4f2fec6c0da62c4c570ddf051384f5eb96ad5bd787e8f7d77b76effcd59338132a948b25684bff6690220aa2a42126c3c5ad654b96ae5f77c185e7ade4eac7d770ec2a1a00c6b5b41dbb0f7e6dd3a66a581b38767269dfdab19c8994bf0bd148ccb31d0b5abd68e7f82d0376a60c54120d009295177ebab9b349a04ee4de7aaf3a52787e1cd9b4401270eddae56f7bd3a51bdfbe143cc66f0ac05592c51056820f0cdf108c5df70dfd280f22572810abec79c8b146909e6001008f11b95f8d042f4ec775780e1a05b4d93cddb573ef5df76d7db97fa0ab7b79269b49a7d2c8e6411d026b70b70c3d0550a1bd71eb10d68bb195e748be3f07b69df16d34a89f74ca00afea46b2581abafb9e6f9cb542b50a1ecee31801a7a83928a4262a9b1580dcac072b007ed20c70958f1ea3870e1fdab6edc7432732993113210b62207835dc8d61167e4a81584da5d329d4d29481131a5ccf1dcdb3a822dd6ec4e242217f327322452bd6e0907f2dc9b5e054399685a46f150b52474176825808e8e5582c1a8f46fdfc08866b2ae36a90118553123936942113b76368263b74e085fe03c78e0d1d3fd17f343b786cb0b3ab974d2dc6119a798ecac4a711a3b16113cb5438f1fb8ca98ab330f0062efde206cad0c0e174cf3c9878a760422dd597ab507ebeca2d0dfc5db44fc85cf8fd9078c765665cda20f0902422933af1b3c3474036f021bfdca029b8bba439adacbfc617c216200c503f4d35595f7dfa3f33a62ae0446a33aab5c3004abd4b31b3a6c126b2088dafa2e14416c5a714fc5ecb6660227a63590d91bb89ecedb8ecfe321c265c01405e05ea0b89084fb20da39bd95eb046d390e1c81ecada71c0b1605776651d72e92f02e339218ce23b98e63d6350b1355986370f2d87309a1dab6393087798f70acd2ed272a94542e2b17b8028781385fa37d6b9f022a5eaff80f6fa5f0c469de2468b02f5e5276ef00b5327451b6c829c33df2be00484a2dcf04c9bc3ff5065c6a0b2b33678683812b32d5cb95263005b426a0b6124b6c51c091f061e2b322fc1676c041510e58ac0d4a3ebb15edc619ebabdfab5fb802ea32c6fc63ac2796427c2704b02c1dd2935d0d469d13263500d3da1885ac942a204517505e98b42a1003f9f193096c4629219d40ab693e50b5396e70e0932189d319debb6ee64043be0bf19f04fbc9bb1b51625cc78402bf9ee17f38438b4135dbfe6c05356660c2a5c705b29944dfc9f0b44988c5771aa87a084e7cd3d975d378014321714856da5ee36c1b56d4a1f7e8114e0cd930fac27fae283902a01a65a40f2ac5ad565cc8de807a13987d99f998ffb63df330695e3356268f525c18a5aab8efd6265667638d6a9e4fbc90de51cd815b2b82893948a47d1c27014d0abbe2cfbd463d10f177dd6835df26053fcd1e5ff00bbcae5446b71dc9e0000000049454e44ae426082";
$img = hex2pic($png);

$image = tmpfile();
fwrite($image, $img);
fseek($image, 0);

$stmt = $db->prepare('INSERT INTO testImages2 VALUES (1, ?, "$png")');
$stmt->bindValue(1,$image,PDO::PARAM_LOB);
$stmt->execute();

$r = @$db->query('SELECT * FROM testImage2');
$l = $r->fetchall();

function hex2pic($img) {
    $file2 = '';
    $n = strlen($img) / 2;
    for($i = 0; $i < $n; $i++) {
        $t = chr(hexdec(substr($img, $i * 2, 2)));
        $file2 .= $t;
    }
    
    return $file2;
}

$db->query('DROP TABLE IF EXISTS testImage2');

?>
--XFAIL--
This bug might be still open on pdo_4d 11.3 ; no way to upload picture in 4D ATM.
--EXPECTF--

Did this file decode correctly?

Original Code

--TEST--
PDO_4D: send/receive jpg/png/gif images in a picture fields
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip no PDO');
if (!extension_loaded('pdo_4d')) die('skip no PDO for 4D extension');

require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';

PDOTest::skip();
?>
--FILE--
<?php
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');


$db->query('CREATE TABLE IF NOT EXISTS testImage2 ( id INT, image PICTURE, type varchar(255) )');

$png = "89504e470d0a1a0a0000000d494844520000004e0000006908020000001b6182c4000000097048597300000b1300000b1301009a9c1800001b10494441547801ed5b799c1c559daf57dd75f57477557732e99e4998230999241088063441aef0f1588d7ea2bb2cb0a2aeaea8a0fb11810565575d143faecb475d2302062f40d998cd877557574522244834010c041630210933b966ba6732d35dddd35d4777d7dbefabd747cd4c469dc83fb3cefb546a5ebd7ed7ef3ede0b59fe86db853f8f22fe7980c9a09c03f5ff23ade7a83a47d5598d8139069ed5e49b66f373549d0631b3ba798eaab39a7cd36c7e8eaad320665637cf517556936f9acdcf51751ac4cceae639aace6af24db3f939aa4e839859dd3c47d5594dbe69363f47d5691033ab9be7a83aabc937cde6e7a83a0d626675f31c556735f9a6d9fc1c55a741ccac6e9ea3eaac26df349b9fa3ea348899d5cd73549dd5e49b66f373549d0631b3ba798eaab39a7cd36c7e8eaad320665637875fc5ddd7080951fa2a4e78caa9b0ca29db79e3efd9c0abc6c063b9626747ba64db7c2ba844759d7d0a76c5c9551cbbe20ac9b68578ac31aa89bae8b0bd69821051038fa64634352cab4450f02bfa60a04858d7904c30152614a845a55a2d6cbb4a05154760c8e56f591230161b285905344e2ae434ae3e637fd6a469040180f5f7bfdcdbbbcc2c143cdb4ab4c7fb078e250dd573f2eb5e7f4e58d49f78f2b9dc88a9296a4456c3119578b6401ca76663262ad85581788e87ba281b359735aaaaaa477422115aa1b6e500180c5515a568dba500eb68e825a865c1165d17a36ccb9289a01b46d96293340b70773a0c3c154ecc083092f3d29655b0cb6657c7828123fda97949c1cb7dfcc6775d7ee55b5551d8b7ef6dd9b17c2a69e8f164a13c6e24a3b572b9126e6da85a7501ed60369f2fd1d1ece0e8c8c9a1e399ec60667864cc761c226982031c1821418d13816d5d5125551ec96645958aa4823d2892029a83f0530b159c195395b393471983a1704e43a5609aa9b461e6f38a4a1c2b373f9578e5c0ef6ebee5431fbde6cd62ade8856256a92c88110d2c314db1195105202558f239616cb494cf993b773dfdec6ff7ed7ffeb81b52e3f134a86cd9ae55a9b5c5352daa9a853c46b5270ca7e6140a96aa695385f65503555335d3cc603d80aac9349b1d78d73b377cf6d6ab009b6de5a8a724daea508271d14d1528af0401e375c04cad32eacd21a88fe549d2a0631961d3b77ffc9f5bff2744a27ac7198a24e78a769ba19ecc99c5425e059d1526ab53e1c40c7f12a84d92f22d8249a08114e22a0a5535bafde16ff076bc01d8d32f0eeedaf1ec91e3c74e1c1b766bb5722e2f47d448a44d8986e627e6752f3aa36b49dfc28e64ef99f3f436360e437216113c06b3e8d6f444d4cc8dd79c68320d7a0af77fff375bbfbf6dff91e3b29156d5841ad36a2e653a4cd5c254ae12772ab4a70f2ad3b454c23ec23e955cc7d475d52e6413ba522ee51ed9fe6d95504d659be6d4fbe7cf6c79e08187e2890e91aaedc9a455f38868317de3d8ae2f5eb20aa5a32e4c6baf5dbbfce2b5972c5bb1b023cd006653609272498d301c0060808dcab1feecf71f7ce4e7bf7af968360f1d96363a472da646a084ad621ee4453d5842f3bb2e0b7effc17a55a842a6286140c204e09fe8831aa28e442ad5aae3944ffee0077775a5a45a9840afe229e705491576ec3af8f2fee38b7bceb25c62d79472ad2a54b01f5d518d48743e1e54c22129678eef7d72ff4fb63ffcd4ae7d4ed99bd7b9187031644972980292aacaa4b98a4737948b2e59e3daead123c747f3a38a1c2adbe35e8db445544872886d6d429931a854a8cab256ab5902a085c5b02b82e7854261c173621165287378f3e6afacea4b4a61505ba882149244602605e1e73fdf3370e2b84d89170ad350155ba1616c1910071f81d42071463c3a3f678f3ffaf8ae4776ec104472ceaa3341debc5d52c361d7ab8500bb00958b872c59b9e40d17ae7f74fbf642b960e80625e478ff40674fb70b4346083ef1704d3751df4dc0c2a93f00e7c9dc18380e9a1d8f1e8f48b200ee05d4bfdbfff457be7cdbead59d7c64693c0f960341b86aad8820052bd8c1740ffb59d1a9a2607a2227142d35743c7fe73d0ffdd55537ee3d9451b544ae2cc8a168365f643d49a45472121a6d93e903dffb7a5c813683349457ae3a77e8d811d66162993155c510a95684781ceab4963f79520c57e3f108ad99f678feefde77d5d5efb9a829a221cf13c312e3617002151e7dec9903874fd0484cf4eac61c5e01e41c1e0ff1ea1807053ce2946d570c9743214937e034442bd5daf0486ef7ee7d4b7a7a7a17778c7b241a49848966e69d981e07384983c4126449ef9aad0f6d9d974c144b105d8d0a61ccc6813d4daadae314e64b092976d11225117c5b2e0cc3705c7ad9eb3e71d346c716a08aa021a145426a042b71bdd2b496a18aaf66a8e4888a20aa809654264b95aab11618ea5cce04c3132511d13b06fa473e72dd6777ee1ea40e9b134b70e5c481a1367dcbface0f7de0eaecf09063dbd06fbc3df89e310363b05b13e02aa002af08ef6239dfd3bbe0a65bae713d219da82b4cb06ecd66760285c32979615954e1eb406f53aac855098f4265a6c69b0f7a534b966c8889aac9b6430a056a17a955ac75f7ac76bcf8b51ff9e4d3cfe6fc59eb2f2864d4805f58a6ebaeddb8f6bcd58aaac2790cf6e1f5d30115160c83a13de1835985a1658bcff8e8751fecee24b08758efe15ffc86eb214ed5094b322fb55588efc7b36fb8758cb8cc184a50241581566c2045d717b41b692d66484a2297b57b7bcf5d90ecbef29d57628465d799535158054486d0c25db9e1c60f3b96095e63d34e2c33065596196fc4551d1e62363bb4b0bbf7ddeffdcb4bd7759a2536f1a6afddf9df3ffb2967b0e642f8c4230a36f55898029088388e874388b724d878f0131ece7b8e4d1109819e05d3c2bbea28d9d11cb55d5556562f5ff9a6b75c0fcf09f303425583108d6a8a853a4af7c2d825eb2f458599fd896566a072f7080109e8065da7c7c97baede78e53bce868e0549b76cfbf53ddffaf754ba63e212ad2fe25300df4d578603d9ea01570136d16719e0545654592461518b696af7e2deb26565f3c39e26e54be5cddf79ac358a30a5802d41628d8470cd07afb0ed1c666e75f06bd3820a170f9124a244785bc01080c4537104db2c1a3aa2b48c6b1d7dffdfbee36fae58037a421a7fb8edb97bbff7431a9e2fab5dccc0d0c9482d14618a1162526e69006d1360ec04f143f0410bdc4c0477906b2259b66797ed3c73858892b3044f89dc7dff966c89003c1b7012e65d83718857c2fbccaef045e72d2fe4faf518f3733c075bf1a35f7c9cb2403c8060d7b5a029e155424b1041a5c4090bbeb271cc8b2e78fd07ae7e3380cc9bf4f903d5cdf7ff20336c27f40e4f6c837f06c9c1b430adcdc93d2263a36c5b5c09357f085426711da0e53f32efda6578c767c5236ac4285a95871f7b01dcc48d36efc69819418246df70fe6a5984956d05e88056e4e4e25d836f64032030106fa807172e4221ef09a64c6cc9d0f2859184a1dffbcd9ba0061064a5d2e4fa1b6ee8ef1f82dbad687ac12c4015f3a24a75851c9cf934ebd4868583aef55c8b0a0aa5f28f1efaa5ebd579c7b61a4bfab35fbcfe32356658307df05b7da901b22633301403df8a850909b480cea88f788bda21d989c0cdf6728244effdde1d201d1ec8c63bdf756376a4d0ddd91b8be8b069180eb9e52e7e489eec73f3c967fa667b202a120b50fba2ccd83516319e7be1c5a1573c6ec96a1eb4360444833dc7afbd8b4947473b36d39411f08b5841c8d3881e9a70a23728a930a3c1f68a05108512c1b19d2197da5ffed7cfc3b4e44d0154bdf6efbf31961997481c4e3cac194a4864120299e1aba2feaa146829680d442d2151876711d50dcf157ef3cc337c72be28af33b52cd0bededee0ba90d816558370a29322eb241cf32a845408f41370365eec2f39855b3f79fdb9e726d0011116e2b247b73faec553f0b34dd302abab9ace170055b9e404d73b8d7a535cf9586ed2cb05bbeab2b59e786c376f6faec5033d34f674f754bcba78f33e0c54f82ea02f74236fc29b310cc42212aa39ae436d6871dbca2675edbd57be6de386b3154d383248a1727ff4939f75762d3f70e0b01649c5e206c41ba36cb704c686dee78ab139e79f5e813481d7b037f098cfcc89c3af1cc55a4c58a0ed98c2634a1abb40cbc2ae0ea4e3386ab83e63a0b6bc96c076ac62b1067105797d0c78a2bdfab57dd77fe2fdbccbfefdaf7cf18eafe8f10ea4cd96ad58d33f90c50ee02d828155b90d8ccda0a616cffd05663dfd2aec1cac80ed3b0aba9e06336345cba5503d0cad7e092e9748ce0b2e06e5d462e0e00f9c6db4b670157a4f8139c9f7f52ebae38bffc8fb6cf98fbd5ffaea3721c62c83a76a5060715d87c043a44312611aa2917998a4965878d028d828f2ba8d2f96ef853981556bb64caa2019082b8085d08e0a288c0a14cf8963a33e3331cc869404272c1f8bd404180de952fe29b648ea1b62de8ab71a938e0c1ed664cfae3068bffb9daff29ff63c39b863cfce6c76d830528905ddd4a560aa362d41c159930a9fd0672a709457753c484fa030d77f26859b8d492390b099d4c23f811a16be2225de28c89630579b7f727f85d7939a6815338994ead6f29bbef679d80fa8f56c86de79d73dcfff763f12b6f982353692279e0a453d3a3c0cefa23127fb0b1dc8fe7011f23fc5b0c2a9ca7351ecd74061219d82ec4c9d1503bf70b769c2e4ad5f5dc1a9d60d1b6bf4d18abf7c759752840d48943289a5018e420f30151e36461032d9fe0b2e3eeba57d8f7ff1731f5fb726013d84c6bbbe7edfe1810ce24c6341a7a8687015e03344e286a8781ce5127124a9c596fe4cad17a72ad27940ee24d55aefd4407a6b4ca386fe3092cd51a834eb8db1f5e42bff745cc6b7d0b52c0fee17b84f50973e37237e6a70140c0fdccefe575ef8f075576d78eb99801386f4eebb9fd8b6e5a7ba9676bd90e3ca31cd80c0142dbb0cc99115e6d3ca2ddc33ad18289c81c1517c2d5839ee033653e781bed356f9900910ca81f3890649f9f8ccf11119390d8781c6900bb78906f6876f40cb090bbe5cb5a2e733b7be1b4e26e08469b9ef816dede9de8205a1942166d046d08a083ee061405ca163e06354f054ea11395f126fc0c9398a393a44039a7924d8ec00dc63c2a667d36c9f5c690203efad51142454a7b03d563c78e845e672370aa44614e052fad082d484caf019f8afe7bfb6ebdb9b3f7dd264933ef742f1868fddacd6a209a3039981a86ae0300a70a2e064c2688bba9e0dfcd96e5914ebea8e4fc2df7538c30a6760c7f59a3219e4398ee2a6040567401da86cc6db10ec66d1987f738af2f20b07a14d2165dcb4a24758f05d4ad4a08a29f290924d48411172b77fee4e34ced7d55dbbf6fcc38db775f7242c6b243f34222b64ecd8094ca18aaaed08632307b4185bd9951ca4ec6a7609fe063ea7966a254f9d6c192902209b3a382c53f9963d275c51fde4797d10877602a336a6e32e5dcd575e2cc0b405391c4057c08864464798526c702f2ae1b283f8978852cdcd0f253ad2e323598d580f6ed9cc33ebf0633be2c697bf70331b835c02c34800a5604e24fbfcbc8453120e1d3ab4e9ce2f456251f03cf7c2d19f9772a172ebc72e3fb8218b4fbd3d5d304ba974f7b29e794f3f7be29a6b3fd9d1d153f698d78d5fab725d098799f3d2127e7078d9c1d99746903e772d10b9e60a38045bda436a16092166245adeca1b9a01eeddbdf7d8f0a80bf5c9cf35f81ec2389facb88e2c793123d17f60dfd2c5a94f7de2268cb7e082a8025ccae5cbce58b27451d3b7e4c3826f4ccd3f7ff1180e8519220db1be5d960a0e25b08f485c3aeb9c3e3cc181300e2fbdf86cc28850cf85a71d57f442c04882c927a512e10f428d8920a5e7e0d4a398cfb52f5ec227e4d0e2108c6f66f7afea61407339ccc652b2b65d8e496d8a28c68df45bdeba71c35ff4f13c4dbd1f6da38dada35d6ea4172a0dc66906c763a3f9b26d958be3588fcb675bd4003ccdf57805bfe26803a60efae491ed4f298ae138d4152c4d3564aa706dc97bd68409676acc1b9389eb52afa220b2a855e879af391b3d5dff70087bc3c91d8407ded1233b1f87a35c21f5a347ae1a5a9eda91c1ec2597aefbd0356fc4564c8bd4bd2de48190896b483ea23a7cf2a70900e755bce3d1051df3bbc272123f71ecf23ec85f4210b0158e416001493004ba08034fe673aa2a6b71b6806d9b55c16c193f7f300c4cf0411b381932ce7c03557dddf96bd0d2dc9e3f42d8fecb1707074f02dbe8d95272a422baa60557d1ad086a58e9ee5a0eaf0805fbc0b6b05dbe3f54f8839f8275f6d94879a0521c2f2339c08d4dd00020370dfec78658fcdb9801b87f78e7de42d9399ac952a2aab14830b4aa9b7af446096489a14e415824507168bb381d39674582a30fa772983f9363f33ff8e0564274ae93fcf1f55718b889c575cb2c44e2ead66dfff5f8ce9d5d9ded65db9c9f40efaacd2e29d4dd46d7f760e530534b484d117e8d2154a7b8a2448e0c1c1a2b401a2688985b1b2fbb5548d1433f7e7cef9e2744717ed1a27012d9ed883d4f09621c68743c24b1189febf178b9580cc2cc0e01fc228529a8d2a6aaa027e0c43d8ad5e75facfb192cfc7e466f0a6f50e8178f1deeefcfe0800f52dd22a93f43b86cb25c93228b6d5a2a379c3d72a8df2e80d98abf45d6c82f2ca3897f2aa4947d071407fb6442e91b17846f7a444ba3a4926803b221d560759c26c19ce53d72f0e5c30fef7c2eae77d8c8cc693ae4335f26679fbdb2542a8f9b26860bd495658656100d4cc6660f9a2098568585da76210783b93099d8f8f60b38eb82d1b022128890f87bbf7b1f5205488910ff0a033c22a41dd9c910a5e1e48254decc297204a75789f969239d7ae97f9febe94aa9890eac85a37ebc3112595faef8158d255d8388c73a283a328a0c117973ac8cb5352ce12b24be0fe86470a940db543909d7db7190b94fbb746c7070145cc3d0148702134c73b84d63274e0da5ceaac1a288d4b4f3715959bcb877edeaba52c0bcc74d072ec0969ffdfaf9a7f727d22b7c9232cf8f8fe5464bac3a7654652e05d20855d7c6a582058b60e534ee9d961c150f53f16a923f94c6f140e29930044c36aede98f9314cad2a1128d866c13e002dff9444164c27b40e90d0b6694c4d488246bda8aac671b5c071f3b288fca7cf781313a8e05ecb36130a41fe19eee78245f17fbae506cc992b31e70c2c138da9fbf68dfecb1d9b13a99ea4b1a0e83b79f80924e54be3ddd2c0cda66685438b4fee6737dba1bb6b422386e600130d6756107bf4e948cdf7492ac0d6f121801cd0ae5c71be7f2147c0317e2a95769193abc0e4d4235804e58a6ce078068ec438529dfe252455d1949a2778b66b9a8b0cdc3ec82593527b5abbed333775329e63d6a5305ee6d1e5fbdeffd1dedea5e6883d9ab3313f7e0dc2894f584c160d05fd123647a0b4e0f431cd6d54e0f77a151c812b54b91c232c1721082a57a4fc7ca53da68c65711c8cc45f2e9bcd20b422610fde28cf0dc09c62063c8804c06591980e012b174d9c682ad4ee48a9278e0ca8aa55b646bf75ef57579db510b8c3333c6ec5a311045e37def25922e9030323bdcbfa860733a22f54d86a10b4df47556cba05e754e0d0d234035442c624e16743821d6bc0a15fc0c6e9cef6ce94aec882ae2770c3099b9088cbc274e8203cd482cce2d134380938b3cda2030e8a530b0c9cbe8c0f1f812e58b36ae5d607eeefeb9907c3c64fc300e78181d19b3ff585679eda3f2fdd2da969907441673a9b1b642469d80ebe8753dc460b823731b062511f6489b300736584d6292267444dd1926983d9e49a95880821c85de34eca9a7392175ef89aed3b9e2c96bdf6744f8561418329c18d0ab6159cbf289e4dc56ca61fa704b82c83b0c12a9876d94ab4097143bbfc8a8d1ff9e06538b08165805161b71305989617ff6dd3778e0e8e2eee5b319829b427bac02f1de91ee64efb70f2f0804b220315df4db16413fcdec2e144178e058e17d4e1b50d1ce977cd9c1e35c0c0c81936dd00a571fe77f9151b2445dbf7bb8303fd1938a1f0267000c364c877f4990291a8d19e64b9752b6f17a1dcdc7357adfcebb76f78e3fa35b8ae8402042412ec14170990db6ebfe7c9e75f3a7c68e0ccbed78c5b427b72c1f1c163a9f422d31a83145441066ac176c1747100c31c6efeae5b3336e71f2ef57c1f684334d4a19311cd77f52d4f2fec6c0da62c4c570ddf051384f5eb96ad5bd787e8f7d77b76effcd59338132a948b25684bff6690220aa2a42126c3c5ad654b96ae5f77c185e7ade4eac7d770ec2a1a00c6b5b41dbb0f7e6dd3a66a581b38767269dfdab19c8994bf0bd148ccb31d0b5abd68e7f82d0376a60c54120d009295177ebab9b349a04ee4de7aaf3a52787e1cd9b4401270eddae56f7bd3a51bdfbe143cc66f0ac05592c51056820f0cdf108c5df70dfd280f22572810abec79c8b146909e6001008f11b95f8d042f4ec775780e1a05b4d93cddb573ef5df76d7db97fa0ab7b79269b49a7d2c8e6411d026b70b70c3d0550a1bd71eb10d68bb195e748be3f07b69df16d34a89f74ca00afea46b2581abafb9e6f9cb542b50a1ecee31801a7a83928a4262a9b1580dcac072b007ed20c70958f1ea3870e1fdab6edc7432732993113210b62207835dc8d61167e4a81584da5d329d4d29481131a5ccf1dcdb3a822dd6ec4e242217f327322452bd6e0907f2dc9b5e054399685a46f150b52474176825808e8e5582c1a8f46fdfc08866b2ae36a90118553123936942113b76368263b74e085fe03c78e0d1d3fd17f343b786cb0b3ab974d2dc6119a798ecac4a711a3b16113cb5438f1fb8ca98ab330f0062efde206cad0c0e174cf3c9878a760422dd597ab507ebeca2d0dfc5db44fc85cf8fd9078c765665cda20f0902422933af1b3c3474036f021bfdca029b8bba439adacbfc617c216200c503f4d35595f7dfa3f33a62ae0446a33aab5c3004abd4b31b3a6c126b2088dafa2e14416c5a714fc5ecb6660227a63590d91bb89ecedb8ecfe321c265c01405e05ea0b89084fb20da39bd95eb046d390e1c81ecada71c0b1605776651d72e92f02e339218ce23b98e63d6350b1355986370f2d87309a1dab6393087798f70acd2ed272a94542e2b17b8028781385fa37d6b9f022a5eaff80f6fa5f0c469de2468b02f5e5276ef00b5327451b6c829c33df2be00484a2dcf04c9bc3ff5065c6a0b2b33678683812b32d5cb95263005b426a0b6124b6c51c091f061e2b322fc1676c041510e58ac0d4a3ebb15edc619ebabdfab5fb802ea32c6fc63ac2796427c2704b02c1dd2935d0d469d13263500d3da1885ac942a204517505e98b42a1003f9f193096c4629219d40ab693e50b5396e70e0932189d319debb6ee64043be0bf19f04fbc9bb1b51625cc78402bf9ee17f38438b4135dbfe6c05356660c2a5c705b29944dfc9f0b44988c5771aa87a084e7cd3d975d378014321714856da5ee36c1b56d4a1f7e8114e0cd930fac27fae283902a01a65a40f2ac5ad565cc8de807a13987d99f998ffb63df330695e3356268f525c18a5aab8efd6265667638d6a9e4fbc90de51cd815b2b82893948a47d1c27014d0abbe2cfbd463d10f177dd6835df26053fcd1e5ff00bbcae5446b71dc9e0000000049454e44ae426082";
$img = hex2pic($png);

$image = tmpfile();
fwrite($image, $img);
fseek($image, 0);

$stmt = $db->prepare('INSERT INTO testImages2 VALUES (1, ?, "$png")');
$stmt->bindValue(1,$image,PDO::PARAM_LOB);
$stmt->execute();

$r = @$db->query('SELECT * FROM testImage2');
$l = $r->fetchall();

function hex2pic($img) {
    $file2 = '';
    $n = strlen($img) / 2;
    for($i = 0; $i < $n; $i++) {
        $t = chr(hexdec(substr($img, $i * 2, 2)));
        $file2 .= $t;
    }
    
    return $file2;
}

$db->query('DROP TABLE IF EXISTS testImage2');

?>
--XFAIL--
This bug might be still open on pdo_4d 11.3 ; no way to upload picture in 4D ATM.
--EXPECTF--

Function Calls

dirname 1
extension_loaded 2

Variables

None

Stats

MD5 486fc503358ee012d595d3a00382a207
Eval Count 0
Decode Time 3912 ms