can access Roundcube webmail

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Mar 3, 2020.

  1. pawan

    pawan Member

    getting error like in the log
    Code:
     Got error 'PHP message: PHP Fatal error:  Uncaught Error: Class 'PEAR' not found in /usr/share/roundcube/program/lib/Roundcube/bootstrap.php:101\nStack trace:\n#0 /usr/share/roundcube/program/include/iniset.php(67): require_once()\n#1 /usr/share/roundcube/index.php(40): require_once('/usr/share/roun...')\n#2 {main}\n  thrown in /usr/share/roundcube/program/lib/Roundcube/bootstrap.php on line 101\n'
    
    but in browser I am getting 500 error.
    recent action - added ppa:eek:ndrej and installed php7.1 as also did apt-get update and apt-get upgrade.
    what caused this to break and how I can fix this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You answered the question yourself:

    To solve the problem, ensure that you switch the default PHP version back to the one that belongs to the OS that you use with the update-alternatives command and then ensure that you installed all necessary packages for your new PHP 7.1 as well.
     
  3. pawan

    pawan Member

    Hi Till
    Set the default php to php7.2 (default OS). and checked packages for php7.1 I think all are installed.
    but I am still getting the same error
    Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'PEAR' not found.
    This error is logged in error logs for the website from which I try to access. for example abc.com/webmail
    then the error is logged in abc.com's error log.

    Note: I remember once you told me that rouncube uses modphp.
    and as per my other posting for enabling mpm_event I had to disable a2dismod php7.2
    could it be related to that?
     
  4. pawan

    pawan Member

    Hi Till
    When I do a apt-get upgrade I get
    Code:
    The following packages have been kept back:
      libapache2-mod-php libapache2-mod-php7.2 libgl1-mesa-dri libmysqlclient-dev libmysqlclient20 linux-generic linux-headers-generic linux-image-generic php-bz2 php-soap php-xml php7.2-bcmath php7.2-bz2
      php7.2-cgi php7.2-cli php7.2-common php7.2-curl php7.2-fpm php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-pspell php7.2-readline php7.2-recode php7.2-soap
      php7.2-sqlite3 php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-zip
    0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
    it is okay? and nothing to do with the issue I am facing.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You should install these updates.

    Regarding your issue, ensure that you have PHP pear package installed. And yes, your problems might be related to disabling mod_php as well.
     
  6. pawan

    pawan Member

    Hi Till,
    Still not able to resolve. I have installed those updates. also check PHP pear is installed and pear packages needed for roundcube is also installed.
    one thing I noted from other working instance in another server that in
    php_open_basedir
    there is entry for /usr/share/php which is not there in this setup where it is not working.
    if try to add the entry I get the error like:
    Code:
    Unknown column 'php_fpm_chroot' in 'field list'
    don't know where this error is coming from and am not able to save the value /usr/share/php
     
  7. pawan

    pawan Member

    Hi Till I am able to resolve the above error based on other thread.
    but roundcube issue is still there.
    I also tried disable mpm_event and enabling mpm_prefork and a2enmod php7.2
    but that also didn't help, so I reverted it back.
    don't know what else I should check
     
    Last edited: Mar 4, 2020
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try adding a info.php file with the phpinfo() function inside the folder
    /usr/share/roundcube/ and then open ist in the browser using the way you access roundcube and check that the php version, include paths and open basedir is correct so that in can load PEAR.
     
  9. pawan

    pawan Member

    Hi Till
    I did that. First I got not found error. so I backed up index.php and info.php renamed to index.php
    now the result is
    php version - PHP Version 7.2.28-3+ubuntu18.04.1+deb.sury.org+1
    loaded configruation file - /etc/php/7.2/fpm/php.ini
    open_basedir = no value
    include_path = :/usr/share/kopano/php

    do you need any other info Till?
     
    Last edited: Mar 4, 2020
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit the php.ini /etc/php/7.2/fpm/php.ini, add the path where pear is installed on your system to the include path and then restart the php 7.2 fpm process.
     
    pawan likes this.
  11. pawan

    pawan Member

    Hi Till
    Thank you very very much. It's working now.
     

Share This Page