FastCGI and CGI problem

Discussion in 'Installation/Configuration' started by Gijs, Feb 21, 2014.

  1. Gijs

    Gijs New Member

    Hi,

    I really need some help because two possibilities give problems. I changed in the admin panel a domainname from sub.domain.com to domain.com. Everything looked fine but one very strange thing. I can load the website always 5 times successfully but every 6th time, it's giving a 500 error. /var/log/apache2/error.log gives exactly this each time with the failure:
    Code:
    [error] mod_fcgid: process /var/www/php-fcgi-scripts/web105/.php-fcgi-starter(24359) exit(communication error), get unexpected signal 11
    So I changed FastCGI to CGI and that works fine for that problem. But then I found out that the /webmail does not work on that domain. Probably a problem with the CGI because other websites/webmail does work fine but I need that webmail for that specific domain works. The error I get from the frontend:

    Code:
    Warning: require_once(): open_basedir restriction in effect. File(/var/www/webmail/program/include/iniset.php) is not within the allowed path(s): (/var/www/clients/210220203/web105/web:/var/www/clients/210220203/web105/tmp:/var/www/domain.com/web:/srv/www/domain.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/webmail/index.php on line 39 Warning: require_once(/var/www/webmail/program/include/iniset.php): failed to open stream: Operation not permitted in /var/www/webmail/index.php on line 39 Fatal error: require_once(): Failed opening required 'program/include/iniset.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/webmail/index.php on line 39
    Apache error log doesn't show anything. The specific domain log gives about the same error:
    Code:
    [Fri Feb 21 21:57:59 2014] [error] [client 80.65.105.231] PHP Warning:  require_once(): open_basedir restriction in effect. File(/var/www/webmail/program/include/iniset.php) is not within the allowed path(s): (/var/www/clients/210220203/web105/web:/var/www/clients/210220203/web105/tmp:/var/www/domain.com/web:/srv/www/domain.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) in /var/www/webmail/index.php on line 39, referer: [url]http://www.domain.com/[/url]
    [Fri Feb 21 21:57:59 2014] [error] [client 80.65.105.231] PHP Warning:  require_once(/var/www/webmail/program/include/iniset.php): failed to open stream: Operation not permitted in /var/www/webmail/index.php on line 39, referer: [url]http://www.domain.com/[/url]
    [Fri Feb 21 21:57:59 2014] [error] [client 80.65.105.231] PHP Fatal error:  require_once(): Failed opening required 'program/include/iniset.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/webmail/index.php on line 39, referer: [url]http://www.domain.com/[/url]
    Hopefully you can provide a solution. I think the best solution is to get the FastCGI thing fixed? But it is also necessary that the other domains can access /webmail with FastCGI.

    Thanks a lot for your help in advance!
     
  2. Gijs

    Gijs New Member

    Sorry guys, I am still not able to fix this :( I tried several things but I just don't know the solution.

    Can anyone try to help me and try to point me in the right direction?

    Thanks a lot!
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Which linux distribution do you use? Did you enable mod_php in the roundcube apache config file for the directory were roundcube is installed?
     
  4. Gijs

    Gijs New Member

    Thanks for your reply!

    I am using Debian Squeeze.
    Do you mean the roundube.conf in the /etc/apache2/conf.d ?

    This code is available there:
    Code:
            <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 .
            </IfModule>
    Is that what you mean?
     
  5. Gijs

    Gijs New Member

    Hi Till,

    Can you please try to help me with this problem? I am waiting for your response because I am not able to fix this. I googled a lot and I always try to solve it myself but I don't know how to fix this.

    Thanks in advance!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    yes, thats the code I meant. Do you have mod_php installed on the server?
     
  7. Gijs

    Gijs New Member

    I checked the modules directory, but it looks that it is not installed..
    I only have libphp5.so.

    When I run:
    Code:
    apt-get install libapache2-mod-php5
    It gives me this message:
    Code:
    The following extra packages will be installed:
      php5-cgi php5-cli php5-common php5-curl php5-gd php5-imap php5-mcrypt php5-mysql php5-pspell php5-sqlite
    The following packages will be upgraded:
      libapache2-mod-php5 php5-cgi php5-cli php5-common php5-curl php5-gd php5-imap php5-mcrypt php5-mysql php5-pspell php5-sqlite
    
    Does that mean it is not installed?

    Thanks for your reply again!
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that it is not installed. you should install it any maybe update linux packages in general as there seem to be some pending updates.
     
  9. Gijs

    Gijs New Member

    Unfortunately, that didn't solve the problem. I still have the very same problem. I think that module was already installed.

    Do you maybe have another suggestion?
    I really hope so..
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Try:

    a2enmod php5

    to enable it.
     
  11. Gijs

    Gijs New Member

    It says that it is already enabled.
    But the thing is that the /webmail doesn't work, only for the PHP CGI. All the other websites with Fast CGI are running just fine..
     

Share This Page