Req #79758 [Com]: update libpq.dll to most recent supported version

From: Date: Sat, 11 Sep 2021 11:39:22 +0000
Subject: Req #79758 [Com]: update libpq.dll to most recent supported version
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236536@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79758&edit=1

 ID:                 79758
 Comment by:         ufc28496 at gmail dot com
 Reported by:        buschmann at nidsa dot net
 Summary:            update libpq.dll to most recent supported version
 Status:             Open
 Type:               Feature/Change Request
 Package:            PostgreSQL related
 Operating System:   Windows Server 2019 64bit
 PHP Version:        8.0.0beta2
 Block user comment: N
 Private report:     N

 New Comment:

Play online free euchrehttps://myeuchre.com this game are
recently upgrade in 2021.


Previous Comments:
------------------------------------------------------------------------
[2020-08-24 10:47:11] buschmann at nidsa dot net

PHP 8.0beta2 still contains libpq.dll 11.4.

In the meantime (13.08.2020) PostgreSQL 12.4 is out (the quarterly minor maintenance update of
Postgres 12) including the corresponding libpq.dll (version 12.0.4.20223).
With the regular update of Postgres the next version (12.5) comes out on 12.11.2020, just before PHP
final schedule.
I suggest to follow the minor upgrades (4/year) to deliver always the latest security fixes of
Postgres/libpq.dll.

As an example of the possible problems encountered I show a recent example from our logfiles:

[10-Aug-2020 17:48:20 Europe/Berlin] PHP Notice:  Unknown: Cannot set connection to blocking mode in
Unknown on line 0

This occured when using php8.0.x with libpq 11.4 on windows to connect to Postgres 12.4 on Linux.
The PHP Notice seems not to be very helpful in this case (certainly for many non experienced users).

The problem was solved by loading the most recent libq.dll (12.4) in httpd.conf as shown below.

When it is not desired to frequently update libpq.dll as delivered with PHP it should be clearly
documented and emphasized that the most recent version of libpq.dll can always be loaded through
Apache httpd.conf to get the most recent security fixes and connection features.

For some enhancements with PG 13 see:

https://www.highgo.ca/2020/08/21/tls-related-updates-in-postgresql-13/?utm_source=rss&utm_medium=rss&utm_campaign=tls-related-updates-in-postgresql-13

So I always recommend to load libpq.dll from the (upgraded) Postgres distribution like (here on
Windows Drive N:):

<IfModule !php8_module.c>
# libpq has to be loaded first!

# here we try the libpq.dll from php
### DISABLED LoadFile "N:\Apache\php8\libpq.dll"

# here we try the libpq.dll from pgsql bin
LoadFile "N:\pgsql\bin\libpq.dll"

LoadModule php_module "N:\Apache\php8\php8apache2_4.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
# shown here as an example only
PHPIniDir "N:/Apache/Apache24/conf/local"

</IfModule> 


The best would be to provide libpq.dll version 13 at release time of PHP 8 (26.11.2020) as Postgres
should come out quite earlier.

Thanks for considering

------------------------------------------------------------------------
[2020-07-20 13:42:01] cmb@php.net

IMHO, libpq should be updated to version 12 for PHP 8.0, only.

------------------------------------------------------------------------
[2020-06-29 15:50:38] buschmann at nidsa dot net

Description:
------------
In php8 alpha1 you still deliver libpq version 11.4

The libpq library from Postgres is the central C interface library for clients.

It has a very stable interface, but is regulary updated to reflect security issues and bugs (see
PostgreSQL site for more).

A client (here php) connecting to a postgres database through libpq.dll can always connect to elder
releases of postgres (e.g. 10.x, 11.x), but newer features for the newest major releases are only
supported when using the corresponding libpq.dll.

I have successfully loaded the newest libpq (here: 12.3) through LoadFile in apache httpd.conf and
tested the application without issues.

The current version of postgres is 12.3, (12.4 in august, 12.5 in november) and supports compilation
under Visual Studio 2019.

At the time of the prospected PHP8 release postgres 13.1 should be out.

Because of the very conservative changing of libpq it should be considered to include libpq from
postgres 13 beta during the php alpha and beta phases to switch then to the released version of 13.0
/ 13.1 at release time.





------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79758&edit=1


Thread (4 messages)

« previous php.bugs (#236536) next »