Welcome 歡迎光臨! 愛上網路-原本退步是向前 !

CodeIgniter 4 Cache unable to write to

最近改玩CentOS 的代替版本AlamLinux 和  rocky linux

都出現了

CodeIgniter\Cache\Exceptions\CacheException Cache unable to write to .

找了很久都說要 

chmod 777 -R

但解決方法是

step 1

Open the /etc/selinux/config file and set the SELINUX state to disabled
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

step 2

chmod 755 -R Cache

step 3
 reboot system 

 

[ PHP ] 瀏覽次數 : 77 更新日期 : 2024/11/23