Created
September 8, 2021 18:17
-
-
Save sean-e-dietrich/7eec7ababc882f01986bd557e56d8802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gdb `which php` /tmp/core-php.2145740 | |
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 | |
Copyright (C) 2020 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Type "show copying" and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
Type "show configuration" for configuration details. | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>. | |
Find the GDB manual and other documentation resources online at: | |
<http://www.gnu.org/software/gdb/documentation/>. | |
For help, type "help". | |
Type "apropos word" to search for commands related to "word"... | |
Reading symbols from /usr/bin/php... | |
(No debugging symbols found in /usr/bin/php) | |
warning: core file may not match specified executable file. | |
[New LWP 2145740] | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Core was generated by `php /home/kanopi/test.php'. | |
Program terminated with signal SIGSEGV, Segmentation fault. | |
#0 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:503 | |
503 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory. | |
(gdb) bt | |
#0 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:503 | |
#1 0x00007f2b83d29e57 in ZNSPAlpha::_SetValue(char*, int) () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#2 0x00007f2b83d2c142 in ZNSParameter::SetValue(char*, int) () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#3 0x00007f2b83d0549a in ZODBCDAPD::WriteBoundParameters(ZNetworkService*) () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#4 0x00007f2b83d14fb7 in ZODBCRSSQLExecute::SQLExecute() () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#5 0x00007f2b83d20379 in ZODBCStatement::SQLExecute() () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#6 0x00007f2b83d0332d in SQLExecute () from /usr/local/lib/libzodbc.so.1.2.4.1 | |
#7 0x00007f2b843580c3 in SQLExecute () from /lib/x86_64-linux-gnu/libodbc.so.2 | |
#8 0x00007f2b843268e2 in ?? () from /usr/lib/php/20190902/pdo_odbc.so | |
#9 0x00007f2b84bd3031 in ?? () from /usr/lib/php/20190902/pdo.so | |
#10 0x00005639975d7c89 in execute_ex () | |
#11 0x00005639975d924b in zend_execute () | |
#12 0x00005639975502ec in zend_execute_scripts () | |
#13 0x00005639974effd0 in php_execute_script () | |
#14 0x00005639975db382 in ?? () | |
#15 0x00005639973b7938 in ?? () | |
#16 0x00007f2b871220b3 in __libc_start_main (main=0x5639973b7530, argc=2, argv=0x7ffd6f8e9ac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd6f8e9ab8) at ../csu/libc-start.c:308 | |
#17 0x00005639973b7ade in _start () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$dbh = new PDO('odbc:COESDEV', '', ''); | |
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$data = array ( | |
1 => 0, | |
2 => '', | |
3 => 'C', | |
4 => '2021-09-08', | |
5 => 99999, | |
6 => 5, | |
7 => 9, | |
8 => 'PHX', | |
9 => '13.557', | |
10 => '2021-09-08 05:31:13.00', | |
11 => 2, | |
12 => 'PHX', | |
13 => 'N', | |
14 => 'Y', | |
15 => 'Test Subject 2', | |
16 => '2021-09-08', | |
17 => 99999, | |
18 => 5, | |
19 => 9, | |
20 => 'PHX', | |
21 => '13.557', | |
22 => '2021-09-08 05:31:13.00', | |
23 => 601058, | |
); | |
$sql = "INSERT INTO WONST (WONST-ADDRESS-NUMBER, WONST-ALERT-TYPE, WONST-COMPANY-CODE, WONST-CREATED-BY-DATE, WONST-CREATED-BY-EMPLOYEE, WONST-CREATED-BY-HOUR, WONST-CREATED-BY-MINUTE, WONST-CREATED-BY-ORG-ID, WONST-CREATED-BY-SECOND, WONST-CREATED-BY-TIMESTAMP, WONST-NOTE-NUMBER, WONST-ORG-ID, WONST-PRINT-ON-AR-INVOICE, WONST-PRINT-ON-ROUTE-SHEET, WONST-SUBJECT, WONST-UPDATED-BY-DATE, WONST-UPDATED-BY-EMPLOYEE, WONST-UPDATED-BY-HOUR, WONST-UPDATED-BY-MINUTE, WONST-UPDATED-BY-ORG-ID, WONST-UPDATED-BY-SECOND, WONST-UPDATED-BY-TIMESTAMP, WONST-WORK-ORDER-NUMBER) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; | |
$q = $dbh->prepare($sql); | |
foreach ($data AS $pos => $value) { | |
$q->bindParam($pos, $value, PDO::PARAM_STR, strlen($value)); | |
} | |
$q->execute(); | |
print "Successfully Executed" . PHP_EOL; | |
} catch (PDOException $e) { | |
print "Error!: " . $e->getMessage() . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment