Skip to content

[BUG] Add php gettext support #108

@erat-verbum

Description

@erat-verbum

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When loading php, it fails to find the gettext library:

PHP Warning:  PHP Startup: Unable to load dynamic library 'gettext' (tried: /usr/lib/php83/modules/gettext (Error loading shared library /usr/lib/php83/modules/gettext: No such file or directory), /usr/lib/php83/modules/gettext.so (Error loading shared library /usr/lib/php83/modules/gettext.so: No such file or directory)) in Unknown on line 0

Expected Behavior

It would find the gettext dynamic library file locally.

This can be fixed by simply adding php83-gettext as a package in Dockerfile.

Steps To Reproduce

Run:

php -m | grep gettext

or try and run a .php file with the _() function in it.

Environment

CPU architecture

x86-64

Docker creation

nginx:
    image: lscr.io/linuxserver/nginx:latest
    container_name: nginx
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - ./nginx/config:/config
    ports:
      - 80:80
      - 443:443
    restart: unless-stopped

Container logs

───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 1.26.2-r4-ls307
Build-date: 2025-01-30T04:25:33+00:00
───────────────────────────────────────
    
using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions