-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault on pg_connect
(pgsql
extension)
#353
Comments
This issue seems related to:
If this issue is caused by connecting pgsql server with ssl, I will review it again this week. EDIT: postgresql 16.2 fixed the openssl bug, I'll update spc's postgresql library version and release it. |
Dear @crazywhalecc, you're entirely right -- this DOES seem related to SSL, since the bug doesn't happen with <?php
$conn = pg_connect("postgresql://root:xxxxx@127.0.0.1/postgres?sslmode=disable");
$result = pg_query($conn, "select version()");
var_dump(pg_fetch_all($result)); No segfault: $ ./buildroot/bin/php foo.php
array(1) {
[0]=>
array(1) {
["version"]=>
string(134) "PostgreSQL 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit"
}
} If you can update the library, that would be awesome. P.s.: Thanks for all the great things you are doing for the PHP community! 🙇 |
Thank you for the quick action! I can confirm, building from |
Apparently
static-php-cli
segfaults on thepg_connect
call.Steps to reproduce:
Where
index.php
is:or alternatively (with same result):
Tested with Ubuntu 23.10 and Ubuntu 22.04,
x86_64
architecture.The
no PostgreSQL user name specified in startup packet
is especially interesting, since there IS clearly a username specified in the connection string?The text was updated successfully, but these errors were encountered: