Hi Sheshnarayan,
My String con is:
try {
/*$db = new PDO("informix:host=172.16.18.120; service=9088;
database=bd_jpessoa_m; server=ol_matriz; protocol=onsoctcp;
EnableScrollableCursors=1;", "informix", "loooge");*/ <-- On this version i have the Error [Informix][Informix ODBC Driver]Unspecified System Error = -11005.
$db =new PDO("informix:DSN=Infdrv33", "", ""); <-- On this version i have the Error :
SQLSTATE=HY000, SQLDriverConnect: -11041 [Informix][Informix ODBC Driver]Unspecified System Error = -11041.1
with this odbc.ini
[Infdrv33]
Driver=/opt/informix/lib/cli/iclis09b.so
Description=INFORMIX 3.3 32-BIT
Database=bd_jpessoa_m
LogonID=informix
pwd=loooge
Servername=ol_matriz
DB_LOCALE=en_US.819
OPTIMIZEAUTOCOMMIT=1
ENABLESCROLLABLECURSORS=1
$stmt = $db->query("select * from cadprod");
$res = $stmt->fetch( PDO::FETCH_BOTH );
$rows = $res[0];
echo "Table contents: $rows.</br>";
} catch (PDOException $e) {
echo "ERR : " . $e->getMessage();
}
Any idea ?
thanks !
------------------------------
BRUNO ORTIZ
------------------------------
Original Message:
Sent: Fri January 08, 2021 01:35 AM
From: Sheshnarayan Agrawal
Subject: Need help to Informix and PHP con
Hi Bruno,
What's the version of CSDK you are using (esql -V)? Sometimes this issue comes due to 32/64-bit mismatches. The error code suggests that it has indeed connected to database, could you check the session to be available on the database side? Could you share the connection string you are using?
-11005 : Invalid connection string attribute.
For SQLDriverConnect(), the function returned SQL_SUCCESS_WITH_INFO, which means that the function completed successfully, and that a nonfatal error occurred. The nonfatal error occurred because the connection string contains an invalid attribute keyword, but Informix CLI connected to the data source anyway. For more information, call SQLError().
Thanks
-Shesh
------------------------------
Sheshnarayan Agrawal
------------------------------