Announcement

#1 2023-04-26 17:10:02

paivadaniel
Member
2023-04-26
8

HTTP ERROR 500 in Piwigo Start Installation with Docker

Hello, I'm trying to install Piwigo using Docker but I'm having problems installing.

After accessing the port where I started the piwigo container, always after filling the database and user data, when clicking to start the installation, the following error occurs:

This page isn't working0.0.0.0 is currently unable to handle this request.
HTTP ERROR 500

I already tried to install by uploading separate containers for piwigo and the piwigo database, and with docker-compose, my last attempt was with:

version: '3'

services:
   db:
     image: lscr.io/linuxserver/mariadb:latest
     container_name: piwigo_db
     restart: unless-stopped
     environment:
       - PUID=1002
       - PGID=1002
       - TZ=America/Sao_Paulo
       - MYSQL_ROOT_PASSWORD=ZZZ
       - MYSQL_DATABASE=piwigo_db
       - MYSQL_USER=ZZZ
       - MYSQL_PASSWORD=ZZZ
     volumes:
       - /media/Courses/piwigo/database:/config

   piwigo:
     image: lscr.io/linuxserver/piwigo:latest
     container_name: piwigo_web
     restart: unless-stopped
     depends_on:
       - db
     environment:
       - PUID=1000
       - PGID=1000
       - TZ=America/Sao_Paulo
     ports:
       - "82:80"
       - "444:443"
     volumes:
       - /media/Courses/piwigo/gallery:/gallery
       - /media/Courses/piwigo/config:/config
       
After uploading the containers, they are running normally, I can confirm this with docker-ps or portainer.
How can I solve it?

Offline

 

#2 2023-05-18 16:30:26

k5
Member
2017-11-05
68

Re: HTTP ERROR 500 in Piwigo Start Installation with Docker

Hello
maybe try changing permissions on /local/config to 777 and files

For example su chown 777 /local/config

it seems to me that database.inc.php is added

Last edited by k5 (2023-05-18 16:39:00)

Offline

 

#3 2023-05-18 20:10:18

erAck
Only trying to help
2015-09-06
2038

Re: HTTP ERROR 500 in Piwigo Start Installation with Docker

Nonsense. chown changes ownership not file mode, which would be chmod. Anyway, 777 is hitting everything with a big club and certainly the execution bit is not needed in the permissions of a config or any .php file..
See
[Forum, post 180666 by erAck in topic 28678] Http Error 500
[Forum, post 183419 by erAck in topic 31993] What are the correct permissions for Piwigo files and directories ?


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2023-11-18 08:18:27

kirsen
Member
2023-11-18
2

Re: HTTP ERROR 500 in Piwigo Start Installation with Docker

For me, it took 1/2 year to figure out whats wrong.  I started installing piwigo and database on docker long time ago, I had several attempts, which all ended with 500 on install. but today I've manage to install it properly. So couple tips from me:

- there is no error log on docker terminal
- logs are not inside container, they are located in mounted config directory
- 500 means that you cannot connect to database (WHY THERE IS NO ERROR PAGE!!!)

- when you fill your connection data on install page your hostname should not be "localhost" but it has to be service name of your database docker instance.

Last edited by kirsen (2023-11-18 08:19:21)

Offline

 

#5 2023-11-18 12:53:08

erAck
Only trying to help
2015-09-06
2038

Re: HTTP ERROR 500 in Piwigo Start Installation with Docker

kirsen wrote:

- 500 means that you cannot connect to database (WHY THERE IS NO ERROR PAGE!!!)

BECAUSE YOUR SETUP WAS FOULED!

geez..

Attempting to access localhost in a Docker container resolves to the Docker container itself (unless you run it with the wide open --network host option) and the generic 500 Internal Server Error last resort is thrown server side before Piwigo even could display an error page.

Recommended read: https://huzaima.io/blog/connect-localhost-docker


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact