Обсуждение: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36 to core dump

Поиск
Список
Период
Сортировка

php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36 to core dump

От
"pobox@verysmall.org"
Дата:
I wrote about this, but I lost the thread.

Today I did clean install in a new virtual machine of FreeBSD 5.4,
Apache 1.3.36, php 5.1.4 and PostgreSQL 8.1.4 from ports - and apache
did core dump again.

Commenting pgsql.so in the php extensions solves the problem, but I need it.

Is there anybody who has the above working?

php 5.1.2 with PostgreSQL 8.0.8 works fine.

Iv.


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36 to core dump

От
"Gavin M. Roy"
Дата:
I'd check to make sure you dont have extra pgsql.so and postgresql
library files laying about.  My off the cuff guess is that pgsql.so
is linked against 8.0 libs and you need to recompile it to link
against 8.1 libs?

Gavin

On Jun 8, 2006, at 1:47 PM, pobox@verysmall.org wrote:

> I wrote about this, but I lost the thread.
>
> Today I did clean install in a new virtual machine of FreeBSD 5.4,
> Apache 1.3.36, php 5.1.4 and PostgreSQL 8.1.4 from ports - and
> apache did core dump again.
>
> Commenting pgsql.so in the php extensions solves the problem, but I
> need it.
>
> Is there anybody who has the above working?
>
> php 5.1.2 with PostgreSQL 8.0.8 works fine.
>
> Iv.
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
Gavin M. Roy wrote:
> I'd check to make sure you dont have extra pgsql.so and postgresql
> library files laying about.  My off the cuff guess is that pgsql.so is
> linked against 8.0 libs and you need to recompile it to link against 8.1
> libs?
>
> Gavin

If I do clean install (starting from the OS, FreeBSD 5.4), then I should
not have 8.0.x laying about... or am I mistaken...

Do you have working system with these versions?


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36 to core dump

От
"Gavin M. Roy"
Дата:
I'm on linux and run PHP 5.1.4, PgSQL 8.1.4 and Apache 2.0.x (current).

You shouldnt need to do a clean install, I'd just try in this order:

compile and install pgsql 8.1.4
ldconfig (to update library stuff, may not be needed)
compile and install php 5.1.4
kick off apache...

BTW your other thread of emails is on the PgSQL PHP list IIRC.

Hope this helps,

Gavin

On Jun 8, 2006, at 2:06 PM, pobox@verysmall.org wrote:

> Gavin M. Roy wrote:
>> I'd check to make sure you dont have extra pgsql.so and postgresql
>> library files laying about.  My off the cuff guess is that
>> pgsql.so is linked against 8.0 libs and you need to recompile it
>> to link against 8.1 libs?
>> Gavin
>
> If I do clean install (starting from the OS, FreeBSD 5.4), then I
> should not have 8.0.x laying about... or am I mistaken...
>
> Do you have working system with these versions?
>


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
Gavin M. Roy wrote:
> I'm on linux and run PHP 5.1.4, PgSQL 8.1.4 and Apache 2.0.x (current).
>
> You shouldnt need to do a clean install, I'd just try in this order:
>
> compile and install pgsql 8.1.4
> ldconfig (to update library stuff, may not be needed)
> compile and install php 5.1.4
> kick off apache...
>
> BTW your other thread of emails is on the PgSQL PHP list IIRC.
>
> Hope this helps,
>
> Gavin

I am with Apache 1.3.36. Many people say with 2.x there are no problems.
Perhaps I should upgrade.

Thanks anyway!

Iv.


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
Scott Marlowe
Дата:
On Thu, 2006-06-08 at 16:22, pobox@verysmall.org wrote:
> Gavin M. Roy wrote:
> > I'm on linux and run PHP 5.1.4, PgSQL 8.1.4 and Apache 2.0.x (current).
> >
> > You shouldnt need to do a clean install, I'd just try in this order:
> >
> > compile and install pgsql 8.1.4
> > ldconfig (to update library stuff, may not be needed)
> > compile and install php 5.1.4
> > kick off apache...
> >
> > BTW your other thread of emails is on the PgSQL PHP list IIRC.
> >
> > Hope this helps,
> >
> > Gavin
>
> I am with Apache 1.3.36. Many people say with 2.x there are no problems.
> Perhaps I should upgrade.

