PHP-GTK的demo在windows下运行出现的问题

本文记录了解决Firebird数据库与PHP集成时遇到的问题,包括动态库加载失败及位数不匹配等错误。最终通过替换fbclient.dll文件解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I am trying to use Firebird 2.5.2.26539 with wamp,When i enable the extensions of firebird in php:

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

I get these errors:

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

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

  

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

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 Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_interbase.dll' - %1 is not a valid Win32 application. in Unknown on line 0

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

  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.

 

Are you sure you're not using 64bit Apache / PHP but 32bit Firebird (or vice versa)? – ain Dec 26 '12 at 12:58 

Try copy all this three files to c:\windows\system32\ or to apache bit folder – newman Dec 26 '12 at 13:18

2 Answers:

1.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.

Judging by your error the path is "C:\Program files(x86)\PHP\ext\

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

Moving the new dll file into the extension folder likely caused a new error before the execution of the extensions this the appearance of an error change :) – Dan Belden Dec 26 '12 at 15:23
1	 	
Hello,In windows, cli and apache PHP modes have the same ini file. Also i do have the extensions of pdo_firebird and firebird in the ext directory. The problem is different. – Nenhum Pois é Dec 27 '12 at 7:13
5	 	
The problem was the fbclient.dll from the FB 64 bits installation. I just got the fbclient.dll from 32bits, copy it into the PHP root and it solved the problem. – Nenhum Pois é Dec 31 '12 at 19:30

2.I am repeating the comment (which some might miss) by Nenhum Pois é above, because it is the real solution to the problem:

The problem was the fbclient.dll from the FB 64 bits installation. I just got the fbclient.dll from 32bits, copy it into the PHP root and it solved the problem

转载于:https://www.cnblogs.com/SofuBlue/p/8267217.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值