Cannot run my PHP Apache PHP-FPM website locally on MacOS because of weird ObjectiveC error: objc[1495]: +[NSPlaceholderString initialize]

4 days ago 10
ARTICLE AD BOX

I've had this problem for at least a month now. I don't know what the apple developers are doing on this one. I am so frustrated.

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>

Just fyi, I had trouble figuring out how to add the key so 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. SUCCESS@ 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. Major Bummer.

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? I'm dying over here. And not only that. System Integrity protects that file? I had to reboot into recovery mode, which is different on apple silicon btw (hold the power button) and disabled system integrity. I rebooted what what do you know 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. For the love of God APPLE! I found out I'm supposed to add plists to /Library/LaunchDaemons so I copied the disabled plist to /Library, edited it to diabled -> false and restarted homebrew apache and php-fpm.

brew services restart httpd brew services restart php

And what do you know! It worked! The thing is 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.

So my paranoid brain is thinking Apple knew about this problem and literally did something weird instead. My site was WORKING on my OSX laptop now it ISN'T. I have to go back to terminaling into a linux server now. WTF Please, if anyone can help me I would appreciate it so much. I just want to run my MAMP site. I paid 6k for this laptop and it can't even run my dinky little site? I spent hours getting my site updated and working in OSX for this to happen? The agony! I love you guys at stack overflow though. ♥️ Keep it real. Don't be like those uncaring nerds at Apple.


Read Entire Article