** Description changed: # lsb_release -rd Description: Ubuntu 16.04 LTS Release: 16.04 ------------------- # apt-cache policy php7.0-interbase php7.0-interbase: - Instalados: 7.0.4-7ubuntu2 - Candidato: 7.0.4-7ubuntu2 - Tabla de versión: - *** 7.0.4-7ubuntu2 500 - 500 http://es.archive.ubuntu.com/ubuntu xenial/universe i386 Packages - 100 /var/lib/dpkg/status + Instalados: 7.0.4-7ubuntu2 + Candidato: 7.0.4-7ubuntu2 + Tabla de versión: + *** 7.0.4-7ubuntu2 500 + 500 http://es.archive.ubuntu.com/ubuntu xenial/universe i386 Packages + 100 /var/lib/dpkg/status ------------------- It seems PHP 7 changed a bit the way to work with the Interbase module. Same code on PHP 5.6 works flawlessly. If you have one open link to an Interbase/Firebird database and you open **another** one to the same database the first link it's closed. One example of code can be: - $conx = ibase_pconnect(DB_HOST . ":" . DB_NAME,DB_USER,DB_PWD,DB_CHARACTER) or die(ibase_errcode() . ' ' . ibase_errmsg()); - - $conx2 = ibase_pconnect(DB_HOST . ":" . DB_NAME,DB_USER,DB_PWD,DB_CHARACTER) or die(ibase_errcode() . ' ' . ibase_errmsg()); - - $sql = 'SELECT something from somewhere'; - - $query = ibase_query($conx, $sql); + $conx = ibase_pconnect(DB_HOST . ":" . + DB_NAME,DB_USER,DB_PWD,DB_CHARACTER) or die(ibase_errcode() . ' ' . + ibase_errmsg()); - while ($row = ibase_fetch_assoc($query)) { - echo $row['something']; - } + $conx2 = ibase_pconnect(DB_HOST . ":" . + DB_NAME,DB_USER,DB_PWD,DB_CHARACTER) or die(ibase_errcode() . ' ' . + ibase_errmsg()); + + $sql = 'SELECT something from somewhere'; + + $query = ibase_query($conx, $sql); + + while ($row = ibase_fetch_assoc($query)) { + echo $row['something']; + } DB_xxx are defined variables with the users, password, ..... of the database. The result it's the same if instead of **ibase_pconnect** we write **ibase_connect** - If you run that code you won't get nothing and on the apage log you will - see something like: + If you run that code you won't get nothing and on the apache log you + will see something like: - supplied resource is not a valid Firebird/InterBase link resource in + supplied resource is not a valid Firebird/InterBase link resource in .... - ibase_fetch_assoc(): Dynamic SQL Error SQL error code = -504 Invalid + ibase_fetch_assoc(): Dynamic SQL Error SQL error code = -504 Invalid cursor reference Cursor is not open .... If we remove the line with the $conx2 all will work perfectly. On my php.ini I have this (exactly the same than on PHP 5.6): - ibase.allow_persistent = 1 - - ; Maximum number of persistent links. -1 means no limit. - ibase.max_persistent = -1 - - ; Maximum number of links (persistent + non-persistent). -1 means no limit. - ibase.max_links = -1 + ibase.allow_persistent = 1 + + ; Maximum number of persistent links. -1 means no limit. + ibase.max_persistent = -1 + + ; Maximum number of links (persistent + non-persistent). -1 means no limit. + ibase.max_links = -1 Interbase module for php7 has a new option which it's generating this problem ?
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1578600 Title: Multiple connections to Interbase with php 7.0 are not allowed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1578600/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
