1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP 5.1.2, Horde & DB_mysql as array fatal error

Discussion in 'Plesk for Linux - 8.x and Older' started by methyl_blue, Apr 18, 2006.

  1. methyl_blue

    methyl_blue Guest

    I was getting the following error:

    PHP Fatal error:  Cannot use object of type DB_mysql as array in /usr/share/psa-horde/lib/Horde/DataTree.php on line 657
    after upgrading to the latest version of Horde and I thought I'd share how I fixed it in case it helps someone out.

    The problem is that Plesk uses a custom version of Horde with an out of date version of the Pear DB package that isn't compatible with PHP 5.1.2.

    The work around is to upgrade DB manually and then add it to the Plesk/Horde installation.

    To do so, issue the following command via SSH as root (without the #, naturally):

    # pear upgrade DB
    Then copy or symlink the following file and directory:


    and you should be right as rain.

    It's probably worth backing up the old version of DB installed with Plesk's version of Horde though - just in case.
  2. cuppett

    cuppett Guest

    Thank you and NOTICE

    Thank you for this solution. This is a HUGE problem with the psa-horde package currently in Plesk 8. If they are going to ship their own libraries for things, they should ensure that they are current. This problem has a couple records on this forum.

    I also have one other thing to mention. If you are running a machine with PHP4 also installed and left it alone, building your own customer PHP5 inside /usr/local/bin/php, you might have to copy the PEAR sources from /usr/local/lib/php instead of /usr/share/pear.

    I had to do a couple rounds of "process of elimination" to make sure I was copying from the right place. So if this doesn't appear to be working for you, MAKE SURE.
  3. atomicturtle

    atomicturtle Golden Pleskian

    Nov 20, 2002
    Likes Received:
    Washington, DC
    Hey great post, is this using my php 5.1 rpms or something you rolled on your own? I could probably add in a trigger to that package to detect psa-horde and automate adding in your fix
  4. cuppett

    cuppett Guest

    In my particular case it is RHEL3. I left the PHP4 RPMs in place and built PHP 5.1.2 from source.

    PHP4 remains in his locations where PHP5 is now in /usr/local/bin and /usr/local/lib/php so that they are picked up along the paths first as an OS customization rather than trying to replace what is installed and received through the vendor maintenance stream.

    Running PHP commands for version and pathing information should be sufficient to detect this situation.
  5. methyl_blue

    methyl_blue Guest

    I compiled PHP from source as I wanted to specify a few extra features to be included. At the time I didn't know about your RPMs though - they look excellent. I'm eyeing up the MySQL ones as I type. Upgrading databases is usually such a pain.

    Happy to be of service :)