Opened 12 days ago

Last modified 10 days ago

#70695 new defect

Calling pg_* functions from php83-postgresql via Apache/mod_php causes SEGFAULT

Reported by: jonaskohl (Jonas Kohl) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port: php83-postgresql

Description

I'm using an Apache httpd server (installed via MacPorts) and PHP 8.3 via mod_php (also installed via MacPorts). I have now installed 'php-83-postgresql' and now everytime I call a pg_* function in PHP, the PHP child process crashes with a SEGFAULT, resulting in a connection abort and the following line logged to the Apache error log:

[Sun Sep 08 16:57:15.442477 2024] [core:notice] [pid XXXXX] AH00052: child pid YYYYY exit signal Segmentation fault (11)

When calling the PHP script via the command line, everything works as expected. It only happens through mod_php.

I tried cleaning and re-installing everything, but that didn't help.

These are the currently installed ports (only the relevant ones):

apache2 @2.4.62_0+brotli+preforkmpm (active)
php83 @8.3.11_0+libedit+universal (active)
php83-apache2handler @8.3.11_0 (active)
php83-curl @8.3.11_0 (active)
php83-exif @8.3.11_0 (active)
php83-gd @8.3.11_0 (active)
php83-gettext @8.3.11_0 (active)
php83-iconv @8.3.11_0 (active)
php83-imagick @3.7.0_1 (active)
php83-intl @8.3.11_0 (active)
php83-mbstring @8.3.11_0 (active)
php83-openssl @8.3.11_0 (active)
php83-postgresql @8.3.11_0+postgresql16 (active)
php83-sockets @8.3.11_0 (active)
php83-sqlite @8.3.11_0 (active)
php83-xdebug @3.3.2_0 (active)
php83-zip @1.22.3_0 (active)
postgresql16 @16.4_0 (active)
postgresql_select @0.6_0 (active)

Attachments (1)

httpd-2024-09-08-1447473.ips (38.8 KB) - added by jonaskohl (Jonas Kohl) 10 days ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

Please attach the crash log.

comment:2 in reply to:  1 Changed 11 days ago by jonaskohl (Jonas Kohl)

Replying to ryandesign:

Please attach the crash log.

Where do I find this? The only log I could find was the aforementioned line in the Apache error log.

comment:3 Changed 10 days ago by jmroot (Joshua Root)

Check both ~/Library/Logs/DiagnosticReports and /Library/Logs/DiagnosticReports. If the log is a bit older, it may be in the Retired subdirectory.

Changed 10 days ago by jonaskohl (Jonas Kohl)

Note: See TracTickets for help on using tickets.