Roundcube fatal error via Undefined class constant 'MYSQL_ATTR_FOUND_ROWS'

Discussion in 'Installation/Configuration' started by Richard Foley, Aug 28, 2019.

  1. Richard Foley

    Richard Foley Member

    I'm running ispConfig3 on Debian 9 Stretch with nginx, having followed the multi-server instructions to install a slave server for websites and their email. Getting squirrelmail/roundcube up is causing some headaches. When I go to host.tld/squirrelmail/ I get a 500 error. The server logs show:

    Code:
    PHP Fatal error:  Uncaught Error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /usr/share/roundcube/program/lib/Roundcube/rcube_db_mysql.php
    Searches have revealed that one should have php-mysql and PDO installed, which I do.
    Code:
    php -m | grep -i pdo
    PDO
    pdo_mysql
    
    Any helpful suggestions how to fix this appreciated. (fixed see below)
     
    Last edited: Aug 28, 2019
  2. Richard Foley

    Richard Foley Member

    Never mind, I think I figured out what's going on. I had both php7.0 and php7.3 installed. The web interface under /squirrelmail/ was using php7.0 apparently, which was messing with the much more complete and up-to-date php7.3 installation. Thus the error.

    It seems nearly impossible to get rid of php7.0 (just btw.) and yes, I've tried
    Code:
    apt-get remove -purge php7.0
    but this still leaves loads of php7.0 stuff scattered around the system. Which in turn leads to situations like this where one is using 7.3 everywhere and then 7.0 steps in and screws you over. Ah well, something else learnt o_O
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    It is not recommended to replace the default PHP version of the operating system as all kind of packages might fail then. You should always keep the default version and use newer and older versions as additional PHP version only. If you want to have PHP 7.3 on Debian, then do a dist upgrade to Debian 10, which sues PHP 7.3 as default.
     
    Richard Foley likes this.
  4. Richard Foley

    Richard Foley Member

    thanks for the tip, Till, that would explain why I was struggling with the older version. I'll be upgrading as soon as I dare. I presume there are no issues with ispConfig for a clean debian 9 -> 10 dist-upgrade.

    ps. s/sues/uses/ :rolleyes:
     
    Last edited: Aug 28, 2019

Share This Page