FAQ

FAQ – Frequently asked questions

I get an error!

If you get a PEAR_Error (or a MDB2_Error object), try using getMessage() and getUserInfo(). They do often give you more information about the cause of the error.

"MDB2 Error: not found"

If you get this error after creating the MDB2 instance it means that you don't have any MDB2 database driver installed. Since most people use only one database system, it is unnecessary to install 15 driver files.

If SQLite is the database of your choice, do a pear install MDB2_Driver_sqlite or simply pear install MDB2#sqlite and it should work.

Also search for MDB2 drivers in the PEAR package list.

"pear/MDB2_Driver_XXX requires php extension XXX"

If you get this error when trying to install a driver it means that the php.ini loaded in the given installer does not see the "XXX" extension. Either you forgot to install the extension all together or you need to make sure that the extension is actived in all relevant php.ini files. Note that there are usually separate php.ini files for the CLI and your other SAPIs.

If all else failes do pear install -nodeps MDB2_Driver_XXX and it should work.

Two instances fail to keep different databases selected

If you work with more than one database at the same time, you may notice that as soon you connect to the second db the connection to the first one is lost, since the DBMS reuses the last open connection link. To solve the problem, just set the new_link DSN option to TRUE.

Sequences and auto-incrementing (Previous) MDB_QueryTool (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by: pear.mdb2@axice.be
The 'not found' error can be caused by a typo in table definition when creating a table :

$definition = array
(
'id' => array
(
'type' => 'texte', // instead of 'text'
'length' => 12,
'notnull' => 1,
),
);


Note by: gchamoret@wanadoo.fr
The solution is :

>pear install --nodeps MDB2_Driver_mysqli

Gerard
Note by: gchamoret@wanadoo.fr
Hello,

"pear/MDB2_Driver_XXX requires php extension XXX"
If you get this error when trying to install a driver it means that the php.ini loaded in the given installer does not see the "XXX" extension. Either you forgot to install the extension all together or you need to make sure that the extension is actived in all relevant php.ini files. Note that there are usually separate php.ini files for the CLI and your other SAPIs.

If all else failes do pear install -nodeps MDB2_Driver_XXX and it should work.

On windows localhost easyphp2, it should but it does not

D:\Program Files\EasyPHP2-01\www>pear install MDB2#mysqli
Skipping package "pear/MDB2", already installed as version 2.4.1
pear/MDB2_Driver_mysqli requires PHP extension "mysqli"
No valid packages found
install failed

I hope one day I could contribute more than that...

Best regards

Gerard