dongtan1009 2012-07-17 06:39
浏览 89
已采纳

在IIS中使用PHP时“调用undefined .. mssql_connect”?

May is ask you about how to connect to Microsoft SQL server 2005 enterprise using PHP.

I am using Appserv 2.5.10 ( Apache 2.2.8, PHP 5.2.6) and SQL server 2005

After I place the extension download from this link :

http://www.microsoft.com/en-us/download/details.aspx?id=20098

enable the php.ini file by adding these lines.

extension=php_pdo.dll
extension=php_sqlsrv_52_ts_vc6.dll
extension=php_pdo_sqlsrv_52_ts_vc6.dll

Restart Apache using this code to connect

$link = mssql_connect($server, $user, $pass);

Error shown in browser is

Fatal error: Call to undefined function mssql_connect() in G:\AppServ\www\testmssql_connect.php on line 12

can anyone help me ?

NOTE: i am using windows server 2003 and i don't found this OS in OS supporting list of Microsoft Driver 3.0 for PHP. Is this issue cause the problem ?

  • 写回答

1条回答 默认 最新

  • duanlun1955 2012-07-17 06:46
    关注

    Look at this link:

    1) Check your PHP.INI file's extension_dir

    2) Make sure you copied your .dlls into that directory (for example, into C:\PHP\ext").

    3) Create a dummy page to call phpinfo();. Display the page in a browser. Make sure you see entries for "sqlsrv".

    'Hope that helps!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败