after a migration from ubuntu 18;04 to 20.04, my php site comes up with an error in the apache logs
[Tue Apr 23 23:09:52.521788 2024] [:error] [pid 4026] [client 10.164.136.69:39608] PHP Fatal error: Uncaught Kohana_Cache_Exception [ 0 ]: PHP APC extension is not available. ~ MODPATH/cache/classes/kohana/cache/apc.php [ 52 ]n thrown in /var/www/*/cache/apc.php on line 52
when I check in the file at line 52, this is what I get
48 protected function __construct(array $config)
49 {
50 if ( ! extension_loaded('apc'))
51 {
52 throw new Kohana_Cache_Exception('PHP APC extension is not available.');
53 }
54
55 parent::__construct($config);
56 }
any idea where the problem might be coming from?
by default the site was on php 5.6, after migration to ubuntu 20.04, php 7 was installed by default, I ran commands to switch php 7.4 to 5.6 but no change
2
Answers
i solved my problem with this command line
Add or ensure the following line exists in the php.ini file:
restart apache