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
 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.