PHP Warning: Module 'apc' already loaded in Unknown on line 0

7,675

To answer further to the crash issue, Just for the benefit of the community - this is something unique which was causing havoc for me and I didn't find any instance of this situation asked or answered before in my extensive seach on this issue.

The Issue for getting frequent Internal server errors was that - I had PHP 5.4.27 and Zend Opcache was installed on my server before I migrated my new ecommerce site which used APC cache. This was causing a conflict somewhere and trhowing internal server error.

After removing Zend Opcache, Another factor was apc.include_once_override was set to '1'. It caused page distortions, I had read about this somewhere so was able to immediately pin point and set to '0'.

Now it works fine like charm !!! and I am so relieved after a month's battle.

Share:
7,675
Satyadeo Kumar
Author by

Satyadeo Kumar

Updated on September 18, 2022

Comments

  • Satyadeo Kumar
    Satyadeo Kumar almost 2 years

    I am on a dedicated server with my site hosted in a virtual directory. There are few other sites hosted in different virtual directories. I have APC and APCu installed. When i restart PHP-FPM i get the following error:

    PHP Warning: Module 'apc' already loaded in Unknown on line 0

    My APC and APCu configuration are as following:

    • APC.ini configuration

    ; Enable apc extension module extension = apc.so ; Options for the APC module version >= 3.1.3 apc.enabled=1 apc.shm_segments=1 apc.shm_size=2024M

    • APCu.ini configuration

    ; Enable apcu extension module extension = apcu.so

    ; Options for the APCu module version >= 4.0.0 apc.enabled=1 apc.shm_segments=1 apc.shm_size=2024M ..and so on

    I am on Centos with PHP 5.4.27 and APC 3.1.13 running

    I have ben having infrequent crash problem on my site, so have to unfortunately restart PHP-FPM many times. I am still groping in dark to what could be issue. Could APC and APCu being together installed be an issue? If so, what is the correct approach?

  • Satyadeo Kumar
    Satyadeo Kumar almost 10 years
    Thnx...that helps. We have uninstalled APCu and that message is gone. But i am still not able to get away with the internal server 500 errors and frequent crashes due to unknown reasons. thnx anyways
  • Tero Kilkanen
    Tero Kilkanen almost 10 years
    What do the log files show about the Internal server 500 errors?
  • Satyadeo Kumar
    Satyadeo Kumar almost 10 years
    I get the following server error log: [Tue Jul 08 08:58:23 2014] [error] [client 180.76.6.138] (104)Connection reset by peer: FastCGI: comm with server "/var/www/cgi-bin/php5-fcgi" aborted: read failed [Tue Jul 08 08:58:23 2014] [error] [client 180.76.6.138] FastCGI: incomplete headers (0 bytes) received from server "/var/www/cgi-bin/php5-fcgi"