PHP 启动:无法加载动态库

2022-01-21 00:00:00 windows firebird windows-8 php

我正在尝试使用 Firebird 2.5.2.26539:

I am trying to use Firebird 2.5.2.26539 with:

  • Windows 8
  • Apache 2.2.22
  • PHP 5.4.10

当我在 php 中启用 firebird 的扩展时:

When i enable the extensions of firebird in php:

- extension=php_interbase.dll
- extension=php_pdo_firebird.dll

我收到以下错误:

[26-Dec-2012 12:08:11 UTC] PHP 警告:PHP 启动:无法加载动态库 'C:Program Files (x86)PHPextphp_interbase.dll' - 无法找到指定的模块.在第 0 行的未知中

[26-Dec-2012 12:08:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program Files (x86)PHPextphp_interbase.dll' - Impossible to locate the specified module. in Unknown on line 0

[26-Dec-2012 12:08:13 UTC] PHP 警告:PHP 启动:无法加载动态库 'C:Program Files (x86)PHPextphp_pdo_firebird.dll' - 无法找到指定的模块.在第 0 行的未知中

[26-Dec-2012 12:08:13 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program Files (x86)PHPextphp_pdo_firebird.dll' - Impossible to locate the specified module. in Unknown on line 0

如果我在命令行中使用 PHP -a,错误信息是不同的:找不到 fbclient.dll.

if i make PHP -a in command line, the error message is different: cannot find fbclient.dll.

我运行了flarerobin,它打开了数据库.所以我将 fbclient.dll 复制到 PHP 根路径.然后错误变为:

I have the flamerobin running and it opens the database. So i copy the fbclient.dll to the PHP root path. Then the errors change to:

[26-Dec-2012 11:55:46 UTC] PHP 警告:PHP 启动:无法加载动态库 'C:Program Files (x86)PHPextphp_interbase.dll' - %1 不是一个有效的 Win32 应用程序.在第 0 行的未知中

[26-Dec-2012 11:55:46 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program Files (x86)PHPextphp_interbase.dll' - %1 is not a valid Win32 application. in Unknown on line 0

[2012 年 12 月 26 日 11:55:46 UTC] PHP 警告:PHP 启动:无法加载动态库 'C:Program Files (x86)PHPextphp_pdo_firebird.dll' - %1 不是一个有效的 Win32 应用程序.在第 0 行的未知中

[26-Dec-2012 11:55:46 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program Files (x86)PHPextphp_pdo_firebird.dll' - %1 is not a valid Win32 application. in Unknown on line 0

谁能帮我解决这个问题?我怀疑这个版本的 Firebird 仍然没有为 PHP 做正确的扩展.谢谢.

Can anyone help me on this one? I suspect that this version of Firebird still does not have the correct extensions made for the PHP. Thank you.

推荐答案

Cli 和 Apache PHP 使用两个不同的配置文件运行.这将解释 CLI 模式下缺少的错误消息.可能是此应用程序的扩展未存储在 PHP 扩展文件夹中.我不熟悉windows下的配置,所以你可能需要谷歌搜索windows PHP扩展目录并确保你的扩展文件在那里.

Cli and Apache PHP run with two different configuration files. That will explain the lacking error message in CLI mode. The likelihood is the extensions for this application where not stored in the PHP extension folder. I'm not versed with the configurations under windows so you may need to google for the Windows PHP extension directory and ensure your extension file is there.

根据您的错误判断,路径是C:Program files(x86)PHPext

Judging by your error the path is "C:Program files(x86)PHPext

在尝试加载它们之前,请确保您的扩展文件在那里.

Please ensure your extension files are there before attempting to load them.

相关文章