不加载Firebird扩展 [英] Not Loading Firebird Extension

查看:100
本文介绍了不加载Firebird扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在PHP中使用Firebird扩展.我的ext文件夹中有扩展文件(php_pdo_firebird.dll, php_interbase.dll).我像这样将它们添加到我的php.ini文件中

I'm trying to use the Firebird extension in PHP. I've got the extension files (php_pdo_firebird.dll, php_interbase.dll) in my ext folder. I'm adding them in my php.ini file like so

...
[PHP_PDO_FIREBIRD]
extension=php_pdo_firebird.dll
[PHP_INTERBASE]
extension=php_interbase.dll
...

没有错误提示无法加载扩展,但是每当我打印我的phpinfo时,都没有列出任何扩展.我在这里想念什么?

No errors are being thrown saying the extensions could not be loaded and yet whenever I print my phpinfo I don't see either of them listed. What am I missing here?

对于它的价值,我正在Windows 7上使用Apache 2.2运行PHP 5.3.14 TS版本.

For what it's worth, I'm running PHP version 5.3.14 TS using Apache 2.2 on Windows 7.

似乎正在记录一些错误,仅是我的error_log设置被覆盖了(对于看到此错误的人,请再次检查C:\ Windows \ Temp \ php-errors.日志).现在,它告诉我,只要文件明确存在,就找不到指定的模块.

It seems some errors are being logged, it's just that my error_log setting was being overwritten (for those seeing this, double check C:\Windows\Temp\php-errors.log). Now it's telling me the specified modules could not be found whenever the file clearly exists.

PHP Warning:  PHP Startup: Unable to load dynamic library 
    'C:\Program Files (x86)\PHP\ext\php_pdo_firebird.dll' - 
    The specified module could not be found.
    in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library 
    'C:\Program Files (x86)\PHP\ext\php_interbase.dll' - 
    The specified module could not be found.
    in Unknown on line 0

推荐答案

想通了!好吧,首先让基础知识变得简单:

Figured it out! Okay, first to get the basics out of the way:

  • 确保DLL的版本与您的PHP版本匹配.
  • 对于那些使用Windows安装程序的用户,由于某种原因,它没有提供包括Interbase和Firebird模块的选项,因此您必须下载匹配的.zip文件,然后从中的ext文件夹中复制它们.在那里.
  • 仔细检查extension_dir设置中是否有错字,例如未转义的反斜杠.仅当该值未用引号引起来"时才适用.
  • Make sure the version of the DLLs matches your PHP version.
  • For those who use the Windows installer, for some reason it doesn't provide an option to include the Interbase and Firebird modules so you'll have to download the matching .zip file and copy them from the ext folder in there.
  • Double check for any typos, such as unescaped backslashes, in your extension_dir setting. This only applies if the value isn't "wrapped in quotation marks."

现在要接受政变.该错误消息极具误导性.此时,它应该可以找到您的DLL,但缺少一个完整的部分:fbclient.dll,可以在Firebird安装的bin文件夹中找到它.我之前读过的每个地方都说将fbclient.dll放在ext文件夹中,但是如果将它放在PHP文件夹的根目录中,则仅 起作用.

Now for the coup de grace. That error message is extremely misleading. At this point it should be finding your DLLs but it's missing one integral piece: fbclient.dll which can be found in the bin folder of your Firebird installation. Everywhere I read before said to place fbclient.dll in the ext folder but it only works if you put it in the root of your PHP folder.

希望这有助于将来任性的灵魂:)

Hope this helps future wayward souls :)

这篇关于不加载Firebird扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