Laravel 5.4 have Blank Page - No Error Display, No Error Log - laravel

I Developed one Laravel Project. it has working in local environment properly. But, when i move the project to the server it has no error Shown. I check Error log, it has empty. i enabled APP_DEBUG=true to .env file and config/app.php also.
I give 777 permission for storage Folder. how to find error in my project, anybody help me...

Change storage and logs folder permission to : 0755
and
laravel.log file permission to : 0644
For any folder to be accessible by script, permission should be set to 0755 and for files to 0644 in standard production scenario.

This code works for me chmod -R 777 storage/
I'm using brew. Hope it could help.

Related

How to solve the problem of accessing the storage in Laravel folder

Faced a problem accessing the storage folder. A symbolic link was created, but when I try to access any file in the storage folder, I get an error 403 "You do not have permission to access this object. The file is not readable, or the server cannot read it." I have a second project on a local machine, everything works fine there. I tried to give 777 permissions to the storage folder, but this causes the "Permisson denied" error. I will be glad to any help!
Macos catalina
Laravel Permissions
first change ownership of the laravel directory to our web group.
sudo chown -R :www-data /var/www/laravel
Next we need to give the web group write privileges over our storage directory so it can write to this folder.
sudo chmod -R 775 /var/www/laravel/storage
where laravel is the name of the root

Laravel storage issue while pushing to production server

I am facing permission denied for storage directory everytime when I push to production even its added in gitignore file like:/storage/*
Also I get "can not create public/storage" error and in this case I delete public/storage and again run php artisan storage:link command.
I tried git -r --cached public/storage command to resolve this issue but not resolved.
can anyone suggest a permanent solution for it? I am getting frustrated doing the same thing again and again. And I know I am doing the small mistake that I could not figure out.
Thanks in advance.
You have to give read/write permission to your folder
Try this to give it the permission
sudo chmod -R 777 storage

laravel not showing error but only http:500 error?

i have enabled Laravel debug true and also error in .env and storage folder permission is also 777 and also tried with 0775 but Laravel is not showing cause of 500 error in logs
This error come most of the time because of folder permissions. You need to give permissions 777 recursively to your folders like
sudo chmod 777 laravel/public -R
sudo chmod 777 laravel/storage -R
You can check I hope It will fix the issue, If not then you need to do some more steps in linux. Here is detail: https://rapidsol.blogspot.com/2018/12/how-to-disable-selinux-security.html?q=composer

Laravel 5.3 Cannot Find File Error

I've setup a project more than a month ago and all of a sudden (this afternoon) I started getting the following error:
ErrorException in Filesystem.php line 111: file_put_contents(/var/www/html/project/api/storage/framework/cache/d8/00/d800874b5dc22b961e0ee92f8d1c5a09c24ee911): failed to open stream: No such file or directory
I've done research and tried the following with no success:
php artisan cache:clear
chmod -R 777 storage (I know this is not ideal)
composer update
Nothing is working. Before the chmod I was getting a permission error. I'm tapped out of ideas. Does anyone know what is causing this and how to resolve it?
You gave 777 to /storage folder but did you also make sure it's in same group as apache server is running?
Generally apache is in www-data group, add storage and bootstrap folder to be written by this group:
chgrp -R www-data /storage /bootstrap
Assign current user and group permission to read and write:
chmod -R ug+rw /storage /bootstrap
I'm 99% sure this will do it.
My server runs CentOS 7 and somehow Selinux was set to enforcing which breaks Laravel for some reason. I remember changing it when I first set up Laravel, but somehow it reverted back.
So setting it to permissive or disabled fixed it for me.
https://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html

Laravel does't work in my web host

I uploaded my laravel files to my web host and when i'm trying to access the public folder I get error HTTP ERROR 500.
Couldn't find any logs in my storage/logs/ and the folder is writeable.
Any ideas what can cause this error without any logs?
Try to give those permissions to your project directories bootstrap/cache & storage:
chown -R apache:apache storage
chown -R apache:apache bootstrap/cache
Hope this helps.

Resources