Support the ongoing development of Laravel.io →
Database Laravel
Last updated 2 years ago.

rezwan-hossain liked this thread

1

You need to enable debugging.

You need access to the file system. There is hidden '.env' file. You need to ensure it has debugging enabled. In case the application environment is set to 'production', you also need to flush the configuration cache to have your changes have effect.

0

Thanks, @ Firtzberg for your reply. I have found the .env file and have set the APP_DEBUG to true. It is a production environment, but I don't know how to flush the configuration cache that you mentioned.

0

In production environments the config gets cached. If I remember correctly the file is in bootstrap/cache/config.php. Rename it for now to anything else, e.g. config.php.back.

After that the values from the .env file should have effect.

0

Hmm... There isn't a config.php file in there. What I see is .gitignore, packages.php, and services.php. Anywhere else I should look?

0

Getting environment variables to work can often be tricky. Try one more. Change APP_ENV to 'something'. Just don't use 'local', 'testing' nor 'production' values.

0

Ok, I just did. What else? The page is still showing Internal Server Error. Almost as if it can't connector to the database. That's my guess anyway.

0

Not sure why it doesn't load the environment variables.

Let's hack through to get the exception. Go to vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php

Go to line ~100 to the beginning of the report(Throwable $e) method and add the first line dd($e);. This should stop PHP and display the exception.

0

You can revert your changes to the .env file. You'll also need to remove the dd($e); later.

0

I just did and still, nothing happens... Quick question. I just checked the site's error log from the Plesk dashboard and saw this warning. Could this help solve the problem I'm having?

AH01071: Got error 'PHP message: PHP Warning: simplexml_load_file(https://jcadima.dev/killswitch.xml): failed to open stream: Connection refused in /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code on line 18PHP message: PHP Stack trace:PHP message: PHP 1. {main}() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/index.php:0PHP message: PHP 2. bootloader->__construct() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/index.php:37PHP message: PHP 3. bootloader->loadFile() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code:11PHP message: PHP 4. simplexml_load_file() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code:18PHP message: PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://jcadima.dev/killswitch.xml" in /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code on line 18PHP message: PHP Stack trace:PHP message: PHP 1. {main}() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/index.php:0PHP message: PHP 2. bootloader->__construct() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/index.php:37PHP message: PHP 3. bootloader->loadFile() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code:11PHP message: PHP 4. simplexml_load_file() /var/www/vhosts/prospectpros.com/app.prospectpros.com/public/bootloader.php(1) : eval()'d code(3) : eval()'d code:18'

0

I don't think bootloader is meant to open an external xml document. To mee it seems like jcadima.dev developed the website and made it possible to swith the website off whenever he wants. Compare that file to the laravel github state. Make sure you compare agains the right version.

tweetix, rezwan-hossain liked this reply

2

You are correct, I did a bit more digging and found out that the bootloader was actually loading a killswitch.xml from his personal server. Could've been the reason why he's ghosting us. I'm gonna compare the files now. Be right back...

0

You were right... That bootloader.php file doesn't even exist in the Laravel framework. The developer put that there with his killswitch in order to turn off the site. I was able to remove it successfully and restore the site back to its original state. Thanks a lot for all your help and that last advice on checking the file against the repository.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Marc Joseph tweetix Joined 21 May 2020

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.