Yeah, I was running 1.3 until a year or so ago.

with 2.x as long as you're only using the process forking model, you're
perfectly safe.  with the threading model, and certain php modules,
there is a chance that race conditions could lead to crashes.

On linux or BSD, the differences between threads and processes in terms
of performance are slight enough that there's no great loss running the
pre-forked process based worker model of apache.

Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36 to core dump

От
"Gavin M. Roy"
Дата:
It doesnt sound like an apache problem to me, it sounds like a
library version conflict happening in PHP, so apache shouldn't impact
it.  What happens when you try and access pgsql functions from the cli?

Gavin

On Jun 8, 2006, at 2:22 PM, pobox@verysmall.org wrote:

> Gavin M. Roy wrote:
>> I'm on linux and run PHP 5.1.4, PgSQL 8.1.4 and Apache 2.0.x
>> (current).
>> You shouldnt need to do a clean install, I'd just try in this order:
>> compile and install pgsql 8.1.4
>> ldconfig (to update library stuff, may not be needed)
>> compile and install php 5.1.4
>> kick off apache...
>> BTW your other thread of emails is on the PgSQL PHP list IIRC.
>> Hope this helps,
>> Gavin
>
> I am with Apache 1.3.36. Many people say with 2.x there are no
> problems. Perhaps I should upgrade.
>
> Thanks anyway!
>
> Iv.
>


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
Gavin M. Roy wrote:
> It doesnt sound like an apache problem to me, it sounds like a library
> version conflict happening in PHP, so apache shouldn't impact it.  What
> happens when you try and access pgsql functions from the cli?
>
> Gavin

I already recompiled another configuration and can't test at the moment.

Somehow all people with Apache 2.x report PHP 5.1.4 working with
PostgreSQL 8.1.4. I am trying this now and if it works, we might upgrade
the production server as well. Apache 1.3.36 will die out anyway soon
and if 2.x solves the problem, I would not dig deeper. If it does not
work and we go back to digging into 1.3.36, I'll post the result from
the test you suggest.

Thanks, Gavin.

Iv.


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
I think I got closer to the problem.

I did clean install of PostgreSQL 8.0.8 on FreeBSD 5.4, then Apache
1.3.36, then PHP 5.1.4 - all compiled from ports. Till here it all works.

Now I install just the php5-pgsql extension. Restart Apache. All works.
Reboot the FreeBSD - and Apache does core dump.

Obviously something happens during/after the reboot. Could somebody give
me a hint.

Thanks,
Iv


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
Gavin M. Roy wrote:
> It doesnt sound like an apache problem to me, it sounds like a library
> version conflict happening in PHP, so apache shouldn't impact it.  What
> happens when you try and access pgsql functions from the cli?

Just tried a simple -

$result = pg_connect(...);

echo $result;

with the cli and got

Resource id #4

which means that with cli it somehow works, right?

How can I trace what's wrong with pgsql.so? Did you read my other mail
that it works until I restart the FreeBSD and only then starts to core dump.

Iv


Re: php 5.1.4 with PostgreSQL 8.1.4 causes Apache 1.3.36

От
"pobox@verysmall.org"
Дата:
pobox@verysmall.org wrote:
> I wrote about this, but I lost the thread.
>
> Today I did clean install in a new virtual machine of FreeBSD 5.4,
> Apache 1.3.36, php 5.1.4 and PostgreSQL 8.1.4 from ports - and apache
> did core dump again.
>
> Commenting pgsql.so in the php extensions solves the problem, but I need
> it.
>
> Is there anybody who has the above working?
>
> php 5.1.2 with PostgreSQL 8.0.8 works fine.
>
> Iv.

SOLVED

Somebody from the list came in to debug with us. He examined httpd.core
and found out that the problem is around 'get host by name'. Then he
added a line in 'hosts' and gave the host name in 'httpd.conf' and all
worked fine.

Interesting that the server worked without this for quite a while.

Iv.

--