Welcome Guest, Not a member yet? Register   Sign In
Cache Exception after Update
#1

Hello,
I updated codeigniter via composer and since then I get the following error:
Code:
PHP Fatal error:  Uncaught TypeError: Cannot assign null to property CodeIgniter\CodeIgniter::$pageCache of type CodeIgniter\Cache\ResponseCache in /data/web/e63506/html/apps/07_codeigniter/vendor/codeigniter4/framework/system/CodeIgniter.php:196
Stack trace:
#0 /data/web/e63506/html/apps/07_codeigniter/system/Config/Services.php(154): CodeIgniter\CodeIgniter->__construct()
#1 /data/web/e63506/html/apps/07_codeigniter/system/Config/BaseService.php(252): CodeIgniter\Config\Services::codeigniter()
#2 /data/web/e63506/html/apps/07_codeigniter/system/Config/BaseService.php(193): CodeIgniter\Config\BaseService::__callStatic()
#3 /data/web/e63506/html/apps/07_codeigniter/system/Config/Services.php(149): CodeIgniter\Config\BaseService::getSharedInstance()
#4 /data/web/e63506/html/apps/07_codeigniter/system/Config/BaseService.php(252): CodeIgniter\Config\Services::codeigniter()
#5 /data/web/e63506/html/apps/07_codeigniter/index.php(54): CodeIgniter\Config\BaseService::__callStatic()
#6 {main}
  thrown in /data/web/e63506/html/apps/07_codeigniter/vendor/codeigniter4/framework/system/CodeIgniter.php on line 196

Does anyone have an idea what I could do?
BR konkret
Reply
#2

It seems you failed to update CI properly.

Cannot assign null to property CodeIgniter\CodeIgniter::$pageCache of type CodeIgniter\Cache\ResponseCache in /data/web/e63506/html/apps/07_codeigniter/vendor/codeigniter4/framework/system/CodeIgniter.php:196

Why is null assigned?
Reply
#3

The solution was very simple.

Just made a clean new installation and copied my files (Controllers, Models, etc..) there.

BR konkret
Reply
#4

Now I also got the original version to run, just a few steps were needed:
- set new systemDirectory path in "Config/Paths.php"
- new index.php in "public" folder needed
- Routing.php and Routes.php in "Config" folder needed
- set right Path for aliases in "Config/Filters"
- update URI handling if needed:

e.g.:
PHP Code:
$uri->getSegment(2) == 'xyz' 
to
PHP Code:
e.g.: $uri->getTotalSegments() >= && $uri->getSegment(1) == 'xyz' 

Check also this upgrade guide:
https://codeigniter4.github.io/userguide...e_440.html
Reply
#5

Yes, whenever you update the framework, you should check the all upgrade guides that affect you:
https://codeigniter4.github.io/userguide...ading.html
Reply




Theme © iAndrew 2016 - Forum software by © MyBB