关于PHP PDO INFORMIX ERROR的问题

时间:2011-05-20 11:21:09

标签: php pdo informix

我已经在CentOS5.6 32位上安装了PDO_INFORMIX和CSDK

和index.php有

<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

$db = new PDO("informix:host=172.30.179.81; service=5000;database=cms; EnableScrollableCursors=1", "myuser", "mypassword");
print("OK");
?>

但我仍然遇到此错误

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE=HY000, SQLDriverConnect: -11060 [Informix][Informix ODBC Driver]General error.' in /usr/local/apache/htdocs/index3.php:5 Stack trace: #0 /usr/local/apache/htdocs/index3.php(5): PDO->__construct('informix:host=1...', 'myuser', 'mypassword') #1 {main} thrown in /usr/local/apache/htdocs/index3.php on line 5

有谁知道它是什么? 感谢

1 个答案:

答案 0 :(得分:1)

哎哟!找出更多错误的标准技术是:

$ finderr -11060
-11060  General error.

An error occurred that has no specific SQL_STATE. In this case,
additional text is provided that identifies the source of the problem.
This IBM Informix CLI error code is the same as SQLSTATE value S1000.

$

这不是很有帮助 - 要礼貌。

  • 连接字符串中有空格;除去它们有帮助吗?
  • 你能telnet给主持人172.30.179.81吗?
  • 您可以telnet到主机上的端口(服务)5000吗?
  • 您可以使用任何其他Informix工具从本机连接吗?
  • 您可以使用相同的连接字符串从其他计算机连接吗?

如果是解压缩,您是否可以追踪所有共享库是否正确加载?