Roundcube getting error on new server in multiserver setup

Discussion in 'ISPConfig 3 Priority Support' started by webguyz, Aug 12, 2015.

  1. webguyz

    webguyz Member HowtoForge Supporter

    Have a multiserver setup and installed a new webserver that includes having roundcube installed on it using:
    https://www.howtoforge.com/using-roundcube-webmail-with-ispconfig-3-on-debian-wheezy-apache2
    I can access webmail using the server name, but not when using a domain that is on that server

    http://servername.com/webmail <- I get the roundcube login screen

    http://my_domain.com/webmail <- get a 500 error

    Looking at the error log for the website I see these errors:
    [Wed Aug 12 13:06:28 2015] [error] [client 76.xx.xx.24] PHP Warning: require_once(): open_basedir restriction in effect. File(/usr/share/roundcube/program/include/iniset.php) is not within the allowed path(s): (/var/www/clients/client66/web187/web:/var/www/clients/client66/web187/private:/var/www/clients/client66/web187/tmp:/var/www/domainguyz.com/web:/srv/www/domainguyz.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /usr/share/roundcube/index.php on line 31

    [Wed Aug 12 13:06:28 2015] [error] [client 76.xx.xx.24] PHP Warning: require_once(/usr/share/roundcube/program/include/iniset.php): failed to open stream: Operation not permitted in /usr/share/roundcube/index.php on line 31
    [Wed Aug 12 13:06:28 2015] [error] [client 76.xx.xx.24] PHP Fatal error: require_once(): Failed opening required 'program/include/iniset.php' (include_path='.:/usr/share/php') in /usr/share/roundcube/index.php on line 31

    Don't remember ever seeing this error before. Any idea where to start looking to fix this?

    Thanks!!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add:

    AddType application/x-httpd-php .php

    in the apache roundcube config file inside 8f the directory statement.
     
  3. webguyz

    webguyz Member HowtoForge Supporter

    The contents of my /etc/apache2/conf.d/roundcube.conf file (which is a link to /etc/roundcube/apache.conf) is below:



    Code:
    # Those aliases do not work properly with several hosts on your apache server
    # Uncomment them to use it or adapt them to your configuration
    #    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
    #    Alias /roundcube /var/lib/roundcube
         Alias /webmail /var/lib/roundcube
    
    # Access to tinymce files
    <Directory "/usr/share/tinymce/www/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order allow,deny
          allow from all
    </Directory>
    
    <Directory /var/lib/roundcube/>
      Options +FollowSymLinks
    DirectoryIndex index.php
    
      <IfModule mod_php5.c>
        AddType application/x-httpd-php .php
    
        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_value include_path .:/usr/share/php
      </IfModule>
    
      # This is needed to parse /var/lib/roundcube/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>
    
    # Protecting basic directories:
    <Directory /var/lib/roundcube/config>
            Options -FollowSymLinks
            AllowOverride None
    </Directory>
    
    <Directory /var/lib/roundcube/temp>
            Options -FollowSymLinks
            AllowOverride None
        Order allow,deny
        Deny from all
    </Directory>
    
    <Directory /var/lib/roundcube/logs>
            Options -FollowSymLinks
            AllowOverride None
        Order allow,deny
        Deny from all
    </Directory>
    
    
     
  4. webguyz

    webguyz Member HowtoForge Supporter

    Decided to re-install from scratch since there was no production websites on it.

    Thanks!
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The above config should have been ok as they contained already the "AddType application/x-httpd-php .php". Maybe mod_php was missing or not enabled? As an explanation, the underlaying problem was that php was run under the user of the website but in case of a globally installed app that is reached by an alias, php should run with mod_php so that the app does not "import" the restrictions of the website.
     

Share This Page