Firebird5, macOS and php-fpm

77 views
Skip to first unread message

Prog

unread,
Jul 22, 2026, 8:27:36 AM (5 days ago) Jul 22
to Firebird-PHP
Hi.

I'm trying to use PHP 8.5.8 (php-fpm) and Firebird 5.0.3.1683 on macOS (Sequoia and Tahoe).
When I try to connect to Firebird 5 from a PHP script using PDO, the PHP process simply terminates without any error messages.
If I run the same script using “php-cgi -b” instead of php-fpm, everything works.

My question is: what’s happening with Firebird 5 when I try to connect to it from a PHP script via php-fpm?
Why don’t connections to Firebird 5 work in php-fpm?

The php-fpm process backtrace files are attached to this message.

Does anyone know how to fix this?
backtrace.txt
backtrace-all.txt

Lester Caine

unread,
Jul 22, 2026, 9:17:20 AM (5 days ago) Jul 22
to Prog, Firebird-PHP
Out and about for rest of day ... but my setup runs fine ;) what ini file is the php-fpm picking up? My initial problem was it did not have access to the extensions while cgi did
Message has been deleted
Message has been deleted

Prog

unread,
Jul 22, 2026, 10:00:47 AM (5 days ago) Jul 22
to Firebird-PHP
My php-fpm configuration files:

/opt/homebrew/etc/php/8.5/php.ini,
/opt/homebrew/etc/php/8.5/php-fpm.conf
/opt/homebrew/etc/php/8.5/php-fpm.d/www.conf
/opt/homebrew/etc/php/8.5/conf.d/pdo_firebird.ini

currently looks as shown in the attachment.

Could you show me a files where this all works correctly for you?


середа, 22 липня 2026 р. о 16:17:20 UTC+3 lsc...@gmail.com пише:
www.conf
pdo_fpm.conf
php.ini
pdo_firebierd.ini

Lester Caine

unread,
Jul 22, 2026, 4:08:13 PM (5 days ago) Jul 22
to firebi...@googlegroups.com
Try again to list ;)

On 22/07/2026 15:00, Prog wrote:
> Could you show me a files where this all works correctly for you?

Sorry for slow reply ... been out for a hospital appointment ...

On suse tumbleweed I use systemd to start the web stack, so firebird,
nginx and php-fpm, and the .services file has the line
ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config
/etc/php8/fpm/php-fpm.conf

This fires up to give https://rdm1.uk/phpinfo.php which shares the
conf.d folder and the fpm/ini.php file is a symlink off the base
php.ini, so that both cli and php-fpm have the same configuration.


--
Lester Caine
------------

Prog

unread,
Jul 22, 2026, 8:41:25 PM (5 days ago) Jul 22
to Firebird-PHP
I tried doing this manually.
I can’t connect to Firebird from within php-fpm.

% /opt/homebrew/opt/php/sbin/php-fpm --nodaemonize --fpm-config /opt/homebrew/etc/php/8.5/php-fpm.conf
[23-Jul-2026 03:32:54] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[23-Jul-2026 03:32:54] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[23-Jul-2026 03:32:54] NOTICE: fpm is running, pid 54163
[23-Jul-2026 03:32:54] NOTICE: ready to handle connections
[23-Jul-2026 03:33:05] WARNING: [pool www] child 54164 exited on signal 11 (SIGSEGV) after 10.578921 seconds from start
[23-Jul-2026 03:33:05] NOTICE: [pool www] child 54167 started

% sudo /opt/homebrew/opt/php/sbin/php-fpm --nodaemonize --fpm-config /opt/homebrew/etc/php/8.5/php-fpm.conf
[23-Jul-2026 03:33:54] NOTICE: fpm is running, pid 54172
[23-Jul-2026 03:33:54] NOTICE: ready to handle connections
[23-Jul-2026 03:33:56] WARNING: [pool www] child 54173 exited on signal 9 (SIGKILL) after 2.885893 seconds from start
[23-Jul-2026 03:33:56] NOTICE: [pool www] child 54175 started

But if you use "php-cgi -b ...", it works.

середа, 22 липня 2026 р. о 23:08:13 UTC+3 lsc...@gmail.com пише:

Lester Caine

unread,
Jul 23, 2026, 3:07:03 AM (4 days ago) Jul 23
to firebi...@googlegroups.com
On 23/07/2026 01:41, Prog wrote:
> I tried doing this manually.
> I can’t connect to Firebird from within php-fpm.

I'm not familiar enough with macOS to give better prompts, but it does
work in a similar way to linux. I have firebird itself running as user
firebird and then nginx and php-fpm running as user nginx ...

You say you can't connect, but first check is what does phpinfo()
display in each mode? is PDO_Firebird listed as active in both cases?

--
Lester Caine
------------
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Prog

unread,
Jul 24, 2026, 2:49:02 AM (3 days ago) Jul 24
to Firebird-PHP
Yes, PDO_Firebird is available in both cases.

четвер, 23 липня 2026 р. о 10:07:03 UTC+3 lsc...@gmail.com пише:

Prog

unread,
Jul 24, 2026, 2:51:44 AM (3 days ago) Jul 24
to Firebird-PHP
пʼятниця, 24 липня 2026 р. о 09:49:02 UTC+3 Prog пише:
php.fpm-fcgi.phpinfo.pdf
php.cgi-fcgi-phpinfo.pdf

Lester Caine

unread,
Jul 24, 2026, 11:58:06 AM (3 days ago) Jul 24
to Firebird-PHP
OK if the extension is identical in both copies, then what are you getting messages wise when trying to connect in php-fpm ? This may still be a permissions problem with the database but it should tell us that ...

Prog

unread,
Jul 26, 2026, 5:08:52 AM (yesterday) Jul 26
to Firebird-PHP
This is my script:

<?php

$dbname = '/Library/Frameworks/firebird.framework/Versions/A/Resources/examples/empbuild/employee.fdb';
$user = 'SYSDBA';
$password = 'masterkey';

try {
    $pdo = new PDO(
        "firebird:dbname=$dbname",
        $user,
        $password,
        [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
    );
    echo "Connection successful!";
} catch (Throwable $e) {
    echo 'Error: ' . $e->getMessage();
}

?>

If i run it using ‘php-cgi -b’, i get ‘Connection successful!’.

But if I run it under ‘php-fpm’, i get a segmentation fault and php-fpm restarts the child process running PHP.

I’ve already shown a log output about this in my previous posts.  

пʼятниця, 24 липня 2026 р. о 18:58:06 UTC+3 lsc...@gmail.com пише:
Reply all
Reply to author
Forward
0 new messages