php5 and postgresql 8.2/8.3

View: New views
5 Messages — Rating Filter:   Alert me  

php5 and postgresql 8.2/8.3

by kometen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

I have installed php5 with support for postgresql (php5-pgsql). If I
install postgresql-client ver. 8.2.7 or 8.3.x apache (httpd)
core-dumps. If I install postgresql-client 8.1.11 or 8.2.6 apache does
not core-dump.

This is the output (backtrace) from gdb:

(gdb) bt
#0  0x000000080651c340 in ?? ()
#1  0x000000080094ebd5 in puts () from /lib/libc.so.7
#2  0x000000080094f1ee in gethostbyname () from /lib/libc.so.7
#3  0x000000000041ee80 in ap_get_local_host ()
#4  0x000000000041e131 in ap_fini_vhost_config ()
#5  0x000000000040de35 in ap_read_config ()
#6  0x00000000004156f1 in standalone_main ()
#7  0x0000000000416e2c in main ()

I have confirmed that it's postgresql which makes apache core dump by
commenting out pgsql.so in /usr/local/etc/php/extensions.ini. This -
off-course - prevents me from connecting to my db. :-/

Apache is ver. 1.3.41 from ports with no changes to the default-values
during portinstall. PHP is ver. 5.2.5_1.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
freebsd-stable@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@..."

Re: php5 and postgresql 8.2/8.3

by kometen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>  I have installed php5 with support for postgresql (php5-pgsql). If I
>  install postgresql-client ver. 8.2.7 or 8.3.x apache (httpd)
>  core-dumps. If I install postgresql-client 8.1.11 or 8.2.6 apache does
>  not core-dump.
>
>  This is the output (backtrace) from gdb:
>
>  (gdb) bt
>  #0  0x000000080651c340 in ?? ()
>  #1  0x000000080094ebd5 in puts () from /lib/libc.so.7
>  #2  0x000000080094f1ee in gethostbyname () from /lib/libc.so.7
>  #3  0x000000000041ee80 in ap_get_local_host ()
>  #4  0x000000000041e131 in ap_fini_vhost_config ()
>  #5  0x000000000040de35 in ap_read_config ()
>  #6  0x00000000004156f1 in standalone_main ()
>  #7  0x0000000000416e2c in main ()
>
>  I have confirmed that it's postgresql which makes apache core dump by
>  commenting out pgsql.so in /usr/local/etc/php/extensions.ini. This -
>  off-course - prevents me from connecting to my db. :-/
>
>  Apache is ver. 1.3.41 from ports with no changes to the default-values
>  during portinstall. PHP is ver. 5.2.5_1.

Replying to myself (and others :-) ). When compiling php5 statically
with postgresql-support apache no longer core dumps. I added
CONFIGURE_ARGS+=--with-pgsql to /usr/ports/lang/php5/Makefile.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
freebsd-stable@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@..."

Re: php5 and postgresql 8.2/8.3

by Jeremy Chadwick-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Apr 17, 2008 at 02:05:27PM +0200, Claus Guttesen wrote:

> I have installed php5 with support for postgresql (php5-pgsql). If I
> install postgresql-client ver. 8.2.7 or 8.3.x apache (httpd)
> core-dumps. If I install postgresql-client 8.1.11 or 8.2.6 apache does
> not core-dump.
>
> This is the output (backtrace) from gdb:
>
> (gdb) bt
> #0  0x000000080651c340 in ?? ()
> #1  0x000000080094ebd5 in puts () from /lib/libc.so.7
> #2  0x000000080094f1ee in gethostbyname () from /lib/libc.so.7
> #3  0x000000000041ee80 in ap_get_local_host ()
> #4  0x000000000041e131 in ap_fini_vhost_config ()
> #5  0x000000000040de35 in ap_read_config ()
> #6  0x00000000004156f1 in standalone_main ()
> #7  0x0000000000416e2c in main ()
>
> I have confirmed that it's postgresql which makes apache core dump by
> commenting out pgsql.so in /usr/local/etc/php/extensions.ini. This -
> off-course - prevents me from connecting to my db. :-/
>
> Apache is ver. 1.3.41 from ports with no changes to the default-values
> during portinstall. PHP is ver. 5.2.5_1.

Last night I migrated one of my machines from mysql51 to postgresql83,
which included adding php5-pgsql to my extensions list.  I have
absolutely no problems.  I'm using Apache 2.2, however.

$ pkg_info | egrep 'apache|php5-pgsql|postgres'
apache-2.2.8        Version 2.2 of Apache web server with prefork MPM.
php5-pgsql-5.2.5_1  The pgsql shared extension for php
postgresql-client-8.3.1 PostgreSQL database (client)
postgresql-server-8.3.1 The most advanced open-source database available anywhere

--
| 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 |

_______________________________________________
freebsd-stable@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@..."

Re: php5 and postgresql 8.2/8.3

by Jim Pingle-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Claus Guttesen wrote:

>>  I have installed php5 with support for postgresql (php5-pgsql). If I
>>  install postgresql-client ver. 8.2.7 or 8.3.x apache (httpd)
>>  core-dumps. If I install postgresql-client 8.1.11 or 8.2.6 apache does
>>  not core-dump.
>>
>>  I have confirmed that it's postgresql which makes apache core dump by
>>  commenting out pgsql.so in /usr/local/etc/php/extensions.ini. This -
>>  off-course - prevents me from connecting to my db. :-/
>>
>>  Apache is ver. 1.3.41 from ports with no changes to the default-values
>>  during portinstall. PHP is ver. 5.2.5_1.
>
> Replying to myself (and others :-) ). When compiling php5 statically
> with postgresql-support apache no longer core dumps. I added
> CONFIGURE_ARGS+=--with-pgsql to /usr/ports/lang/php5/Makefile.
>

Not sure if this would make much of a difference in your case, but have you
tried moving the line for pgsql.so up higher in extensions.ini?

I haven't had any trouble with PostgreSQL's PHP extension, but I have with
plenty of others (MySQL, recode, imap, sockets, and pspell) when the
extensions were not in a specific order.

I've documented the issue here:
http://www.pingle.org/2006/10/18/php-crashes-extensions
http://www.pingle.org/2007/09/22/php-crashes-extensions-workaround

More info can be found in the archives as well.

If that does alleviate your problem, let me know and I'll add notes for
pgsql.so to my workaround.

Jim
_______________________________________________
freebsd-stable@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@..."

Re: php5 and postgresql 8.2/8.3

by kometen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > Replying to myself (and others :-) ). When compiling php5 statically
> > with postgresql-support apache no longer core dumps. I added
> > CONFIGURE_ARGS+=--with-pgsql to /usr/ports/lang/php5/Makefile.
>
>  Not sure if this would make much of a difference in your case, but have you
> tried moving the line for pgsql.so up higher in extensions.ini?
>
>  I've documented the issue here:
>  http://www.pingle.org/2006/10/18/php-crashes-extensions
>  http://www.pingle.org/2007/09/22/php-crashes-extensions-workaround
>
>  More info can be found in the archives as well.
>
>  If that does alleviate your problem, let me know and I'll add notes for
> pgsql.so to my workaround.

I did read this (or a similar) thread during my troubleshooting and
started with pgsql.so at the top and gradually moved it down to the
bottom and (re)starting apache and everytime it core dumped.

Thank you for the pointer though.

Forgot to mention that this is is the amd64-version of FreeBSD 7.0.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
freebsd-stable@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@..."