Changes between Initial Version and Version 1 of HowToReportABug/GenerateBacktrace


Ignore:
Timestamp:
2007-07-04T01:57:12Z (13 years ago)
Author:
moo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToReportABug/GenerateBacktrace

    v1 v1  
     1[[TracNav(DocToc)]]
     2[[PageOutline]]
     3= Generating a Backtrace =
     4
     5== If you don't have a core file yet ==
     6Read [http://bugs.php.net/bugs-generating-backtrace.php generating a Backtrace] on php.net.
     7  * config xcache.coredump_directory in /etc/php.ini
     8  * Ensure that the xcache.coredump_directory has write permissions for the user who's running PHP.
     9  * Remove any limits you may have on core dump size from your shell:
     10    * tcsh: unlimit coredumpsize
     11    * bash/sh: ulimit -c unlimited
     12  * Cause PHP to crash:
     13    * PHP CGI: Simply run php with the script that crashes it
     14    * PHP FastCGI: Simply setup normal webserver-fastcgi configuration, and access the script that crashes PHP
     15    * PHP As Apache Module: Run httpd -X, and access the script that crashes PHP
     16== Once you have the core file ==
     17check where the coredump is
     18{{{
     19#!ShellExample
     20$ grep xcache.coredump_directory /etc/php.ini
     21xcache.coredump_directory = "/tmp/"
     22$ ls /tmp/core
     23/tmp/core
     24}}}
     25ok, it's there
     26
     27 * PHP as CGI/FastCGI: Run gdb with the path to the PHP or PHP-enabled httpd binary, and path to the core file, for example:
     28{{{
     29#!ShellExample
     30$ gdb /usr/local/bin/php-cgi-fcgi /tmp/core 
     31........
     32(gdb) bt
     33(gdb) source ~/src/php5/.gdbinit
     34(gdb) dump_bt
     35}}}
     36
     37  * PHP As Webserver Module: Run gdb with the path to the PHP or PHP-enabled httpd binary, and path to the core file, for example:
     38{{{
     39#!ShellExample
     40$ gdb /usr/local/apache/sbin/httpd /tmp/core
     41........
     42(gdb) bt
     43(gdb) source ~/src/php5/.gdbinit
     44(gdb) dump_bt
     45}}}
     46