-1

This issue recently popped up after a macOS update probably Tahoe 26 but when I try to request a page of my website that uses Homebrew Apache PHP-FPM Memcached with PostgreSQL and PHP 8.4 files on OSX I get this error:

objc[1495]: +[NSPlaceholderString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

I thought I suppressed the error after Google said this is a known issue and said I should edit my /System/Library/LaunchDaemons/org.apache.httpd.plist to add the key:

    <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
    <string>YES</string>

I'll post what my file now looks like below. I think it has to be added under EnvironmentVariables.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Disabled</key>
  <false/>
  <key>Label</key>
  <string>org.apache.httpd</string>
  <key>EnvironmentVariables</key>
  <dict>
    <key>XPC_SERVICES_UNAVAILABLE</key>
    <string>1</string>
    <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
    <string>YES</string>
  </dict>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/sbin/httpd-wrapper</string>
    <string>-D</string>
    <string>FOREGROUND</string>
  </array>
  <key>KeepAlive</key>
  <true/>
</dict>
</plist>

When I added that key to org.apache.httpd.plist my site immediately started working again. I thought I was in the clear until I restarted just today. I got the same ObjC error again in the /opt/homebrew/var/log/httpd/error_log apache homebrew error log every time my site tries to connect to the local server.

After debugging I found out macOS added the disabled -> true key at the top of the plist. That was probably why it wasn't running. Why would Apple do that? And not only that. System Integrity protects that file? I had to reboot into recovery mode (which is different on Apple Silicon, hold the power button) and disabled system integrity. I rebooted but they still won't let you edit that file. It says read only filesystem in vim and nano when you try to force write to it. I found out I'm supposed to add plists to /Library/LaunchDaemons so I copied the disabled plist to /Library, edited it to disabled -> false and restarted homebrew apache and php-fpm.

brew services restart httpd
brew services restart php

However now I get an error that's even worse. Here is the error in the httpd log now:

[Sun Nov 30 23:27:17.849875 2025] [core:notice] [pid 2799] AH00052: child pid 2857 exit signal Segmentation fault (11)

I'm not running any weird apache modules or anything. Just the default and PHP 8.4.

My site was working on my OSX laptop now it isn't. I have to go back to terminaling into a Linux server now.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.