#PHP Apache CORE DUMP - GDB backtrace
Open httpd.conf: vi httpd.conf
Add following line main config section:
CoreDumpDirectory /tmp/apache2-gdb-dump
Unlimited core dump size, In terminal add below
ulimit -c unlimited
Create a directory /tmp/apache2-gdb-dump:
mkdir -p /tmp/apache2-gdb-dump
Set permission:
chown httpd:appserver /tmp/apache2-gdb-dump chmod 0777 /tmp/apache2-gdb-dump
Now you should see core dumps in /tmp/apache2-gdb-dump directory:
ls /tmp/apache2-gdb-dump
Install GDB
yum install gdb
or apt-get install gdb
or .....check online
Reading the core dumps
```gdb $program-path $coredump-path or gdb -c <core_file> `which <program-path>`
Example:
gdb /usr/sbin/php-fpm /tmp/apache2-gdb-dump```
with in GDB
* set disassembly-flavor intel
* set logging on
* bt full
* info reg
* disassemble
* info shared
* Info threads