What is a Core Dump?
When you have a process running in System Memory and it does not finish, the portion of memory that the process was using is dumped to a file for further reivew. This is helpful for debugging your scripts. Core dumps usually have a file name that looks similar to:
How can I review a Core Dump?
For the average user (and even the advanced user), getting information out of a core dump can be difficult. Most of the information contained in core dumps can be found with either of the two commands:
gdb -c core.####
These commands above need to be ran from the command line, however most shared hosting (including Web Hosting Hub) does not allow command line access for security reasons. We've created a simple php script that allows you to find core dumps and use the commands above to review their contents. The script can be found here:
To use the coredumpcheck script:
- Upload the coredumpcheck.txt file to the folder where you have core dumps
- Rename coredumpcheck.txt to coredumpcheck.php
- Access coredumpcheck.php in your browser. For example if you have a folder named "test" with core dumps and you uploaded the coredumpcheck.txt file there, access http://YourDomain.com/test/coredumpcheck.php
- The script will list all core dumps in the current directory. Click any of the core dumps to view more details about the dump.
Look under the "RUNNING: gdb -c core.30387" heading to find the script that is causing the problem. It will be in a line that looks similar to:
Core was generated by `/usr/bin/php /home/training/public_html/t2c_escalation/escalatet2s.php'.
We've highlighted the correct line in the screenshot below.
How can I resolve a Core Dump?
Core Dumps in nature are an advanced topic. It is best to contact your website developer with the information that you have obtained using the coredumpcheck.php file.