不确定 PHP / PDO,但ConnectionTimeoutfirebird.conf 文件中有参数您可以尝试。默认值为 180 秒(引用自conf文件):
# ----------------------------
# Client Connection Settings (Basic)
#
# Seconds to wait before concluding an attempt to connect has failed.
#
# Type: integer
#
#ConnectionTimeout = 180
Run Code Online (Sandbox Code Playgroud)
如果您的 FireBird 服务器与运行 PHP 脚本的服务器不在同一台服务器上,并且“PHP 服务器”上没有 firebird.conf 文件,请尝试将其放入 fbclient dll 所在的同一目录中。或者如果FIREBIRD定义了环境变量,则进入var指向的目录。