Welcome Guest, Not a member yet? Register   Sign In
Cache unable to write to /cache/.
#1
Sad 
(This post was last modified: 08-06-2022, 03:31 PM by notme.)

Hello,
I just set up a new instance of CodeIgniter. Unfortunately I get the following error "Cache unable to write to /cache/.". For some reason, CodeIgniter has a need to cache write to /cache among other system folders, not in web folder. If I create a folder, I get an error that mkdir cannot be executed. CodeIgniter is running under www-data:www-data.
For some reason constant WRITEPATH is "/".

PHP - 8.1.8

Do you have any idea how fix?
Thank you

[Image: B5rIkdK.png]

[Image: ANMnEF3.png]
Reply
#2

(This post was last modified: 08-08-2022, 08:31 AM by captain-sensible.)

so your obviously using linux looking at /var/www

inside the main folder of your web app there are directories eg app, writable

inside writable there is a cache directory.

From a terminal emulator cd into main web root .

I just did mine like this: sudo chmod 777 writable -R

my understanding is that you need to have execute permission on a directory in order for the 'system' to be able to enter the directory in question.
-R is recursive so it should make cache directory also read, write, execute



so your using apache on which linux distro ?


i dont know of this is going to help but on my linux this is my structure. CodeIgniter4 is contained within a directory called ads.com
Code:
[[email protected]:/srv/http]$ tree -L 1 ads.com                                                               (08-08 16:28)
ads.com
├── 1.png
├── app
├── bootstrapCss
├── bootstrapS
├── builds
├── composer.json
├── composer.lock
├── env
├── fontawesome
├── Gruntfile.js
├── Gruntfile.js.bk
├── Gruntfile.js.save
├── gulpfile.js
├── license.txt
├── node_modules
├── package.json
├── package-lock.json
├── PHPMailer
├── phpunit.xml.dist
├── public
├── README.md
├── scss
├── spark
├── tecnickcom
├── tests
├── vendor
└── writable

i find it easier to use virtual host config
I use Arch Linux by the way 

CMS in Action
Reply
#3

Quote:I just did mine like this: sudo chmod 777 writable -R

Yes, I missed it. Problem solved. Thank you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB