-
Notifications
You must be signed in to change notification settings - Fork 17
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
Error compiling the driver for php 8.3 #55
Comments
Hi, I will try to build the driver this weekend. |
Added the driver for PHP 8.3 to the releases section. Successfully tested with Firebird 5.0. Please give it a try. |
I downloaded the latest driver change from github and tried to compile it. The same error appears. It seems that the file exists on Windows but not on Linux Thanks for your work for the community |
Could you please add dll for windows aswell? Thank you 🙏 |
Good morning, |
You can get Windows DLLs built against v3.0.1 here: https://github.com/mlazdans/php-firebird/releases/tag/v3.0.1 |
Good morning |
I copied the missing file (iberror_c.h) from the manual Firebird 5.0 installer to /opt/firebird/include/firebird/impl. After this I managed to compile. |
Segue um passo-a-passo para ajudar na instalação do Interbase PDO para PHP no Ubuntu 22.04 LTE, especialmente para quem está enfrentando problemas: 1. Instalar as dependências
2. Adicionar o repositório do PHP
3. Atualizar os pacotes
4. Instalar o módulo do Interbase para a versão específica do PHP Escolha a versão do PHP entre 5.6 e 8.3 e instale o módulo Interbase com o seguinte comando:
Substitua {versao} pela versão específica do PHP desejada, por exemplo, para PHP 7.4, use php7.4. 5. Verificar a instalação
Se o módulo estiver instalado corretamente, você verá uma saída indicando a presença do módulo Interbase. Se precisar de mais alguma coisa, estou à disposição! Procedimento testado com as seguintes versões do PHP 7.4, 8.1 e 8.2, os testes foram utilizando o PDO com PHP puro e testado tambem com o Laravel 8 e Laravel 10. Não houve a necessidade de copilar os arquivos, visto que o repositório ondrej já possui eles copilados. |
Here's a step-by-step guide to help with installing Interbase PDO for PHP on Ubuntu 22.04 LTE, especially for those facing issues: 1. Install Dependencies
2. Add PHP Repository
3. Update Packages
4. Install Interbase Module for Specific PHP Version Choose the PHP version between 5.6 and 8.3 and install the Interbase module with the following command:
Replace {version} with the specific PHP version desired, for example, for PHP 7.4, use php7.4. 5. Verify Installation
If the module is installed correctly, you'll see output indicating the presence of the Interbase module. If you need anything else, feel free to ask! Procedure tested with the following PHP versions 7.4, 8.1, and 8.2, tests were conducted using PDO with plain PHP and also tested with Laravel 8 and Laravel 10. There was no need to compile files, as the ondrej repository already has them compiled. |
You understand that with the Ondrej compilation, the Firebird library used will be the one that is installed on the distro and not necessarily the same one that you have on your distro. I believe that this can cause problems. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Você entende que com a compilação do Ondrej a biliboteca usada do Firebird será a que ele tem instalado na distro e não necessariamente a mesma que você tem na sua distro. Creio que isso pode gerar problemas. |
Entendo sua preocupação, mas o uso do repositório do Ondrej pode ser uma solução prática e segura para a instalação. Passei algumas horas tentando resolver o mesmo problema que o seu, sem sucesso, especialmente quando se trata de versões mais recentes ou específicas que não estão disponíveis nos repositórios padrão da distribuição. Ao utilizar o repositório do Ondrej para instalar a biblioteca Firebird, você está, de fato, dependendo da versão da biblioteca disponibilizada por esse repositório. No entanto, ao utilizá-la e fazer testes, consegui resolver meu problema de forma rápida. Por isso, destaquei no comentário que o processo foi realizado no Ubuntu versão 22.04 LTS. Lembrando que, mesmo compilando e instalando o PHP, ele reconheceu o Interbase. No entanto, ao utilizar o PDO, houve um erro, sendo necessário recompilar e habilitar o PDO. O processo manual funciona, mas como precisei resolver o problema de forma rápida, optei pelo repositório do Ondrej. =============================================================== I understand your concern, but using the Ondrej repository can be a practical and safe solution for installation. I spent several hours trying to solve the same problem as yours without success, especially when it comes to more recent or specific versions that are not available in the distribution's standard repositories. By using the Ondrej repository to install the Firebird library, you are indeed relying on the version of the library provided by this repository. However, by using it and conducting tests, I was able to solve my problem quickly. That is why I emphasized in the comment that the process was carried out on Ubuntu version 22.04 LTS. Remember that even after compiling and installing PHP, it recognized Interbase. However, when using PDO, it showed an error, requiring recompilation and enabling PDO. The manual process works, but since I needed to solve the problem quickly, I chose to use the Ondrej repository. |
Environment:
Debian 12
PHP 8.3
Firebird 5.0
PHPize and ./configure work normally.
In make it gives this error:
root@alexandre:/opt/configuracoes/firebirdphp/php-firebird-master# make
/bin/bash /opt/configuracoes/firebirdphp/php-firebird-master/libtool --mode=compile cc -I. -I/opt/configuracoes/firebirdphp/php-firebird-master -I/opt/configuracoes/firebirdphp/php-firebird-master/include -I/opt/configuracoes/firebirdphp/php-firebird-master/main -I/opt/configuracoes/firebirdphp/php-firebird-master -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/opt/firebird/include -I/usr/include/firebird -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_COMPILE_DL_EXT=1 -c /opt/configuracoes/firebirdphp/php-firebird-master/interbase.c -o interbase.lo -MMD -MF interbase.dep -MT interbase.lo
libtool: compile: cc -I. -I/opt/configuracoes/firebirdphp/php-firebird-master -I/opt/configuracoes/firebirdphp/php-firebird-master/include -I/opt/configuracoes/firebirdphp/php-firebird-master/main -I/opt/configuracoes/firebirdphp/php-firebird-master -I/usr/include/php/20230831 -I/usr/include/php/20230831/main -I/usr/include/php/20230831/TSRM -I/usr/include/php/20230831/Zend -I/usr/include/php/20230831/ext -I/usr/include/php/20230831/ext/date/lib -I/opt/firebird/include -I/usr/include/firebird -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_COMPILE_DL_EXT=1 -c /opt/configuracoes/firebirdphp/php-firebird-master/interbase.c -MMD -MF interbase.dep -MT interbase.lo -fPIC -DPIC -o .libs/interbase.o
/opt/configuracoes/firebirdphp/php-firebird-master/interbase.c:30: warning: "_GNU_SOURCE" redefined
30 | #define _GNU_SOURCE
|
: note: this is the location of the previous definition
In file included from /opt/firebird/include/ibase.h:1200,
from /opt/configuracoes/firebirdphp/php-firebird-master/php_ibase_includes.h:29,
from /opt/configuracoes/firebirdphp/php-firebird-master/interbase.c:40:
/opt/firebird/include/./iberror.h:93:10: fatal error: firebird/impl/iberror_c.h: No such file or directory
93 | #include "firebird/impl/iberror_c.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:210: interbase.lo] Erro 1
The text was updated successfully, but these errors were encountered: