Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function ibase_connect() in Codeigniter

I can not connect to a local bank in firebird.

Since I enabled the following extensions in php.ini but not getting any results.

extension=php_interbase.dll

extension="interbase.so"

extension=php_pdo_firebird.dll

I have also done interbase.so download the file and copy it to the folder:

/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/

I'm using:

  • XAMPP 5.6.8 / PHP 5.6.8 (64bit)
  • Linux 14.04 LTS (64bit)

My file database.php

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => 'SYSDBA',
    'password' => 'masterkey',
    'database' => 'localhost://home//ronald//fire//DEMO.GDB',
    // 'port' => '3050',
    'dbdriver' => 'ibase',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => TRUE,
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

Recalling that the problem is not in my connection string, as I've tried variations like:

  • 'database' => 'localhost://home//ronald//fire//DEMO.GDB'
  • 'database' => 'localhost:/home/ronald/fire/DEMO.GDB'
  • 'database' => '/home/ronald/fire/DEMO.GDB'
  • 'database' => '//home//ronald//fire//DEMO.GDB'

Error: enter image description here

Thank you for your help!

EDIT

By suggesting "@Daniel Waghorn" ran a page with phpinfo()

The result can be seen in: http://codepen.io/anon/pen/LVdzRy?editors=100

I took to perform the following function get_loaded_extensions(false)

The function returns me the loaded modules. And as you can see the modules for the Firebird are not loaded.

  • Core
  • date
  • ereg
  • libxml
  • openssl
  • pcre
  • sqlite3
  • zlib
  • bcmath
  • bz2
  • calendar
  • ctype
  • curl
  • dba
  • dom
  • hash
  • fileinfo
  • filter
  • ftp
  • gd
  • gettext
  • SPL
  • iconv
  • session
  • intl
  • json
  • ldap
  • mbstring
  • mcrypt
  • standard
  • mysqlnd
  • mysqli
  • mysql
  • PDO
  • pdo_mysql
  • pdo_pgsql
  • pdo_sqlite
  • Phar
  • posix
  • Reflection
  • imap
  • shmop
  • SimpleXML
  • soap
  • sockets
  • exif
  • sybase_ct
  • sysvsem
  • sysvshm
  • tokenizer
  • wddx
  • xml
  • xmlreader
  • xmlrpc
  • xmlwriter
  • xsl
  • zip
  • apache2handler
  • pgsql
  • mhash

Now how can I load the Firebird modules to run with XAMPP START?

like image 633
Ronald Araújo Avatar asked Sep 28 '22 10:09

Ronald Araújo


1 Answers

Just copy fbclient.dll and gds32.dll to apache/bin/ folder and restart apache.

This work for me anfter hours of research.

like image 110
Luis Avatar answered Oct 03 '22 00:10

Luis