PDO_INFOMIX connection problem...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to connect to an informix database, and using excel and odbc
it works fine.

I installed the PDO_INFORMIX via:
pecl download pdo_informix
phpize
./configure --with-pdo-informix=/opt/IBM/informix
make
make install

and it all appeard to work... phpinfo()  shows that it's enabled, and
active... and when i do my PDO connection, it fails with this error:

I also installed the CSDK prior to installing the pecl pdo_informix (as
the php.net docs said)

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE=HY000, SQLDriverConnect: -23101 [Informix][Informix ODBC
Driver][Informix]Unspecified System Error = -23101.' 

all the values in my code, i was given from my boss, which he used to
get in with excel and the odbc.  the $database has to be the full path
of the informix table

Also, we cannot even see my local machine hitting the server, yet when i
try telnet to it, i can connect no issues... so it's not a firewall from
my machine to it.

Any ideas?  or thoughts on how to get this working??

-- code --
<?php
$host = "[ipaddress of machine]";
$port = "[port number]";
$database = "[actual path of database]";
$server = "[server]";
$protocol = "sesoctcp";
$username = "[username]";
$password = "[password]";
$tablename = "[name of the table]";

$db = new PDO("informix:host={$host}; service={$port};
database={$database}; server={$server}; protocol={$protocol};
EnableScrollableCursors=1;", $username, $password);

print "Connection Established!\n\n";

$stmt = $db->query("select * from {$tablename}");
$res = $stmt->fetch( PDO::FETCH_BOTH );
$rows = $res[0];
echo "Table contents: $rows.\n";

?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux