laravel not showing error but only http:500 error? - laravel

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

Related

Error in laravel excel export - touch(): Unable to create file /var/folders/ because Permission denied

I install larvel excel and when i try to get the excel it shows the following error
touch(): Unable to create file /var/folders/wg/vbj_bbf14gl7glz__j1xpvg40000gn/T/laravel-excel-62n8RpljR3nr31FGxE96fwrovKEhXPWT because Permission denied
The excel is looking for a path to store the file temporarily before the data is imported. But the filepath leads to the system that maybe of Xampp or any other host that you are using which doesn't provide you the permission to write.
I solved this by going to excel.php file inside config folder and changing the path to
'local_path' => public_path('imported')
Hope this helps.
Add folders to server user-group and setup permissions to STORAGE + BOOTSTRAP/CACHE [on Apache - question did not state server arch]
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
sudo chgrp -R www-data /var/www/html/example/
sudo chmod -R 775 /var/www/html/example/storage

How can I make website with CRUDBooster and Laravel working?

Website based on CRUDBooster and Laravel not working
Tried to change permissions to main directory -r 777
(1/1) UnexpectedValueException The stream or file
"/var/www/storage/logs/laravel.log" could not be opened: failed to
open stream: Permission denied
I'm having this error when I'm trying to access website build with CRUDBooster and Laravel. Already tried to change permissions to 775 and 777 to all folders and subfolders inside but still same error.
Any idea?
Thank you in advance!
You need to give right permissions to storage and bootstrap/cache folders (sudo chmod -R 775 storage and sudo chmod -R 775 bootstrap/cache) and give right group permission to project folder (sudo chown -R $USER:www-data projectFolder). This last one (group permission) is for Apache server7

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

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.

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