Jump to content

Can't get PDO Informix to work with php 5.5.8 on RHEL 6.2


Recommended Posts

I'm trying to install PHP 5.5.8 on a Red Hat 6.2 server.  I've compiled the SDK and I'm able to connect to the database with perl, but I can not get the pdo Informix to work.  My phpinfo() shows all the correct library paths and Informix variables, but it does not show the Informix Driver is found.

 

I'm using PDO Informix 1.3.1.

 

Here is the script I'm running to test and the results.

 

  <?
print "PHP to Informix Test on {$_SERVER['HTTP_HOST']}<br><br>";

    $select = "SELECT npa, coc, ratecenter
                 FROM office_codes_data
                 WHERE npa = '260'
                 AND coc = '461'
                 ";
try{
  $dbh = new PDO('informix:host=nedasuatp; service=50002; database=lerg; server=nedasuat_primary; protocol=onsoctcp',
        '','',array(PDO::ATTR_PERSISTENT => true)  );
    foreach($dbh->query($select) as $row) {
      print_r($row);
      print "<br>";
    }
    print "<br>";
    $dbh=null;
} catch(PDOException $error) {
    print "ERROR!: " . $error->getMessage() . "<br/>";
    print "CODE!: " . $error->getCode() . "<br/>";
    die();
}

phpinfo();
?>

 

The error line is: ERROR!: could not find driver

 

Thank you for any help you can provide.

 

post-167473-0-85274500-1391641773_thumb.jpg
 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.