Skip to content

[BUG] Recent image builds for ARM breaks BookStack view rendering #260

@ssddanbrown

Description

@ssddanbrown

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I had a few reports today in BookStack communities regarding broken views in ARM environments using the latest linuxserver image.
This was mostly tracked here: BookStackApp/BookStack#5433

I reproduced in an ARM environment and traced this through the app logic and managed to create a simple non-app specific PHP test case:

echo token_get_all('cat')[0][0] === T_INLINE_HTML ? 'pass' : 'fail';

This was failing inside the container, but passing in all other PHP environments I could test in.

Despite the package versions in the repo stating it's using PHP 8.3.16, PHP inside the container reported 8.3.15.
Upgrading apk packages fixes the issue (after container restart and clearing any caches), and allows the above test case to pass.
I noticed only a subset of packages are upgraded in the process.
I think there might be a mix of 8.3.15 and 8.3.16 PHP packages installed. Opcache for example would report 8.3.16. I think the difference is split between packages installed specifically for BookStack (8.3.16) vs those already installed in the base container (8.3.15).

I'm assuming it's this mix which is causing the problem, although I could not get together an alpine environment with just 8.3.15 to verify this wasn't something 8.3.15 specific instead.

This issue exists on both ls189 and ls188. ls187 is working fine.

Expected Behavior

BookStack views should render, and the above little php test case should pass.

Steps To Reproduce

  1. Create a fresh container stack.
  2. See HTML & template code instead of BookStack.

--- Alternatively ---

  1. Run bash on the container.
  2. Access a PHP shell (php -a).
  3. Run echo token_get_all('cat')[0][0] === T_INLINE_HTML ? 'pass' : 'fail';

Environment

- OS: Rasbian (Debian GNU/Linux 12 (bookworm))
- How docker service was installed: Via Debian apt package

CPU architecture

arm64

Docker creation

services:
  app:
    image: linuxserver/bookstack:v24.12.1-ls189
    ports:
      - "8080:80"
    volumes:
      - ./app:/config
    environment:
      PUID: 1000
      PGID: 1000
      APP_URL: "http://192.168.1.20:8080"
      APP_KEY: "base64:vu/oIlH+j7uc6yIHJASbH1pC9ujnfx6pmJmhTDAOZeE="
      DB_HOST: "db"
      DB_DATABASE: bookstack
      DB_USERNAME: bookstack
      DB_PASSWORD: "password"
    restart: unless-stopped
    depends_on:
      - db
  
  db:
    image: linuxserver/mariadb:latest
    volumes:
      - ./db:/config
    environment:  
      PUID: 1000
      PGID: 1000
      MYSQL_ROOT_PASSWORD: "secret"
      MYSQL_DATABASE: bookstack
      MYSQL_USER: bookstack
      MYSQL_PASSWORD: "password"
    restart: unless-stopped

Container logs

-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions