Skip to content

PHP 8 (all versions) crash instantly on macOS El Capitan (10.11) #25867

Duplicate

Description

@l008com

Description

I'm using the MacPorts package manager. I have tried installing every version of PHP 8 (8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6) on macOS El Capitan specifically and they all fail. When configured using libphp in apache2, apache crashes instantly, and constantly. If you try to run php via php-fpm, the fpm server also crashes instantly, and constantly. CLI php scripts do run however.

There is an open ticket with MacPorts about this and from what I understand, all versions of PHP 8 use the CommonCrypto library where available, to create random numbers. And if it's not available, it defaults back to something else.

The problem seems to be that CommonCrypto is present, but broken, in macOS El Capitan. Which causes PHP to break. The fix is apparently VERY simple. When checking for CommonCrypto, add an additional check that will return 'false' if you are in macOS El Capitan. That should be all it needs to work.

Newer versions of macOS don't have this problem because CommonCrypto works properly. OLDER versions of macOS also do not have this problem, because they do not have CommonCrypto. Its just this one specific versions of macOS that has the problem. I know this is a pretty old OS, however it is a significant version of macOS to support because it is the newest macos version that many older Macs support, including apple's last rackmount server (Xserve). So its still a popular choice for setting up home servers on old machines you have kicking around.

Here is a link to the MacPorts bug report:
https://trac.macports.org/ticket/74760

Also, I do have a freshly created VMWare virtual machine containing a clean install of macOS 10.11.6. So if anyone is on a newer intel Mac and needs access to the older OS, this should get you access. Msg me and we'll find a way to transfer the file if anyone wants it.

PHP Version

All versions of PHP 8 from 8.0 to: 

PHP 8.6.0 (cli) (built: Nov 21 2026 14:07:15) (NTS)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0, Copyright © Zend by Perforce
    with Zend OPcache v8.6.0, Copyright ©, by Zend by Perforce

Operating System

macOS 10.11 El Capitan

Activity

  1. devnexen commented on Nov 28, 2026

    @devnexen
    Member

    Hi @l008com it is already reported. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions