March 23, 2013

[SOLVED] Fixed PHP Warning: Module 'apc' already loaded in Unknown on line 0

You are getting this message "[SOLVED] Fixed PHP Warning:  Module 'apc' already loaded in Unknown on line 0"

every time you execute the php in your console.

It means that you have already activated the apc.so extension.

You must check the second module activation.

Here you can find the apc.ini config file
$ locate apc.ini 
/etc/php5/conf.d/20-apc.ini
/etc/php5/mods-available/apc.ini

Now locate php.ini files and check them for uncommented "extension=apc.so" line
$ locate php.ini
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini

check files for uncommented "extension=apc.so"
$ cat /etc/php5/apache2/php.ini | grep apc.so
;extension=apc.so

Here you found it
$ cat /etc/php5/cli/php.ini | grep apc.so
extension=apc.so

 

Edit the file
 sudo vim /etc/php5/cli/php.ini

and add ";" before "extension=apc.so"

save it and you are done

 

Source: http://blog.ciuly.com/my-server/php-warning-module-apc-already-loaded-in-unknown-on-line-0/

 

 

 

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete