开发者社区> 杰克.陈> 正文

Call to undefined function mssql_connect()错误解决

简介: 原文:Call to undefined function mssql_connect()错误解决     同事用php+mssql修改一个系统,却一直配置不了环境。遂做了一个测试,一般情况下我们会注意php.ini的文件配置,而不注意IIS或者Apache的相关事项。
+关注继续查看
原文:Call to undefined function mssql_connect()错误解决

    同事用php+mssql修改一个系统,却一直配置不了环境。遂做了一个测试,一般情况下我们会注意php.ini的文件配置,而不注意IIS或者Apache的相关事项。

 

    PHP+MSSQL Call to undefined function mssql_connect() 错误解决:

    如果服务器端没有安装MSSQL 即使去掉EXTENTION中的 mssql.dll也会提示此错误。

    解决办法:

    1.打开php.ini 修改 ;extension=php_mssql.dll 去掉前面的;号(注意该文件是否存在,不存在去搜索下载);

    2.“在http.conf中加入:LoadFile (PHP物理路径)\ntwdblib.dll”或者“复制PHP目录下 ntwdblib.dll 文件到SYSTEM32目录下”。

 

    从php_mssql.dll引入表中可以看到该dll依赖于:

    php5ts.dll
    ntwdblib.dll
    msvcrt.dll
    kernel32.dll

    php5ts.dll所依赖的dll

    kernel32.dll
    advapi32.dll
    msvcr71.dll
    user32.dll
    netapi32.dll

    最后:查看一下kernel32.dll、advapi32.dll、user32.dll、netapi32.dll是否都存在于系统目录下。

    注意:1.windows下面一定要安装mssql或者,mssql客户端。如果一定要不安装那就操作第2注意项。

         2.ntwdblib.dll有版本要求,最好拷贝mssql里面的文件。只测试过客户端下的并通过。

         3.mssql.secure_connection的设置:网络连接mssql.secure_connection = Off,本地连接设为On。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
A small tip to explore how to call a method of a control
Created by Jerry Wang, last modified on Mar 20, 2015
67 0
how is bookmark function implemented in Opportunity
how is bookmark function implemented in Opportunity
55 0
How to find implementation of Requirement defined in Pricing Procedure
How to find implementation of Requirement defined in Pricing Procedure
55 0
what is conversion exit defined in ABAP domain
what is conversion exit defined in ABAP domain
42 0
Guidelines for Function Compute Development - Troubleshoot Timeout Issues
Endless codes and endless bugs When you write code, you may inadvertently introduce some hidden bugs, even if you test a large proportion of the codes to the maximum extent possible.
1452 0
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun image.png 解决方法: 打开终端输入 xcode-select --install 回车后,系统弹出下载xcode,点击确认,下载完成后即可。
1385 0
linux系统下,警告:warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 和 warning: the `gets' function is dangerous and should
字符数组 的英文名字是 char [] gets()函数的基本用法为:char *gets(char *s); 该函数的参数是一个字符数组,该函数的返回值也是一个字符数组。 linux下的代码如下: 1 #include 2 3 int main() 4 { 5    c...
1670 0
笔记:Six Pointers for Creating Strong Operational Business Values
这篇文章讲的是关于怎样创造强壮而且可操作的商业价值的六点内容,有些新意,不过最后意思的是这张图,这张图一个自上而下的组织的示意图,搞得好传神,够我笑一天的: 其他的: Key Takeaways Businesses need to take into account that the future will be driven by a millennial workforce.
1720 0
+关注
杰克.陈
一个安静的程序猿~
文章
问答
文章排行榜
最热
最新
相关电子书
更多
Expert Tips to Command Your Na
立即下载
How Customers Are Using the IBM Data Science Experience--Expected Case and Not So Expected Ones
立即下载
Taking-Windows-10-Kernel-Exploitation-To-The-Next-Level–Leveraging-Write-What-Where-Vulnerabilities-In-Creators-Update
立即下载