Help I got this problem when uploading my first laravel project to cpanel, can anyone help me. I’ve tried clear cache but it did not work
The error code is:
IlluminateFoundationBootstrapHandleExceptions::handleError vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:185
and the other error code hinted is:
ErrorException file_put_contents(C:Usersmy_userDesktopmy_project
namestorageframework/sessions/DpZjS9gGbWcX1jfqlu4btBLD02ZaRMU58uzgIbgX):
failed to open
public function put($path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock =false);
// return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
2
Answers
This sounds like a permission issue with your storage folder. The laravel documentation states:
So try running the following on the server where you uploaded the code:
Since you are running cpanel, instead of running these commands in the terminal, you can use these CPanel Instructions for updating your folder permissions.
I recommend that you reset the whole project folders and files permissions to be suitable with hosting by these two terminal command
and then
also delete the old
config.php
fileafter the old
config.php
file deleted