Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Pathnames in the docker-piwigo image differ from the piwigo standard results in malfunction of plugins #81

Open
1 task done
PaulSpa opened this issue Sep 28, 2024 · 1 comment

Comments

@PaulSpa
Copy link

PaulSpa commented Sep 28, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

For example the plugin Batch Downloader includes the file ../../include/common.inc.php in download.php. This would be /app/www/include/common.inc.php in the docker image
The relative path is correct for a Piwigo standard installation. But in the docker image the path becomes different: /app/www/public/include/common.inc.php

Expected Behavior

Pathnames in the docker image (as used by plugins) should be identical to the standard installation methods of Piwigo.

Steps To Reproduce

This is explained in the issue I related to the Batch Downloader Plugin

Environment

- OS:"Ubuntu 23.10"
- How docker service was installed: distro's packagemanager

CPU architecture

x86-64

Docker creation

version: "2.1"
services:
  piwigo:
    #image: linuxserver/piwigo
    image: lscr.io/linuxserver/piwigo:latest
    container_name: piwigo
    hostname: piwigo    
    environment:
      - PUID=1000   ##change to your user id. It cannot be the root user
      - PGID=1000   ##change to your user group ID
      - TZ=Europe/Berlin
    volumes:
      - /docker/piwigo/piwigo-gallery/data:/config
      - /data/foto/:/gallery
    ports:
      - 8125:80
    dns:
      - 192.168.200.63
      - 192.168.200.1
      - 1.1.1.1
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.piwigo.entrypoints=http"
      - "traefik.http.routers.piwigo.rule=Host(`piwigo-webname.net`)"
      - "traefik.http.middlewares.piwigo-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.piwigo.middlewares=piwigo-https-redirect"
      - "traefik.http.routers.piwigo-secure.entrypoints=https"
      - "traefik.http.routers.piwigo-secure.rule=Host(`piwigo-webname.net`)"
      - "traefik.http.routers.piwigo-secure.tls=true"
      - "traefik.http.routers.piwigo-secure.tls.certresolver=http"
      - "traefik.http.routers.piwigo-secure.service=piwigo"
      - "traefik.http.services.piwigo.loadbalancer.server.port=80"
      - "traefik.docker.network=proxy"
  mariadb:
    image: tobi312/rpi-mariadb:10.6-alpine
    container_name: piwidb
    env_file:
      - stack.env
    environment:
      - PUID=1000   ##change to your user id. 
      - PGID=1000   ##change to your user group ID. 
      #- MYSQL_ROOT_PASSWORD=xxxx
      - TZ=Europe/Berlin
      - MYSQL_DATABASE=piwigo
      - MYSQL_USER=piwigo
      #- MYSQL_PASSWORD=yyyy
    volumes:
      #- /docker/piwigo/piwigo-db/data:/config
      - /docker/piwigo/piwigo-db/data:/var/lib/mysql
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 3308:3306
    restart: unless-stopped
networks:
  default:
    external:
      name: proxy

Container logs

docker logs piwigo does not show the issue.
I found the issue logged in 
root@piwigo:/config/log/nginx/error.log

2024/09/28 11:29:08 [error] 294#294: *7179 FastCGI sent in stderr: "PHP message: PHP Warning:  include(../../include/common.inc.php): Failed to open stream: No such file or directory in /config/www/plugins/BatchDownloader/download.php on line 3; PHP message: PHP Warning:  include(): Failed opening '../../include/common.inc.php' for inclusion (include_path='.:/usr/share/php83') in /config/www/plugins/BatchDownloader/download.php on line 3; PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function check_status() in /config/www/plugins/BatchDownloader/download.php:5
Stack trace:
#0 {main}
  thrown in /config/www/plugins/BatchDownloader/download.php on line 5" while reading response header from upstream, client: 172.18.0.2, server: _, request: "GET /plugins/BatchDownloader/download.php?set_id=13&zip=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "piwigo-webname.net", referrer: "https://piwigo-webname.net/index.php?/collections/edit/2&action=advdown_set&down_size=original"
~
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Issues
Development

No branches or pull requests

1 participant