PHP with APC: Fatal errors: Cannot redeclare class

后端 未结 7 1988
甜味超标
甜味超标 2020-12-24 07:57

Since I installed APC for PHP with PECL I get sometimes these errors: Cannot redeclare class xxx

xxx changes from time to time. I could disable APC but

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 08:18

    Download the latest apc version and use:

    [APC]
    apc.cache_by_default = 0
    

    With apc.stat = 0 the server loads the php files in cache, if you modify it, php still loads the same.

    More info:

    • https://bugs.php.net/bug.php?id=58878#1275406932
    • http://www.php.net/manual/en/apc.configuration.php

提交回复
热议问题