debugging segfaults is not fun.
My low key technique:
- place a printf(“made it here: %s, %s+ %sn”, __METHOD__, __LINE__, __FILE__); everywhere…
- put “DIE(‘something’);” to figure out the exact line that fails. If dies, good. move it further down. If it segfaults, move the die statement up. Until you’ve found the exact line that fails.
- Figure out why it’s segfaulting… uh… good luck with that. Google, and look at the changelog in PHP to see if it’s been fixed.
An easier option, if I were the one controlling the box — Update to the latest PHP.
Leave a Reply