Opened 3 months ago
Last modified 3 months ago
#72262 assigned defect
php82 crashes with WordPress on ElCapitan Server
Reported by: | quwax | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | elcapitan | Cc: | |
Port: | php82 |
Description
Hello,
thanks for your great work, first of all :-)
For development I'd like to have php >8.1 on my MacMini-Server, running AppleServer 5.2, which is 10.11 ElCapitan. It runs a 4dv15 database, which I want to replace with a php-solution. First I tried php8.3, but here already fopen, file_exits and mysqli etc are not working (phpinfo() does). php83 is forking, delivering internal server error to the browser.
With php8.2 my simple tests, like fopen and database login work fine :-) But wordpress returns a Proxy Error (the same apache settings work fine with php74). The php error log is empty as well as the wordpress error log. In the apache error log I see a lot of these messages: [Sun Mar 30 17:52:16.732345 2025] [proxy:debug] [pid 22307] proxy_util.c(2329): AH00927: initializing worker proxy:reverse local
Either I miss some necessary config-change for php82 or it has a problem with my system.
Thanks for looking into it and all the best
Matthias
Attachments (1)
Change History (7)
comment:1 Changed 3 months ago by jmroot (Joshua Root)
Keywords: | php82 removed |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 3 months ago by quwax
The machine, a 8GB-MacMini-Server, has a ‘normal’ Apple-Server setup for that time, meaning 2 instances of Apache, all updates installed. The second Apache, working as reverse-proxy is the current version from MacPorts and running stable. The only ‘extra’ is an old 4Dv15 server and the reason I still run this box (4D is not interfering). You can check php74 here: https://www.schmidt-system.de/wurzel/ The API used is apache2-handler. Apache is not crashing, i Believe it’s php without leaving much traces then many of these lines I already sent from the apache-err-log. The php err-log is empty as well as the Wordpress debuglog. PHP works on the command line as far as I can test. Wordpress neither works with Apache and it’s handler nor with Nginx and fcgi. Commands which fail with php83, like file_exits, fopen or mysqli, do work as expected with php82, but Wordpress as well as PHPMailer anyway don’t like it. php83 is the one I observed forking. php82 is causing segfaults.
cheers and all the best Matthias
comment:4 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
A segfault is a crash so there should be a crash log. Check in /Library/Logs/DiagnosticReports.
With the apache2handler SAPI, PHP is a module loaded into the Apache httpd executable so it would be Apache that's crashing.
With the other SAPIs, PHP is its own executable and if it crashes then only that executable crashes.
comment:5 Changed 3 months ago by quwax
Thank you for the explanation and yes, it's hhtpd which is in deed crashing. I load the crash log up
Changed 3 months ago by quwax
Attachment: | httpd_2025-03-29-183853_mcgregor.crash added |
---|
comment:6 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
The log shows the crash happens after PHP's php_random_bytes
function calls into the macOS CommonCrypto library's CCRandomGenerateBytes
function, however it also shows that the pcov.so module is loaded, presumably from the php82-pcov port. Does the problem go away if you deactivate that port and then restart Apache? If not, please attach the new crash log so we can verify that it no longer mentions pcov.so. If the problem only happens with pcov, then report the problem to the developers of pcov; I see they have other reports of crashes, though I did not see one matching your situation.
As far as I know any version of PHP should work fine so your problems are not expected and I would want to fix them.
How is the server configured? Which SAPI are you using? You said Apache but you also said forking which I would more associate with FPM.
Is PHP or Apache crashing? If so please attach the crash log.
Does PHP work on the command line?