configure.php: Could not find key in config file
reaseno opened this issue · comments
I have tried to update my calendar from 6.8.5.5 to 6.8.6.1. My calendar says Unknown error.
Not sure if those are a problem which I got in /Web/install/configure.php step:
"Could not find key in config file"
Which key?
The rest seems to be information messages:
UnexpectedValueException: The stream or file "/app.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: [User= ()] Editing configuration file. Email=, UserId=0 [File=/is/htdocs/wp1016630_9BA2VGFXQB/www/flexrooms/webkalender/Presenters/Install/ConfigurePresenter.php,Line=72] in /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146 Stack trace: #0 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write(Array) #1 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord(200, '[User= ()] Edi...', Array) #3 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/lib/Common/Logging/Log.php(82): Monolog\Logger->info('[User= ()] Edi...') #4 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(72): Log::Debug('Editing configu...', Array, 0) #5 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(29): ConfigurePresenter->Configure() #6 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/Pages/Install/ConfigurePage.php(63): ConfigurePresenter->PageLoad() #7 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/Web/install/configure.php(8): ConfigurePage->PageLoad() #8 {main}UnexpectedValueException: The stream or file "/app.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: [User= ()] Could not find key in config file: logging [File=/is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/lib/Config/Configurator.php,Line=161] in /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146 Stack trace: #0 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write(Array) #1 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /is/htdocs/wp1016630_9BA2VGFXQB/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord(200, '[User= ()] Cou...', Array) #3 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Common/Logging/Log.php(82): Monolog\Logger->info('[User= ()] Cou...') #4 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php(161): Log::Debug('Could not find ...', Array) #5 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php(148): Configurator->AreKeysTheSame(Array, Array) #6 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php(42): Configurator->IsConfigOutOfDate('../../config/co...', '../../config/co...') #7 /is/htdocs/wp3948822/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(80): Configurator->Merge('../../config/co...', '../../config/co...') #8 /is/htdocs/wp3948822/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(29): ConfigurePresenter->Configure() #9 /is/htdocs/wp3948822/www/vuforu85/webkalender/Pages/Install/ConfigurePage.php(63): ConfigurePresenter->PageLoad() #10 /is/htdocs/wp3948822/www/vuforu85/webkalender/Web/install/configure.php(8): ConfigurePage->PageLoad() #11 {main}UnexpectedValueException: The stream or file "/app.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: [User= ()] Config file is out of date. Merging new config options in. [File=/is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php,Line=153] in /is/htdocs/wp3948822/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:146 Stack trace: #0 /is/htdocs/wp3948822/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write(Array) #1 /is/htdocs/wp3948822/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /is/htdocs/wp3948822/www/vuforu85/webkalender/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord(200, '[User= ()] Con...', Array) #3 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Common/Logging/Log.php(82): Monolog\Logger->info('[User= ()] Con...') #4 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php(153): Log::Debug('Config file is ...') #5 /is/htdocs/wp3948822/www/vuforu85/webkalender/lib/Config/Configurator.php(42): Configurator->IsConfigOutOfDate('../../config/co...', '../../config/co...') #6 /is/htdocs/wp3948822/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(80): Configurator->Merge('../../config/co...', '../../config/co...') #7 /is/htdocs/wp3948822/www/vuforu85/webkalender/Presenters/Install/ConfigurePresenter.php(29): ConfigurePresenter->Configure() #8 /is/htdocs/wp3948822/www/vuforu85/webkalender/Pages/Install/ConfigurePage.php(63): ConfigurePresenter->PageLoad() #9 /is/htdocs/wp3948822/www/vuforu85/webkalender/Web/install/configure.php(8): ConfigurePage->PageLoad() #10 {main}
For me, that's a different question. This is about the problem that I get an Unknown error when calling LibreBooking after the update. But I can still close it, because I solved the problem by only updating the database and manually recreating the config file, since this is where the error occurred.
Or do you want to say that the config file could not be updated because the log could not be written? If so, this is a bug.
I would also like to suggest that you store the log directory in LibreBooking by default. Then the problem would not occur in the first place.
OK I think I got it.
Your issue concerns the upgrade process from 2.8.5.5 to 2.8.6 (and above) whereas the log feature is activated but the log file does not exist, yet.
Am I correct?
Yes, but I'm not sure if the log is relevant to this problem. At least it contains messages for which I have given interpretations and for which I was hoping to get more information.
I tried configure.php again with the old config.php, plus the options for the log, and still get the "unknown error back to previous page" in the web interface. The log shows this:
app.ERROR: [User= ()] Uncaught exception: Error: Call to undefined method PEAR_Error::getItem() in /is/htdocs/lb/lib/Config/Configurator. php:91 Stack trace: #0 /is/htdocs/wp1016630_9BA2VGFXQB/www/flexrooms/lb/lib/Config/Configurator.php(146): Configurator->GetSettings('../../config/co...') #1 /is/htdocs/lb/lib/Config/Configurator.php(42): Configurator->IsConfigOutOfDate('../../config/co...', '../../config/co...') #2 /is/htdocs/lb/Presenters/Install/ConfigurePresenter.php(80): Configurator->Merge('../../config/co...', '../../config/co...') #3 /is/htdocs/lb/Presenters/Install/ConfigurePresenter.php(29): ConfigurePresenter->Configure() #4 /is/htdocs/lb/Pages/Install/ConfigurePage.php(63): ConfigurePresenter->PageLoad() #5 /is/htdocs/lb/Web/install/configure.php(8): ConfigurePage->PageLoad() #6 {main} [File=/is/htdocs/lb/lib/Common/Logging/ExceptionHandler.php,Line=19] [] []
I have the feeling you are having an issue with your new config.php
file.
Could you please:
- Check that file
config.php
exists in directoryconfig
- Compare it with file
config/config.dist.php
and ensure that its structure is identical - If everything looks fine to you, can you share its content with us? Please XXX any password
Could ou also describe ALL the steps you took to perform the librebooking upgrade?