FAQ
I'm trying to debug a segfault that's occuring in an extension I'm
developing (phpgksu - PHP wrapper for libgksu2). On the PHP site it says
that if I have PHP configured with --enable-debug (which I do) then
whenever PHP crashes a core file should be created in the same directory
the file is executing. However, I do not see one.

I've even run the command as sudo ($ sudo php /file.php) to make sure
PHP has the permissions to write the file.

Any ideas?

Search Discussions

  • Scott MacVicar at Nov 10, 2009 at 1:59 pm

    On 10 Nov 2009, at 13:55, Mark Skilbeck wrote:

    I'm trying to debug a segfault that's occuring in an extension I'm
    developing (phpgksu - PHP wrapper for libgksu2). On the PHP site it
    says that if I have PHP configured with --enable-debug (which I do)
    then whenever PHP crashes a core file should be created in the same
    directory the file is executing. However, I do not see one.

    I've even run the command as sudo ($ sudo php /file.php) to make
    sure PHP has the permissions to write the file.

    Any ideas?
    ulimit -c unlimited

    So you can enable core files, the debug mode in PHP just stops
    optimizations and stripping of symbols producing a more useful core
    file.

    Scott
  • Mark Skilbeck at Nov 10, 2009 at 2:18 pm

    Scott MacVicar wrote:
    On 10 Nov 2009, at 13:55, Mark Skilbeck wrote:

    I'm trying to debug a segfault that's occuring in an extension I'm
    developing (phpgksu - PHP wrapper for libgksu2). On the PHP site it
    says that if I have PHP configured with --enable-debug (which I do)
    then whenever PHP crashes a core file should be created in the same
    directory the file is executing. However, I do not see one.

    I've even run the command as sudo ($ sudo php /file.php) to make sure
    PHP has the permissions to write the file.

    Any ideas?
    ulimit -c unlimited

    So you can enable core files, the debug mode in PHP just stops
    optimizations and stripping of symbols producing a more useful core file.

    Scott
    Antony Dovgal wrote:
    On 10.11.2009 16:55, Mark Skilbeck wrote:
    I'm trying to debug a segfault that's occuring in an extension I'm
    developing (phpgksu - PHP wrapper for libgksu2). On the PHP site it
    says
    that if I have PHP configured with --enable-debug (which I do) then
    whenever PHP crashes a core file should be created in the same
    directory
    the file is executing. However, I do not see one.
    >>
    I've even run the command as sudo ($ sudo php /file.php) to make sure
    PHP has the permissions to write the file.
    >
    # sudo gdb php
    gdb> r /file.php >
    This way you don't need any core files at all.
    >

    Thanks guys :)
  • Antony Dovgal at Nov 10, 2009 at 2:10 pm

    On 10.11.2009 16:55, Mark Skilbeck wrote:
    I'm trying to debug a segfault that's occuring in an extension I'm
    developing (phpgksu - PHP wrapper for libgksu2). On the PHP site it says
    that if I have PHP configured with --enable-debug (which I do) then
    whenever PHP crashes a core file should be created in the same directory
    the file is executing. However, I do not see one.

    I've even run the command as sudo ($ sudo php /file.php) to make sure
    PHP has the permissions to write the file.
    # sudo gdb php
    gdb> r /file.php

    This way you don't need any core files at all.

    --
    Wbr,
    Antony Dovgal
    ---
    http://pinba.org - realtime statistics for PHP

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedNov 10, '09 at 1:55p
activeNov 10, '09 at 2:18p
posts4
users3
websitephp.net

People

Translate

site design / logo © 2022 Grokbase