APC on OS-X: PHP Fatal error: Unknown: apc_fcntl_unlock failed
APC 3.1.9 has a nasty bug, causing a frustrating error: “PHP Fatal error: Unknown: apc_fcntl_unlock failed: in Unknown on line 0” to appear when installed with PECL on Mac OS-X (and reportedly on a variety of Linux platforms).
There’s an easy fix.
When you install APC through PECL it asks for a number of settings. Do NOT go with the default value for “spin locks” even though it warns the feature to be experimental. Experimental or not, but it looks like it’s a hard dependency for the rest of APC so: shame on them, be “wild” and say ‘yes’:
Enable spin locks (EXPERIMENTAL) [no] : yes
That’s it. Seemingly this should solve the problem. In reality: who knows what else is broken, but, hey, it’s PHP! :)