500 Internal Error and showing directory only

Username : epiz_31387951 URL: http://mytradejournals.epizy.com

Error Message

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?

Welcome!

3 Likes

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}
"} 

I really dunno, but stackoverlow has an answer:

2 Likes

After trying this solution it’s showing like this. what can i do now brother @jaikrishna.t ?

No use in having knowledge… if no one is ready to help the one who is facing an issue. :upside_down_face:

WOuld have helped if I knew much about laravel. Admin works with laravel, he might know.

2 Likes

no brother i didn’t say you… atleast you tried to help… others just watched and replying in other topics!

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.

4 Likes

Okay admin i’ll try it… but the issue is i’m newbie in this laravel and so can u please tell where should i start from, to do this

composer install --no-dev --optimize-autoloader

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.

1 Like

I really didn’t meant to be rude… just got fed up and expressed it… Really sorry if it hurted your feelings. :slightly_smiling_face:

3 Likes

@Admin This is what i should do right?

Screenshot by Lightshot Pic 1

Screenshot by Lightshot Pic 2

Looks correct :grin:.

2 Likes

I started uploading whole updated project files now… i’ll let u know here the update.

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?

It depends on how you have Laravel set up.

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:

sail composer install --no-dev --optimize-autoloader

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?

2 Likes

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.

2 Likes

Haha :joy: no no @Admin thanks for trying to help… BTW I actually deleted all the files and working with basic php site. which i know to work with…

yes learnt the lesson… not going to use it untill i learn that thing.

Thanks for your valuable time @Admin