LibreBooking / app

Repository for the last open source version of Booked Scheduler. The "develop" branch contains the most current working code of the project and should be considered beta. The "master" branch is the most current stable release of BookedScheduler. Please read doc/README.md for further details.
GNU General Public License v3.0
406 stars 242 forks source link

Fresh installation: PHP Fatal error: Uncaught Error: Call to a member function GetSectionKey() on null ... #402

Closed michaelShriver closed 3 months ago

michaelShriver commented 3 months ago

Host OS: Debian 12.6 Bookworm Apache: apache2 2.4.61-1~deb12u1 PHP: PHP 8.2.20 MySQL: mysql Ver 15.1 Distrib 10.11.6-MariaDB

Upon a fresh install on Debian, I am not able to get the install page to load. The apache log shows the following messages:

[Wed Aug 07 14:08:21.692838 2024] [php:warn] [pid 706:tid 706] [client 192.168.10.53:51672] PHP Warning: Undefined array key "librebooking" in /var/www/librebooking/lib/Config/Configuration.php on line 128 [Wed Aug 07 14:08:21.692874 2024] [php:error] [pid 706:tid 706] [client 192.168.10.53:51672] PHP Fatal error: Uncaught Error: Call to a member function GetSectionKey() on null in /var/www/librebooking/lib/Config/Configuration.php:133\nStack trace:\n#0 /var/www/librebooking/lib/Common/Logging/Log.php(94): Configuration->GetSectionKey()\n#1 /var/www/librebooking/lib/Common/Logging/ExceptionHandler.php(19): Log::Error()\n#2 [internal function]: ExceptionHandler::Handle()\n#3 {main}\n thrown in /var/www/librebooking/lib/Config/Configuration.php on line 133

config.php:

`<?php

mysqli_report(MYSQLI_REPORT_OFF); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT); ini_set('display_errors', 1); ini_set('display_startup_errors', 1);

/**

$conf['settings']['schedule']['use.per.user.colors'] = 'false'; // color reservations by user $conf['settings']['schedule']['show.inaccessible.resources'] = 'true'; // whether or not resources that are inaccessible to the user are visible $conf['settings']['schedule']['reservation.label'] = '{name}'; // format for what to display on the reservation slot label. Available properties are: {name}, {title}, {description}, {email}, {phone}, {organization}, {position}, {startdate}, {enddate} {resourcename} {participants} {invitees} {reservationAttributes}. Custom attributes can be added using att with the attribute id. For example {att1} $conf['settings']['schedule']['hide.blocked.periods'] = 'false'; // if blocked periods should be hidden or shown $conf['settings']['schedule']['update.highlight.minutes'] = '0'; // if set, will show reservations as 'updated' for a certain amount of time $conf['settings']['schedule']['show.week.numbers'] = 'false'; /**

$conf['settings']['authentication']['allow.facebook.login'] = 'false'; $conf['settings']['authentication']['allow.google.login'] = 'false'; $conf['settings']['authentication']['required.email.domains'] = ''; $conf['settings']['authentication']['hide.booked.login.prompt'] = 'false'; $conf['settings']['authentication']['captcha.on.login'] = 'false'; /**

treborin commented 3 months ago

Hi @michaelShriver,

If you are installing under the librebooking folder, you should change this line: $conf['settings']['script.url'] = 'http://192.168.10.52/Web; for this: $conf['settings']['script.url'] = 'http://192.168.10.52/librebooking/';

NOTE: if you try to use this online, i suggest you use https:// instead of http://

michaelShriver commented 3 months ago

/var/www/librebooking is my Apache document root, with the release .zip file extracted directly in there so "/Web" is correct.

For future reference, I resolved the issue by installing php-mysql.

apt-get install php8.2-mysql