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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest ubuntu install error

Nortag82 opened this issue · comments

Hello,

I am fairly new on ubuntu and trying to install librebooking on it. This is what i am testing so far, with no luck. Just getting 500 error.

Its a new ubuntu image. checked php.ini for session autostart set to "0". Any support would be apreciated. I tried docker, but never used dicker and got nowhere with it. :) Latest stable release used.

Any support would apreciated.


sudo apt-get install apache2 mysql-server mysql-client php php-cgi libapache2-mod-php php-common php-pear php-mbstring php-text-captcha wget unzip -y
sudo apt install ldap-utils
sudo systemctl start mysql
sudo systemctl start apache2
sudo systemctl enable mysql
sudo systemctl enable apache2
sudo mysql_secure_installation

sudo mysql -u root -p

CREATE DATABASE librebooking;
CREATE USER 'sj'@'localhost' IDENTIFIED BY 'sj';
GRANT ALL PRIVILEGES ON librebooking.* TO 'sj'@'localhost';
FLUSH PRIVILEGES;
exit

sudo wget http://192.168.1.57/wp-content/uploads/Upload/librebooking.zip
sudo unzip librebooking.zip
sudo mv librebooking /var/www/html/
sudo chown -R www-data:www-data /var/www/html/librebooking
sudo chmod -R 0755 /var/www/html/librebooking/tpl
sudo chmod -R 0755 /var/www/html/librebooking/tpl_c

sudo nano /etc/apache2/sites-available/librebooking.conf


<VirtualHost *:80>
DocumentRoot /var/www/html/librebooking
<Directory /var/www/html/librebooking>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted

<Directory /var/www/html/librebooking>
Options FollowSymLinks
Require all granted


sudo a2ensite librebooking
sudo a2enmod rewrite
sudo a2enmod headers
sudo systemctl restart apache2

sudo cp /var/www/html/librebooking/config/config.dist.php /var/www/html/librebooking/config/config.php

sudo nano /var/www/html/librebooking/config/config.php

//script url "http://192.168.1.50/librebooking/Web/" error 500
//install PW set
//adm email set

tried http://192.168.1.50/librebooking/Web/install just getting error 500 html.

sudo mysql librebooking < /var/www/html/librebooking/database_schema/create-schema.sql
sudo mysql librebooking < /var/www/html/librebooking/database_schema/create-data.sql


when I use an older version, i get the webpage up, but saying "unknown error" 2.8.5.4

Do you using Ubuntu 22.04 server? If yes, the problem is MySQL 8 (mysql 8 is default part of ubuntu 22.04 server) . Libre Booking not working with MySQL 8.

Do you using Ubuntu 22.04 server? If yes, the problem is MySQL 8 (mysql 8 is default part of ubuntu 22.04 server) . Libre Booking not working with MySQL 8.

aha? so use mariadb? Thank you so much for the reply.

Try mysql 5.7 - if working, the problem is with mysql8. Best,

Karol

Thanks Karol, I managed to get maria installed and set up. I have added these:

sudo mysql librebooking < /var/www/html/librebooking/database_schema/create-schema.sql
sudo mysql librebooking < /var/www/html/librebooking/database_schema/create-data.sql
sudo mysql librebooking < /var/www/html/librebooking/database_schema/sample-data-utf8.sql

logged in with admin/password but getting this:

