Comments (6)
Sorry about the time it took to answer this, but I didn't receive notifications for the last few issues being submited.
Can you check the error log at /var/log/apache2/booked-error.log, it should have some more info about what is happening. If not, enable log4php, in the config directory to make booked more verbose, so that you can see at what point it's failing.
from app.
I faced the same issue. I use the [librebooking/docker](image: librebooking/librebooking:2.8.6.1).
Here are the logs:
[Wed Nov 15 21:00:06.536654 2023] [php:warn] [pid 147] [client 172.19.0.5:38236] PHP Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/html/lib/Server/Server.php on line 254 [Wed Nov 15 21:00:14.546920 2023] [php:notice] [pid 147] [client 172.19.0.5:38236] Error: TypeError: mysqli_select_db(): Argument #1 ($mysql) must be of type mysqli, bool given in /var/www/html/lib/Database/MySQL/MySqlConnection.php:42\nStack trace:\n#0 /var/www/html/lib/Database/MySQL/MySqlConnection.php(42): mysqli_select_db()\n#1 /var/www/html/lib/Database/Database.php(23): MySqlConnection->Connect()\n#2 /var/www/html/Domain/Access/AnnouncementRepository.php(11): Database->Query()\n#3 /var/www/html/Presenters/LoginPresenter.php(123): AnnouncementRepository->GetFuture()\n#4 /var/www/html/Pages/LoginPage.php(126): LoginPresenter->PageLoad()\n#5 /var/www/html/Web/index.php(22): LoginPage->PageLoad()\n#6 {main} [Wed Nov 15 21:00:14.546971 2023] [php:notice] [pid 147] [client 172.19.0.5:38236] #0 /var/www/html/lib/Common/Logging/ExceptionHandler.php(22): WebExceptionHandler->HandleException(Object(TypeError))\n#1 [internal function]: ExceptionHandler::Handle(Object(TypeError))\n
from app.
Hi @gparami,
it looks like you are having an issue connecting to your database.
Could you please share your docker-compose.yml
file? Please XXX any visible password.
from app.
Thank you for the reply @colisee. Here's the docker-compose.yml file:
version: "3.7"
services:
librebooking-db:
image: linuxserver/mariadb:10.6.13
container_name: librebooking-db
restart: unless-stopped
networks:
- internal
volumes:
- vol-db:/config
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- FILE__MYSQL_ROOT_PASSWORD=/run/secrets/db_root_pwd
- MYSQL_USER=${MYSQL_USER}
- FILE__MYSQL_PASSWORD=/run/secrets/db_user_pwd
secrets:
- db_root_pwd
- db_user_pwd
app:
image: librebooking/librebooking:2.8.6.1
container_name: librebooking
restart: unless-stopped
depends_on:
- librebooking-db
networks:
- internal
- traefik
volumes:
- vol-app:/config
environment:
- LB_DB_NAME=${MYSQL_DATABASE}
- LB_INSTALL_PWD_FILE=/run/secrets/lb_install_pwd
- LB_DB_USER=${MYSQL_USER}
- LB_DB_USER_PWD_FILE=/run/secrets/lb_user_pwd
- LB_DB_HOST=db
- LB_ENV=production
- LB_LOG_FOLDER=/var/log/librebooking
- LB_LOG_LEVEL=error
- LB_LOG_SQL=false
- TZ=${TZ}
secrets:
- lb_install_pwd
- lb_user_pwd
labels:
- "traefik.enable=true"
- "traefik.http.routers.librebooking.entrypoints=https"
- "traefik.http.routers.librebooking.tls.certresolver=myresolver"
- "traefik.http.routers.librebooking.rule=Host(`librebooking.xxx.ca`)"
- "traefik.http.services.librebooking.loadbalancer.server.port=80"
volumes:
vol-db:
name: librebooking_data
vol-app:
name: librebooking_conf
networks:
traefik:
external: true
internal:
external: false
secrets:
db_root_pwd:
file: ./db_root_pwd.txt
db_user_pwd:
file: ./db_user_pwd.txt
lb_user_pwd:
file: ./db_user_pwd.txt
lb_install_pwd:
file: ./lb_install_pwd.txt
from app.
Hi again @gparami ,
I believe I found the mistake in your docker-compose.yml
file.
Your database server is known by its service name: librebooking-db
. Therefore, the environment variable LB_DB_HOST used by service app
should reference it as follows: - LB_DB_HOST=librebooking-db
.
If you want to keep the value of your LB_DB_HOST environment varianle as-is, then you need to create an alias as follows:
services:
librebooking-db:
image: linuxserver/mariadb:10.6.13
container_name: librebooking-db
restart: unless-stopped
networks:
internal:
aliases:
- db
Please, close this issue if my answer fixed it.
from app.
Thanks again @colisee! It looks like my copy-pasting skills are subpar 😛. Forgot to change the LB_DB_HOST
after I changed the container name. It works now!
from app.
Related Issues (20)
- Try ldap configuration HOT 3
- accessories administration
- Make "View availability" show up the next 7 days HOT 4
- Error after update latest Libre HOT 5
- Stripe Sources API deprecated - migrate to Payment Intents
- Member with status "inactiv"
- remove legend bar from schedule HOT 2
- PHP Warnings in Logs
- ini_set() warnings in cron logs HOT 1
- Upgrade 2.8.5.5 -> 2.8.6.1 - SQL ERROR HOT 7
- Problems with character encoding v2.8.6.1 HOT 1
- Error: No reCAPTCHA clients exist.
- Smarty template implementation flaws
- No navigation to resource group/type/status management?
- Loading reservations ...., no calendar entries HOT 1
- app.ERROR: [[email protected]] Uncaught exception: Error: Call to a member function FullName() on string in C:\wamp64\www\resa2024\tpl_c\..._0.file.ReservationCreated.tpl.php:128 HOT 1
- 🔝 LibreBooking Demo Website
- Cant find "Forcing Resources to be Booked Together"
- Class ScheduleWebServiceView contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ISchedulePage::BindViewableResourceReservations) HOT 1
- Create a reservation with 2 resources
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.