Failed to open stream: No such file or directory (file_put_contents)

Hi, anyone know or experienced this error?

file_put_contents(/var/www/vhosts/kvntravel.nl/httpdocs/storage/framework/cache/data/e0/79/e079ea5d307dcbdf96bd33ab1be3281f243a6474): Failed to open stream: No such file or directory

public function put($path, $contents, $lock = false) {. return file_put_contents($path, $contents, $lock ? LOCK_EX : 0); }
It came out of nothing without doing any changes.

Website refer for more detailed info about the error: https://www.kvntravel.nl/nl

Hope really some one can help me.

Hi @kevinvermeulen ,

Maybe a file/folder permission?

In config/system.php, see “default permission masks”.

It might be also on the server itself.

1 Like

Unfortunately, it’s not changing a thing. My permissions masks are 755 for both of them. I changed file to 644 and kept the folderr at 755 but without any success.
I can access the admin area.

Any other suggestions to try?
Hosting told as he doesn’t have that much knowledge about OC he don’t know how to solve it…

.env

APP_DEBUG=true
APP_URL=https://www.kvntravel.nl
APP_LOCALE=en

ACTIVE_THEME=kvntravel
CMS_ROUTE_CACHE=false
CMS_ASSET_CACHE=false
LINK_POLICY=detect
CMS_SAFE_MODE=false
DEFAULT_FILE_MASK=644
DEFAULT_FOLDER_MASK=775

This can happen sometimes when the file isn’t deleted properly, and leaves a pointer reference. You may need to delete this file manually or clear the cache

php artisan cache:clear
1 Like

Got my site back to work after using a backup from 1 oct. Maybe not the right way but it’s working. Next time (hopefully not) I would try @daft’s method!