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
390 stars 233 forks source link

Install not working and can not access register page #70

Open iKylobayd opened 3 years ago

iKylobayd commented 3 years ago

Hello,

I have followed a guide to install booked scheduler on CentOS7. But at the last step, it tells me to navigate to: “http://yourdomain.com/Web/register.php” This page does not load, I can not figure out what I have done wrong, can anyone help me out?

In the directory /etc/httpd/conf.d/booked.conf I have the following:

<VirtualHost *:80> ServerName 192.168.230.66 DocumentRoot /var/www/html/booked <Directory /var/www/html/booked> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted ErrorLog /var/log/apache2/booked-error.log CustomLog /var/log/apache2/booked-access.log combined

With ServerName I have the IP address of the server. And in the directory /var/www/html/booked/config.php I have this:

<?php

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'; /**

In the directory /var/www/html/booked, apache is the owner. Can anyone help me out what im doing wrong, since I dont understand why the register page does not load.

Thanks in advance!

effgarces commented 2 years ago

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.

gparami commented 11 months ago

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}

colisee commented 11 months ago

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.

gparami commented 11 months ago

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
colisee commented 11 months ago

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.

gparami commented 11 months ago

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!

JohnVillalovos commented 5 months ago

@gparami Is this issue resolved? If so, can you close the issue?