UnexpectedValueException: There is no existing directory at "/var/log/librebooking/log" and it could not be created: Permission denied in /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:216 Stack trace: #0 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(135): Monolog\Handler\StreamHandler->createDir() #1 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write() #2 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle() #3 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord() #4 /var/www/html/librebooking/lib/Common/Logging/Log.php(82): Monolog\Logger->info() #5 /var/www/html/librebooking/lib/Application/Authentication/Authentication.php(82): Log::Debug() #6 /var/www/html/librebooking/lib/Application/Authentication/WebAuthentication.php(96): Authentication->Validate() #7 /var/www/html/librebooking/Presenters/LoginPresenter.php(135): WebAuthentication->Validate() #8 /var/www/html/librebooking/Pages/LoginPage.php(208): LoginPresenter->Login() #9 /var/www/html/librebooking/Web/index.php(15): LoginPage->Login() #10 {main}UnexpectedValueException: There is no existing directory at "/var/log/librebooking/log" and it could not be created: Permission denied in /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:216 Stack trace: #0 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(135): Monolog\Handler\StreamHandler->createDir() #1 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write() #2 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle() #3 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord() #4 /var/www/html/librebooking/lib/Common/Logging/Log.php(82): Monolog\Logger->info() #5 /var/www/html/librebooking/lib/Application/Authentication/Authentication.php(89): Log::Debug() #6 /var/www/html/librebooking/lib/Application/Authentication/WebAuthentication.php(96): Authentication->Validate() #7 /var/www/html/librebooking/Presenters/LoginPresenter.php(135): WebAuthentication->Validate() #8 /var/www/html/librebooking/Pages/LoginPage.php(208): LoginPresenter->Login() #9 /var/www/html/librebooking/Web/index.php(15): LoginPage->Login() #10 {main}UnexpectedValueException: There is no existing directory at "/var/log/librebooking/log" and it could not be created: Permission denied in /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:216 Stack trace: #0 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(135): Monolog\Handler\StreamHandler->createDir() #1 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write() #2 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle() #3 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord() #4 /var/www/html/librebooking/lib/Common/Logging/Log.php(82): Monolog\Logger->info() #5 /var/www/html/librebooking/lib/Application/Authentication/Authentication.php(100): Log::Debug() #6 /var/www/html/librebooking/lib/Application/Authentication/WebAuthentication.php(96): Authentication->Validate() #7 /var/www/html/librebooking/Presenters/LoginPresenter.php(135): WebAuthentication->Validate() #8 /var/www/html/librebooking/Pages/LoginPage.php(208): LoginPresenter->Login() #9 /var/www/html/librebooking/Web/index.php(15): LoginPage->Login() #10 {main}UnexpectedValueException: There is no existing directory at "/var/log/librebooking/log" and it could not be created: Permission denied in /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:216 Stack trace: #0 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(135): Monolog\Handler\StreamHandler->createDir() #1 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\Handler\StreamHandler->write() #2 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\Handler\AbstractProcessingHandler->handle() #3 /var/www/html/librebooking/vendor/monolog/monolog/src/Monolog/Logger.php(611): Monolog\Logger->addRecord() #4 /var/www/html/librebooking/lib/Common/Logging/Log.php(82): Monolog\Logger->info() #5 /var/www/html/librebooking/lib/Application/Authentication/Authentication.php(106): Log::Debug() #6 /var/www/html/librebooking/lib/Application/Authentication/WebAuthentication.php(106): Authentication->Login() #7 /var/www/html/librebooking/Presenters/LoginPresenter.php(137): WebAuthentication->Login() #8 /var/www/html/librebooking/Pages/LoginPage.php(208): LoginPresenter->Login() #9 /var/www/html/librebooking/Web/index.php(15): LoginPage->Login() #10 {main}

so i managed to change the log path,

but when logging in with admin/password or user/password, it just goes straight back to the login screen. Does not say wrong usr/pw, just straight back to login page. When pressing "view schedule" i can see the test entries from the sample data.

log shows:

[2023-09-19T21:21:23.348252+00:00] app.INFO: [User= ()] Trying to log in as: admin [File=/var/www/html/librebooking/lib/Application/Authentication/Authentication.php,Line=8>
[2023-09-19T21:21:23.353059+00:00] app.INFO: [User= ()] User was found: admin [File=/var/www/html/librebooking/lib/Application/Authentication/Authentication.php,Line=89] []>
[2023-09-19T21:21:23.353218+00:00] app.INFO: [User= ()] User: admin, was validated: 1 [File=/var/www/html/librebooking/lib/Application/Authentication/Authentication.php,Lin>
<,Line=106] [] []

Any ideas?

changed $conf['settings']['script.url'] = 'http://xxxxxxx/librebooking/Web/';
to:
$conf['settings']['script.url'] = 'http';

and it works now. thanks to @flipside37 's post

Hi @Nortag82

If you solved the issue, could you please close it?
Thanks.