# PHP5 coredumps



## Voltar (Jan 26, 2009)

So I just went and upgraded PHP and some extensions only to end up with it doing nothing but segfaulting. Unfortunately it never actually dumps a core, so I have nothing to examine in gdb, and I'm not that good with gdb anyways, trying to invoke it with the program doesn't do anything. Is there an easy way to force a coredump on a process that segfaults instantly? 

For what it's worth, I already know that the memory in the box is good, and I do have coredumps enabled. I've also searched the entire drive for core.* files and nothing turns up.


```
[root@router /usr/local/bin]# php
Segmentation fault: 11 (core dumped)
```

^^ that's what it does, doubt that it's any help.


----------



## tobe (Jan 26, 2009)

Voltar said:
			
		

> I've also searched the entire drive for core.* files and nothing turns up.


Did you mean '*.core' ?


----------



## danger@ (Jan 27, 2009)

best thing to do would be to remove the whole php installation and start from scratch...


----------



## Christopher (Jan 27, 2009)

I've seen that happen when /usr/local/etc/php/extensions.ini is out of order, or loading an incompatible set of extensions.  Some php extensions define symbols that clobber symbols in previously loaded extensions.

To diagnose it, comment out each line in extensions.ini one by one while running php to track the culprit down.  Once you've discovered the extension that is making php segment fault, try moving that extension to the beginning or the end of extensions.ini.


----------



## Voltar (Jun 25, 2009)

This is a little bit of a late reply, but I finally had time to upgrade my router to 7.2, and decided to tackle this again. After trying commenting the extensions out one by one to no avail, I did some backtraces on the core dumps and Google'ing the results. Finally it led me to this PHP bug, which talked about issues with the php recode extension and of course, the order loaded. Since I didn't need recode (and don't know how it got there in the first place), I went ahead and removed it, backed up my extensions.ini and went ahead and recompiled PHP and all the extensions again for good measures. Works beautifully now.

Just wanted to share in case anyone runs into a similar problem.


----------



## gedge (Dec 11, 2009)

pgsql.so was the culprit for me (moving it didn't work, commenting it out did)


----------



## blueruin (Dec 24, 2009)

gedge said:
			
		

> pgsql.so was the culprit for me (moving it didn't work, commenting it out did)



Same here. How can I solve it?


----------



## blueruin (Dec 25, 2009)

I solved it from other thread.
http://forums.freebsd.org/showpost.php?p=52940&postcount=12


----------

