0
I’m trying to run/create a container in Docker with PHP + Firebird, I found a container that runs the Firebird, I found another that runs PHP and Firebird, but when I try to consume the database:
$conn = ibase_connect('localhost:/database.fdb', 'user', 'masterkey');
get the message:
Warning: ibase_connect(): Unable to complete network request to host "localhost". Failed to establish a connection
I am working on a project that currently runs Firebird and we need to migrate to PHP/Mysql and as it is a very large database we need to access constantly to migrate the data. I’ve done some tests on Windows using Ibexpert, the database is working properly.
Someone has already experienced this problem, or tried using PHP + Firebird on Docker?
RESOLVED
Was missing the property links
so that the other container could connect to the bank. I’ll leave the docker-compose.yml
here if someone needs to connect to Firebird + PHP using Docker.
version: '2'
services:
db:
image: jacobalberty/firebird:2.5-ss
ports:
- 3050:3050
volumes:
- ./data:/databases
php:
image: almeida/php-firebird
ports:
- 80:80
volumes:
- ./www:/usr/share/nginx/html/
links:
- db
The password to access Firebird inside the db container is inside the file /firebird/etc/SYSDBA.password
Thank you @Tanya for the answer. I tried it both separately and in the same container. I will read the articles you gave me and as soon as possible, I comment here the result.
– Nathan Souza
I added the property
links
to Docker-Compose.yml and then it worked, one container was not "seeing" the other. I’ll leave the Docker-Compose.yml I used here in case anyone goes through it with Firebird.– Nathan Souza