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!

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

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化