为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:DM8
【操作系统】:win10
【CPU】:x86
【问题描述】*:php7.4(vc15) 测试达梦8数据库出现如下错误
PHP Warning: PHP Startup: Can’t load module ‘c:\php\ext\php74_dm.dll’ as it’s linked with 14.28, but the core is linked with 14.16 in Unknown on line 0
Warning: PHP Startup: Can’t load module ‘c:\php\ext\php74_dm.dll’ as it’s linked with 14.28, but the core is linked with 14.16 in Unknown on line 0
建议使用php8.0或者等待后续dm8版本修正。
目前看php7.4.28是基于vc15的,而某些版本dm8的php74_dm.dll是基于vs16的,所以导致了上述报错。我测试了php8.0,该版本的dm8的驱动php80ts_dm.dll可以被正常加载。php8.0是基于vs16的。
看报错,应该是配置数据库PHP驱动无法正常访问到。
检查ini里是否配置驱动等参数:
[PHP_DM]
extension_dir =“F:\DM8\drivers\php_pdo”
extension=php72_dm.dll
另外检查相应的路径下是否有对应文件名的php版本驱动。