PHP “Cli has stopped working”

We do a lot of command line PHP work (CLI = Command Line Interface). Recently we started getting the “Cli has stopped working” error from Windows (our development work is done on Windows systems). We had made several changes leading up to this problem – upgraded to PHP 5.3 and installed the APC byte code cache to be specific.

Well after some experimentation, it appears to be related to using APC in command line php. Changing the following setting solved the problem and we’re back in business:

[APC]

apc.enable_cli = 0

TAGS: APCCliPHP