HTTP error 500 : Uncaught ReflectionException: Class config does not exist in #372

Closed
opened 2026-02-04 19:09:40 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @Alwaysin on GitHub (Jul 10, 2017).

LOOK https://github.com/BookStackApp/BookStack/issues/431#issuecomment-314180752 for the real bug about LDAP

  • BookStack Version: latest (used git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch today)
  • PHP Version: 7.0.19-1
  • MySQL Version: 10.1.23-MariaDB-9+deb9u1 Debian 9.0
Expected Behavior

Website working

Actual Behavior

Website not working : HTTP ERROR 500.

In the logs, I have:

[Mon Jul 10 16:08:34.382725 2017] [:error] [pid 3649] [client 10.10.9.180:57699] PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php:681\nStack trace:\n#0 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): ReflectionClass->__construct('config')\n#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php(565): Illuminate\Container\Container->build('config')\n#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(702): Illuminate\Container\Container->make('config')\n#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(105): Illuminate\Foundation\Application->make('config')\n#4 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(263): app('config')\n#5 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(211): config('app.debug')\n#6 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Exception in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 681

Originally created by @Alwaysin on GitHub (Jul 10, 2017). ### LOOK https://github.com/BookStackApp/BookStack/issues/431#issuecomment-314180752 for the real bug about LDAP * BookStack Version: latest (used ```git clone https://github.com/BookStackApp/BookStack.git --branch release --single-branch``` today) * PHP Version: 7.0.19-1 * MySQL Version: 10.1.23-MariaDB-9+deb9u1 Debian 9.0 ##### Expected Behavior Website working ##### Actual Behavior Website not working : HTTP ERROR 500. In the logs, I have: [Mon Jul 10 16:08:34.382725 2017] [:error] [pid 3649] [client 10.10.9.180:57699] PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php:681\nStack trace:\n#0 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): ReflectionClass->__construct('config')\n#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php(565): Illuminate\\Container\\Container->build('config')\n#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(702): Illuminate\\Container\\Container->make('config')\n#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(105): Illuminate\\Foundation\\Application->make('config')\n#4 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(263): app('config')\n#5 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(211): config('app.debug')\n#6 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Exception in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 681
Author
Owner

@lommes commented on GitHub (Jul 10, 2017):

Is this a fresh install?

Did Step 2 of https://www.bookstackapp.com/docs/admin/installation/#manual finish without error?

@lommes commented on GitHub (Jul 10, 2017): Is this a fresh install? Did Step 2 of https://www.bookstackapp.com/docs/admin/installation/#manual finish without error?
Author
Owner

@Alwaysin commented on GitHub (Jul 10, 2017):

Is this a fresh install?

Affirmative!

Did Step 2 of https://www.bookstackapp.com/docs/admin/installation/#manual finish without error?

Affirmative too!
I did run it as root and got a warning for that, but I don't think this could be the problem.

@Alwaysin commented on GitHub (Jul 10, 2017): > Is this a fresh install? Affirmative! > Did Step 2 of https://www.bookstackapp.com/docs/admin/installation/#manual finish without error? Affirmative too! I did run it as root and got a warning for that, but I don't think this could be the problem.
Author
Owner

@lommes commented on GitHub (Jul 10, 2017):

Did you run the git clone as root too? This might cause problems, if you did not change rights afterwards. Is the above the full log from storage/logs/laravel.log?

@lommes commented on GitHub (Jul 10, 2017): Did you run the git clone as root too? This might cause problems, if you did not change rights afterwards. Is the above the full log from storage/logs/laravel.log?
Author
Owner

@Alwaysin commented on GitHub (Jul 10, 2017):

EDIT: I ran the command again to be sure and I got:

> php artisan optimize


  [Dotenv\Exception\InvalidFileException]
  Dotenv values containing spaces must be surrounded by quotes.


Script php artisan optimize handling the post-install-cmd event returned with error code 1

So I edited my .env which indeed had spaces without quotes... Do I need to run composer install everytime I change the .env?

NOW I have:

Whoops, looks like something went wrong.
ErrorException in Ldap.php line 57:
ldap_search(): Search: Operations error

when I log in using LDAP. By reverting to "standard", I can login with the default admin account.

Do you think I could have misconfigured my LDAP connection? It is working with another app :/

@Alwaysin commented on GitHub (Jul 10, 2017): EDIT: I ran the command again to be sure and I got: ``` > php artisan optimize [Dotenv\Exception\InvalidFileException] Dotenv values containing spaces must be surrounded by quotes. Script php artisan optimize handling the post-install-cmd event returned with error code 1 ``` So I edited my .env which indeed had spaces without quotes... Do I need to run ```composer install``` everytime I change the .env? NOW I have: ``` Whoops, looks like something went wrong. ErrorException in Ldap.php line 57: ldap_search(): Search: Operations error ```` when I log in using LDAP. By reverting to "standard", I can login with the default admin account. Do you think I could have misconfigured my LDAP connection? It is working with another app :/
Author
Owner

@lommes commented on GitHub (Jul 10, 2017):

Sorry I'm not into LDAP. Hopefully someone else can pickup from here.

@lommes commented on GitHub (Jul 10, 2017): Sorry I'm not into LDAP. Hopefully someone else can pickup from here.
Author
Owner

@Alwaysin commented on GitHub (Jul 10, 2017):

MORE EDIT: Ok I have hit this bug: https://github.com/BookStackApp/BookStack/issues/317#issuecomment-287480474

It works when I specify an OU, not from the root. This is somewhat problematic for me :(

Thank you @lommes for having looked into it! Waiting for another nice guy who is into LDAP :D

@Alwaysin commented on GitHub (Jul 10, 2017): MORE EDIT: Ok I have hit this bug: https://github.com/BookStackApp/BookStack/issues/317#issuecomment-287480474 It works when I specify an OU, not from the root. This is somewhat problematic for me :( Thank you @lommes for having looked into it! Waiting for another nice guy who is into LDAP :D
Author
Owner

@Alwaysin commented on GitHub (Jul 10, 2017):

Solution for my Active Directory was to follow https://github.com/BookStackApp/BookStack/issues/317#issuecomment-314184873 and then https://github.com/BookStackApp/BookStack/issues/317#issuecomment-314189818

@Alwaysin commented on GitHub (Jul 10, 2017): Solution for my Active Directory was to follow https://github.com/BookStackApp/BookStack/issues/317#issuecomment-314184873 and then https://github.com/BookStackApp/BookStack/issues/317#issuecomment-314189818
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#372