# No core file being created

- Thread: https://externals.io/message/45988
- Original archive: https://news-web.php.net/php.internals/45988
- Started by Mark Skilbeck on 2009-11-10T13:55:08+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #45988 — Mark Skilbeck — 2009-11-10T13:55:08+00:00

URL: https://externals.io/message/45988#45988

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?

---

## #45989 — Scott MacVicar — 2009-11-10T13:59:36+00:00

URL: https://externals.io/message/45988#45989 · In reply to: #45988

> 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

---

## #45990 — Antony Dovgal — 2009-11-10T14:10:48+00:00

URL: https://externals.io/message/45988#45990 · In reply to: #45988

> 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

---

## #45991 — Mark Skilbeck — 2009-11-10T14:18:33+00:00

URL: https://externals.io/message/45988#45991 · In reply to: #45989

Scott MacVicar wrote:
> 
> 
> > […]
> 
> 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:
 > 
> > […]
says
> > […]
directory
> > […]
 >
 > # sudo gdb php
 > gdb> r /file.php
 >
 > This way you don't need any core files at all.
 >

Thanks guys :)
