简体   繁体   中英

PHP: MDB2 error - call to undefined function

I have error in my old project based od MDB2 and PHP 5.4:

PHP Fatal error: Call to undefined function: MDB2_Driver_pgsql::raiseError(). in /path/to/project/vendor/pear-pear.php.net/MDB2/MDB2.php on line 1936

Dependencies loaded via composer:

"require": {
    "pear-pear.php.net/Validate": "0.7.0",
    "pear-pear.php.net/Validate_PL": "0.5.1",
    "pear-pear.php.net/HTML_Quickform": "*",
    "pear-pear.php.net/HTML_Table": "*",
    "pear-pear.php.net/MDB2": "*",
    "pear-pear.php.net/MDB2_Driver_pgsql": "*",
    "pear-pear.php.net/OLE": "1.0.0RC1",
    "pear-pear.php.net/Spreadsheet_Excel_Writer": "0.9.1",
    "pear-pear.php.net/File_SearchReplace": "*",

And I don't change anything in this code. Anyone had this problem? :)

This error is solved by installing PEAR-1.9.5

I've spent some time to find easy way to downgrade PEAR version. It's easy to do by running terminal command:

pear install -f PEAR-1.9.5

Hope this will help someone to save extra time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM