我也郁闷,用adodb(PHP的那个类库)连 mssql2k,有一阵子很正常,然后会出现连不上服务器的提示(unable...)重启一下apache就好了。。找不到原因。。adodb是用mssql_pconnect连的。我现在改在iis下试试,看会不会出现这个问题。
解决方案 »
- 求助,php和javascript调用wowza,实现文本聊天功能
- one question PHP分页问题
- 关于项目配置的一些问题
- 动态生成变量并把生成的变量初始数组
- 解决都当以100相谢!!!关于文章的处理!
- 请教高手一个sql问题
- 怎么用socket post数据,模拟form?
- 在php中,要实现如下的强大搜索功能,各位有不同有现成的代码,给我一份啊,email:[email protected],先谢谢了,
- 紧急求救~~~~~~~~!!!sos~~~~~~~!
- 匹配内容中的图片怎么写正则表达式
- 后台支持PHP的嵌入式Word,Excel编辑器示例源代码下载!(使用演示版本控件)
- 请问这个句子在my SQL下为什么不能执行啊
重启动apache ok
改为php_mssql.dll,在 php.ini文件里
Requirements for WIn32 platforms. The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools. Requirements for Unix/Linux platforms. To use the MSSQL extension on Unix/Linux, you first need to build and install the FreeTDS library. Source code and installation instructions are available at the FreeTDS home page: http://www.freetds.org/ 安装
The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini. To get these functions to work, you have to compile PHP with --with-mssql[=DIR], where DIR is the FreeTDS install prefix. And FreeTDS should be compiled using --enable-msdblib.
我的PHP.MASSQL.DLL已经成功加载了
我觉得问题不在这里吧!
PHP Version 4.3.2
Apache/1.3.24
extension_dir = D:\PHP\extensions
extension_dir="C:\PROGRA~1\Zend\lib\php_ext"
改目录下也存在MASSQL.DLL这个文件!
我的WEB发布目录在D:\PHP下!
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("driver={sql server};uid=sa;pwd=youpassword;server=servername;database=suntime");
$rs=new com("adodb.recordset");
$rs->open("select * from [table1]",$conn,3,3); // Recordset$rsname=$rs->Fields("名称");
for($i=0; $i<4; $i++)
{
// $rs->AddNew();
echo $rsname->value ."<br>";
$rs->movenext();
// $rs->update();
}
$rs->Close();
$conn->Close();$rs->Release();
//$conn->Release();$rs = null;
$conn = null;
在项目中有很多都是连mssql,从没有出现过问题。
只是有些时候配置php环境的时候,mssql.dll模块加载不上,但只要将其拷到系统根目录下就行了。一旦加载了mssql模块。就从来没有初选过问题了。
我觉得adodb真是个好东东,兼容性太好了,非常稳定。
把d:\php\dll文件内的*.dll复制到D:\PHP\extensions下
在 php.ini 中把extension_dir = D:\PHP\extensions