无法加载动态库php_sqlsrv_7_nts.dll不是有效的Win32应用程序 [英] Unable to load dynamic library php_sqlsrv_7_nts.dll is not a valid Win32 application

查看:678
本文介绍了无法加载动态库php_sqlsrv_7_nts.dll不是有效的Win32应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以为我想看看是否有任何适用于php 7的sql server驱动程序.关于Stack Overflow的另一个问题将我指向这些驱动程序

Thought I'd see if there were any sql server drivers for php 7. Another question on Stack Overflow pointed me to these drivers here

所以我将php_sqlsrv_7_nts.dll安装到我的ext文件夹中,并将以下行添加到我的php.ini中:

So I install php_sqlsrv_7_nts.dll into my ext folder and add the following line to my php.ini:

extension=php_sqlsrv_7_nts.dll

我在运行的每个php脚本上都收到此警告:

I get this warning on every php script I run:

Warning: PHP Startup: Unable to load dynamic library 'C:\php7\ext\php_sqlsrv_7_nts.dll' - %1 is not a valid Win32 application

我意识到这只是一个预发行版本,还有很多事情需要解决,但是我希望至少做一些基本的事情.

I realise this is just a pre-release version and there are many things to iron out still, but I was hoping to at least do some basic things.

我在做错什么,还是需要再等待一段时间才能获得更好的版本.

What am I doing wrong, or do I need to wait a bit more for a better release.

一些有用的信息:

PHP Version => 7.0.5

System => Windows NT GB275L-I-T-5654 6.3 build 9600 (Windows 8.1 Professional Edition) i586
Build Date => Mar 30 2016 09:57:56
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x86
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"

推荐答案

最后解决了这个问题.在安装之前,需要安装一些其他东西,即:

Finally got this solved. Needed to install some more things before it would work, namely:

  1. Microsoft Visual C ++ 2015可再发行组件(x86),可从此处

您可以从此处获取的ODBC驱动程序

这篇关于无法加载动态库php_sqlsrv_7_nts.dll不是有效的Win32应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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