I did exactly as mentioned in this post (Deploy Laravel 5 to /htdocs - #4 by Admin) but my websites throws 500 error and i don’t know much above backend… so someone could help me please?
Thanks for replying brother @Greenreader9 ! but the first problem i faced is laravel setup error. while searching to solve that error Admin posted a solution for that which is to alter the .htaccess file with new code which i did…
And also to your solution i have tried turning on show errors in the PHP directives…But it’s not showing up…
EDIT: i have removed the .htaccess file from the htdocs which admin asked to create… Now website shows the directories but not the site. can you please check the website link now? And below is the log file.
[2022-03-28 13:46:31] production.ERROR: It is unsafe to run Dusk in production. {"exception":"[object] (Exception(code: 0): It is unsafe to run Dusk in production. at /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/dusk/src/DuskServiceProvider.php:43)
[stacktrace]
#0 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Laravel\\Dusk\\DuskServiceProvider->register()
#1 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Laravel\\Dusk\\DuskServiceProvider))
#2 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(561): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/vol15_1/epizy.com/epiz_31387951/htdocs/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 /home/vol15_1/epizy.com/epiz_31387951/htdocs/index.php(21): require_once('/home/vol15_1/e...')
#10 {main}
"}
[2022-03-28 13:46:31] production.ERROR: It is unsafe to run Dusk in production. {"exception":"[object] (Exception(code: 0): It is unsafe to run Dusk in production. at /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/dusk/src/DuskServiceProvider.php:43)
[stacktrace]
#0 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Laravel\\Dusk\\DuskServiceProvider->register()
#1 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Laravel\\Dusk\\DuskServiceProvider))
#2 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(561): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/vol15_1/epizy.com/epiz_31387951/htdocs/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 /home/vol15_1/epizy.com/epiz_31387951/htdocs/index.php(21): require_once('/home/vol15_1/e...')
#10 {main}
"}
[2022-03-28 13:46:34] production.ERROR: It is unsafe to run Dusk in production. {"exception":"[object] (Exception(code: 0): It is unsafe to run Dusk in production. at /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/dusk/src/DuskServiceProvider.php:43)
[stacktrace]
#0 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Laravel\\Dusk\\DuskServiceProvider->register()
#1 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Laravel\\Dusk\\DuskServiceProvider))
#2 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(561): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/vol15_1/epizy.com/epiz_31387951/htdocs/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 /home/vol15_1/epizy.com/epiz_31387951/htdocs/index.php(21): require_once('/home/vol15_1/e...')
#10 {main}
"}
[2022-03-28 14:08:45] production.ERROR: It is unsafe to run Dusk in production. {"exception":"[object] (Exception(code: 0): It is unsafe to run Dusk in production. at /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/dusk/src/DuskServiceProvider.php:43)
[stacktrace]
#0 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Laravel\\Dusk\\DuskServiceProvider->register()
#1 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Laravel\\Dusk\\DuskServiceProvider))
#2 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(561): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/vol15_1/epizy.com/epiz_31387951/htdocs/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 {main}
"}
[2022-03-28 14:08:45] production.ERROR: It is unsafe to run Dusk in production. {"exception":"[object] (Exception(code: 0): It is unsafe to run Dusk in production. at /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/dusk/src/DuskServiceProvider.php:43)
[stacktrace]
#0 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Laravel\\Dusk\\DuskServiceProvider->register()
#1 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Laravel\\Dusk\\DuskServiceProvider))
#2 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(561): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/vol15_1/epizy.com/epiz_31387951/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/vol15_1/epizy.com/epiz_31387951/htdocs/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 {main}
"}
The setting works most of the time, but not always, depending on the website.
Some software, like Laravel, override the server settings for displaying error. In that case, you need to enable debug mode in the software, or check the logs it produces.
Fortunately, you found the logs already.
I take it you just uploaded the vendor folder from your own computer to your site? Usually this is good enough, but it seems that Laravel specifically wants the development packages to be removed from your site.
To do this, you can run the following command in your project root on your own computer:
composer install --no-dev --optimize-autoloader
This will make the vendor folder production ready by removing the development software and generating an optimized autoloader (which may provide a slight performance boost).
Then you should delete the currently uploaded vendor folder from your site, and replace it with the one you just created. And I think you’ll also want to replace the bootstrap/cache/ folder, because it contains references to which Laravel providers you have installed.
Note that talking impolitely about people is not a way to get responses. As everyone here besides Admin is a volunteer, no one here is obliged to help you.
Personally, I can’t help you because I do not use Larvel.
You need to do that from your computers command prompt. Make sure that you have composer installed.
Hello @Admin i have done everything like you said. and uploaded new updated files to the server. but again facing the same issue… what can i do can you please tell me?
If you used Composer directly, or the Laravel installer, you should have Composer on your computer already.
If you used their magic script, you probably are using Sail for development, which means you can just prefix that command with sail if I understand the documentation correctly:
But I don’t use Sail, so I’m not sure. But I can tell you that knowing how to use Composer is a very strong requirement to be able to work on Laravel in the first place.
How about:
Does it produce the exact same error message?
Did you also remove and replace the currently uploaded vendor folder and bootstrap/cache/ folder?
Answer is it doesn’t showing any error messages… Just the directory and when i click public folder it throws 500 error.
yes @Admin i had removed and uploaded fresh files from my computer.
Yes i tried to check that but the log file is empty… i have tried turning it on in app debug line in .env and config/app.php file… but still the log file is empty. and also tried to change from production to local…
And to summarise the problem now is :
1st issue when i load the website it’s showing directory.
2nd issue is when i click the public folder it throws 500 error…
And to answer this i don’t know anything related on this laravel or composer topic. Please need your help in fixing this…
It sounds like you don’t need my help just to fix this, it sounds like you need my help to setup the entire website for you. And I’m happy to help with specific issues, but not teach you the basics of Laravel development.
So I think you first need to learn more about Composer and Laravel. Because you’re going to have a very hard time managing a Laravel application if you don’t know anything about Laravel.
You have to remember: Laravel is a framework, not a CMS. It’s a tool for developers, intended to be used by developers. It’s not designed to be easy to setup without knowledge of PHP development. If you want something like that, maybe try WordPress instead.