Hi everyone!! I am NOT Topher Grace, nor do I want to be. I am just Topher Scribbles and just for kicks, I really want to out-rank Topher Grace's IMDB website. If you want to help, just link to me. Thanks and enjoy some boring fun!!

Go to http://www.dnsyard.com for some free DNS tools.

FreeBSD 6.2 + PHP5 + PHP5-extensions = php.core dumps!!

I had just recently installed 2 new servers and both of them had PHP dumps (php.core) and issued a segmented fault, signal 11. I installed PHP5 and installed PHP5-Extensions through the ports.

My first experience with the dump, I wrote a simple code to calculate interest rates, which was totally incorrect (my code btw). My second experience, on another server, was when I was installing pear-DB through the ports. It uses PHP to compile and it kept erroring and wouldn’t finish compiling. So I searched Google and found out that when you install PHP extensions via ports, these dumps occur. I am not sure about the exact reason why it dumps, but apparently PHP is very picky as to when the extensions are loaded, or rather the order in which they are loaded.

So my first search landed me to the FreeBSD lists, and there, they said to make sure the sessions module loaded first, or somewhat first. I edited my extensions.ini file (/usr/local/etc/php/extensions.ini) and moved ‘extension=session.so’ to the top of the list. I saved the file, and re-compiled pear-DB, and it still errored. So I researched some more and I was lead to pingle.org. His post mentioned the same extensions order as well, but placing some of the extensions last. He had recode, mysql, imap, sockets, and lastly pspell at the bottom of his list. I did the same and what do you know, no more dumps!! Woo Hoo.

From what people are saying is that when you have this “magic” order of extensions, to save the order because when you upgrade php or the extensions, it will overwrite this file.

Done!!

Comments are closed.