CodeIgniter Forums
CodeIgniter\Cache\Exceptions\CacheException - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: CodeIgniter\Cache\Exceptions\CacheException (/showthread.php?tid=79922)



CodeIgniter\Cache\Exceptions\CacheException - volker - 08-15-2021

I'm running CI (ver 4.1.3) on WIN10. After moving my projects onto a Google Drive (not the old Backup and Sync) I'm getting this error below. This happens when I launch the project using "php spark serve" or using WAMP server and http://localhost.

I googled this error and found all kinds of suggestions changing for Linux machines (changing project folder permission to 777). No suggestions for Win 10.
Any help is much appreciated.
Code:
An uncaught Exception was encountered

Type: CodeIgniter\Cache\Exceptions\CacheException

Message: Cache unable to write to E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\writable\cache/.

Filename: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Cache\Handlers\FileHandler.php

Line Number: 68

Backtrace:

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Cache\Handlers\FileHandler.php
Line: 68
Function: forUnableToWrite

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Cache\CacheFactory.php
Line: 55
Function: __construct

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Config\Services.php
Line: 110
Function: getHandler

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Config\BaseService.php
Line: 263
Function: cache

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Config\BaseService.php
Line: 192
Function: __callStatic

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Config\Services.php
Line: 105
Function: getSharedInstance

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Config\BaseService.php
Line: 263
Function: cache

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\Common.php
Line: 74
Function: __callStatic

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\CodeIgniter.php
Line: 651
Function: cache

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\system\CodeIgniter.php
Line: 321
Function: displayCache

File: E:\My Documents\Google Drive\ProgramCode\PHP_Projects\FamilyRecipes\index.php
Line: 46
Function: run



RE: CodeIgniter\Cache\Exceptions\CacheException - InsiteFX - 08-17-2021

If its a Google drive you need to share that folder. Not sure if that is your problem but tryt it.

As far as Windows 10 you should always be logged in as an Administrator.


RE: CodeIgniter\Cache\Exceptions\CacheException - volker - 08-17-2021

I'm running Win10 as Administrator and yes the Codeigniter project resides on a Google Drive. This is what I found out so far:
When running a dir command in Powershell I saw that all files had an archive flag set (a). Once I removed the a-flag, Codeigniter would run. Intermittently it looks like Google Drive adds the a-flag again which then in turn causes Codeignitor to fail again.
Why is Codeigniter giving me the Cache error when a file has an archive flag set?
[Image: view?usp=sharing]