[BUG] Recent image builds for ARM breaks BookStack view rendering
ssddanbrown opened this issue · 3 comments
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
- Create a fresh container stack.
- See HTML & template code instead of BookStack.
--- Alternatively ---
- Run bash on the container.
- Access a PHP shell (
php -a). - 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 packageCPU 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-stoppedContainer logs
-The package_versions.txt is generated off the amd64 image so there can be discrepancies from time to time.
I've checked the latest build and you're right, it's got a mix of 8.3.15 and 8.3.16 php extensions, happens sometimes with arm because the Alpine builders take a while to get through all the packages.
I've checked they're all 8.3.16 now and triggered a freash build that should hopefully resolve the issue.
Thanks a lot @thespad!
Just as a reference in case you get any related user reports: Users that have the issue persist after updating may need to manually delete any app/www/framework/views/*.php files from their mounted volume to clear bad cached views.
v24.12.1-ls190 has been pushed with all 8.3.16 packages