See my answer here for a similar question.
In the answer, I hilight how to use gdb for tracking through PHP specifically for how to analyze the failure, but you can use the same information for standard debugging.
This approach requires PHP to be configured with --enable-debug , linux machine Apache and a strong desire / ability to understand how the software works at a lower level.
- Launch
gdb using Apache :
gdb /usr/lib/httpd- Then you have two options:
- Launch apache as a server and upload the file through the browser, as usual:
(gdb) run -X - Or use
gdb to run the script itself:
(gdb) run /path/to/the/script.php
- For more information on
gdb check out the quick link reference guide .
source share