首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用PHP连接到Server : php5.dll丢失了吗?

用PHP连接到Server : php5.dll丢失了吗?
EN

Stack Overflow用户
提问于 2017-06-13 15:31:47
回答 1查看 985关注 0票数 0

赢7

我正在尝试用PHP5.6连接到我的Server。我正在使用XAMPP和Notepad++。我从离线获得PHP脚本:

代码语言:javascript
复制
<?php
$serverName = "mydatabasename"; 
//serverName\instanceName

// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.

$connectionInfo = array( "Database"=>"dbName");
sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
     echo "Connection established.<br />";
}else{
     echo "Connection could not be established.<br />";
     die( print_r( sqlsrv_errors(), true));
}
 ?>

我将脚本保存为.php。每当我在XAMPP上打开Apache时,我就会得到错误。

代码语言:javascript
复制
"The program can't start because php5.dll is missing from your computer. Try 
reinstalling the program to fix this problem." 

我搜索了php5.dll并下载了它,并把它放在我的php/ext中。我还在某个地方读到了我需要phpdbg的内容,但在5.6之后,我看到phpdbg包含在PHP中。我下载了PHP SQLSRV32,因为要使用sqlsrv_*函数,就需要一个sqlsrv_*驱动程序。

当我运行测试文件时,除了我的连接脚本之外,它们都能工作。

那么,1.为什么我要得到"php5.dll“错误? 2.连接脚本的建议?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-13 15:44:10

您能使用phpinfo()来查看PHP认为应该从哪里调用扩展吗?您从Googlephp5.dll下载的文件是线程安全版本还是非线程安全版本?请与他们两人核对。

尝试重命名或删除php.ini文件吗?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44525826

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档