Jump to content

Recommended Posts

I am getting the following error when using the ifx_connect (or any ifx) function to connect to an Informix database:

 

"Call to undefined function ifx_connect... "

 

I have the Informix Client SDK installed. I've tried to install the Informix drivers separately but getting AC_DEFINE errors during the phpize step. I have the pdo_Informix working but have tons of code that uses the ifx_connect function. Can anyone help me get the Informix drivers (not pdo) working in PHP 5.6.21?

 

Thank you!

 

Greg

 

Link to comment
https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/
Share on other sites

You could try to implement the functions yourself as simple wrappers for PDO. If you're lucky, you won't have to make any major changes to the application code.

 

However, an application which appearently hasn't been touched for more than a decade may have lots of other issues. I'd be suprised if the ifx_* functions are the only fossil rotting in the code.

  • Like 1

You could try to implement the functions yourself as simple wrappers for PDO. If you're lucky, you won't have to make any major changes to the application code.

Ooh, good call.

 

Basically

function ifx_connect($database, $userid, $password) {
	return new PDO("???", $userid, $password); // the DSN is probably like ifx:mydb@ol_srv1
}

function ifx_query($query, $link_identifier, $cursor_type, $blobidarray) {
	return $link_identifier->query($query);
	// don't know what to do with $cursor_type or $blobidarray
}
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.