Segmentation Fault with pg_connect
on Mac OS X (only in Apache)
#3565
Unanswered
modestMouse1
asked this question in
Q&A / Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My PHP web app is crashing upon calling
pg_connect
when running on my Mac OS X machine ( it does not crash from a RHEL8 server ).It's only happening when:
Meaning the script works when I run it from the CLI and it fully works (CLI and Apache HTTPD) when connecting to another PostgreSQL server running PostgreSQL 9.0 (it only crashes when attempting to connect to a PostgreSQL 15 server).
On my local machine I'm running PHP 7.4.33
When I run the crashing script in Apache HTTPD, the error_log shows me this:
[Sat Nov 09 12:25:42.609490 2024] [core:notice] [pid 39732] AH00052: child pid 51781 exit signal Segmentation fault (11)
The script is extremely simple:
The output of
phpinfo()
is as follows (only including the relevant pgsql parts):pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 16.3
PostgreSQL(libpq) PostgreSQL 16.3 on aarch64-apple-darwin23.4.0, compiled by Apple clang version 15.0.0 (clang-1500.3.9.4), 64-bit
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0
The error logs don't give me any info besides the segmentation fault. I have tried with both
sslmode=disable
and without to no avail.I have tried this against 2 different sets of PostgreSQL v15.x servers (one a 15.8 and another on 15.9) and they both give the same results.
I have tried this with the following PHP versions and they all give the same result for all of them:
Are there any other troubleshooting I can do to pinpoint the exact problem or any additional info I can give ?
thank you
Beta Was this translation helpful? Give feedback.
All reactions