php5 segfault

Jeremy Chadwick koitsu at FreeBSD.org
Thu Oct 9 08:17:43 UTC 2008


On Thu, Oct 09, 2008 at 10:11:29AM +0200, Laszlo Nagy wrote:
>
>>>> Also, you cannot use a threaded Apache (e.g. threaded MPMs) with PHP
>>>> since not all extensions support threading.  Your Apache needs to be
>>>> built without threads and use a non-thread model (e.g. prefork).  I've
>>>> also had success with Apache-ITK-mpm.
>>>
>>> This is very true for mod_php, but less so if PHP is run as FastCGI.  
>>> I am
>>> currently running a box at work with the event mpm and mod_fcgid for
>>> testing and it seems to be doing well. YMMV
> All right. The problem is that we are getting segfaults with the CLI  
> version too. We are running some background PHP programs and they also  
> throw segfault.

extensions.ini is used by the CLI version as well.  I'm not sure why you
think this wouldn't be the case.

> Here is the interesting part. I wrote a test script that tries to  
> connect to the postgresql server.
>
> - if the hostname is wrong for the connection, there is no segfault
> - if the hostname is right but the password is wrong (e.g. it cannot  
> connect to the server) then there IS segfault.
>
> There are no options to configure in php5-pgsql.
>
> I tried to change the order or module in extensions.ini, no success so far.

Then my recommendation is to build PHP with DEBUG enabled (see "make
config"), reproduce the situation, and provide a backtrace here.

I would also consider filing a bug with the PHP folks.  They may know
something we don't.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-questions mailing list