Vvveb icon indicating copy to clipboard operation
Vvveb copied to clipboard

Uncaught Error: Undefined constant "Vvveb\System\Component\SITE_ID" in docker

Open JoaquinDecima opened this issue 1 year ago • 1 comments

I am performing the installation on a server, when installing docker and trying to enter the site I get the following:

Warning: require(/var/www/html//vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/html/system/core/startup.php on line 339

Warning: http_response_code(): Cannot set response code - headers already sent (output started at /var/www/html/system/core/startup.php:339) in /var/www/html/system/core/frontcontroller.php on line 115

Fatal error: Uncaught Error: Undefined constant "Vvveb\System\Component\SITE_ID" in /var/www/html/system/component/component.php:175 Stack trace: #0 /var/www/html/system/component/component.php(99): Vvveb\System\Component\Component->loadComponents() #1 /var/www/html/system/component/component.php(66): Vvveb\System\Component\Component->__construct(Object(Vvveb\System\Core\View), false, NULL) #2 /var/www/html/system/core/view.php(382): Vvveb\System\Component\Component::getInstance(Object(Vvveb\System\Core\View), false, NULL) #3 /var/www/html/system/core/frontcontroller.php(167): Vvveb\System\Core\View->render() #4 /var/www/html/system/core/startup.php(264): Vvveb\System\Core\FrontController::notFound(false, Array, 500) #5 [internal function]: Vvveb\System\Core\exceptionHandler(Object(Error)) #6 {main} thrown in /var/www/html/system/component/component.php on line 175

Fatal error: Uncaught ErrorException: Uncaught Error: Undefined constant "Vvveb\System\Component\SITE_ID" in /var/www/html/system/component/component.php:175 Stack trace: #0 /var/www/html/system/component/component.php(99): Vvveb\System\Component\Component->loadComponents() #1 /var/www/html/system/component/component.php(66): Vvveb\System\Component\Component->__construct(Object(Vvveb\System\Core\View), false, NULL) #2 /var/www/html/system/core/view.php(382): Vvveb\System\Component\Component::getInstance(Object(Vvveb\System\Core\View), false, NULL) #3 /var/www/html/system/core/frontcontroller.php(167): Vvveb\System\Core\View->render() #4 /var/www/html/system/core/startup.php(264): Vvveb\System\Core\FrontController::notFound(false, Array, 500) #5 [internal function]: Vvveb\System\Core\exceptionHandler(Object(Error)) #6 {main} thrown in /var/www/html/system/component/component.php:175 Stack trace: #0 /var/www/html/system/core/startup.php(329): Vvveb\System\Core\vErrorHandler(1, 'Uncaught Error:...', '/var/www/html/s...', 175) #1 [internal function]: Vvveb\System\Core\fatalErrorHandler() #2 {main} thrown in /var/www/html/system/component/component.php on line 175

Below I provide the docker compose that I am using:

services:
  db:
    image: mariadb
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: asd123
      MYSQL_DATABASE: vvvebjs
      MYSQL_USER: vvveb
      MYSQL_PASSWORD: asd123
    volumes:
      - db:/var/lib/mysql
    networks:
      - internal

  php:
    image: vvveb/vvvebcms:php8.3-fpm-alpine
    environment:
      DB_HOST: db
      DB_DATABASE: vvvebjs
      DB_USER: vvveb
      DB_PASSWORD: asd123
      DB_ENGINE: mysqli #sqlite,pgsql
    volumes:
      - vvveb-volume:/var/www/html
      - db:/var/lib/mysql
    ports:
      - "80:80"
    links:
      - db:mysql
    depends_on:
      - db
    networks:
      - internal


volumes:
  vvveb-volume:
  db:

networks:
  internal:
    driver: bridge

JoaquinDecima avatar Dec 14 '24 03:12 JoaquinDecima

Thanks for the bug report, the latest build was missing vendor/autoload.php it's now fixed, please try again.

givanz avatar Dec 14 '24 20:12 givanz