greg1973 Posted August 3, 2016 Share Posted August 3, 2016 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 Quote Link to comment https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/ Share on other sites More sharing options...
requinix Posted August 3, 2016 Share Posted August 3, 2016 The informix extension was abandoned years ago. It probably doesn't work with any version of PHP after 5.2. It sucks but you'll need to rewrite the code to work with pdo_informix. Quote Link to comment https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/#findComment-1535534 Share on other sites More sharing options...
Jacques1 Posted August 3, 2016 Share Posted August 3, 2016 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. 1 Quote Link to comment https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/#findComment-1535536 Share on other sites More sharing options...
requinix Posted August 3, 2016 Share Posted August 3, 2016 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 } Quote Link to comment https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/#findComment-1535537 Share on other sites More sharing options...
greg1973 Posted August 3, 2016 Author Share Posted August 3, 2016 Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/301745-ifx_connect-not-working-with-php-5621/#findComment-1535539 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.