F13, ISPConfig 3.0.21 PHP openbase problem

Discussion in 'Installation/Configuration' started by acumen, Jun 18, 2010.

  1. acumen

    acumen New Member

    I just fresh install a Fedora 13 with most recent ispconfig 3, after setup and build a www website, it always show 500 Internal Server Error. Then I cat the log it shows,
    -----
    [Fri Jun 18 13:11:12 2010] [error] [client 192.168.40.1] PHP Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client0/web2/web:/var/www/clients/client0/web2/tmp:/var/www/www.abc.com/web:/srv/www/www.abc.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin) in Unknown on line 0
    [Fri Jun 18 13:11:12 2010] [error] [client 192.168.40.1] PHP Fatal error: Can't load /var/www/www.abc.com/web/services_detail.php, open_basedir restriction. in Unknown on line 0
    [Fri Jun 18 13:12:29 2010] [error] [client 192.168.40.1] PHP Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client0/web2/web:/var/www/clients/client0/web2/tmp:/var/www/www.abc.com/web:/srv/www/www.abc.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin) in Unknown on line 0
    [Fri Jun 18 13:12:29 2010] [error] [client 192.168.40.1] PHP Fatal error: Can't load /var/www/www.abc.com/web/index.php, open_basedir restriction. in Unknown on line 0
    -----

    I google and notice that I need to add a path of the vhost in httpd vhost config file but I saw that it already included the path for the php value. So, what's the problem? Please help! Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /var/www/www.abc.com/web/services_detail.php
     
  3. acumen

    acumen New Member

    -rwxr-xr-x 1 web2 client0 2768 Jun 14 17:58 /var/www/www.abc.com/web/services_detail.php


    I tried to create another website and just put a simple php file to test, same error.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The permissions of the file are ok.

    - Are there any other errors in the error.log of the website?
    - Which ISPConfig version do you use?
    - Is SELInux disabled?
     
  5. acumen

    acumen New Member

    Hi till,

    I am using 3.0.2.1 with Fedora 13 x86 version. SELinux disabled already. Here below is the error log.

    -----
    [Mon Jun 21 10:52:03 2010] [error] [client 192.168.40.1] PHP Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/clients/client0/web2/web:/var/www/clients/client0/web2/tmp:/var/www/www.abc.com/web:/srv/www/www.abc.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin) in Unknown on line 0
    [Mon Jun 21 10:52:03 2010] [error] [client 192.168.40.1] PHP Fatal error: Can't load /var/www/www.abc.com/web/index.php, open_basedir restriction. in Unknown on line 0
    -----

    this is the log which I try to access the web's error.
     
  6. Doug G

    Doug G Member

    Maybe it's some kind of Fedora issue. I am running ispc3 on Fedora 12 and can't get open_basedir to work, I've ended up turning it off in new sites by adding an apache directive option 'php_admin_value open_basedir none'. I spent a couple hours trying to get the open_basedir to work properly, but everything I installed failed to work until I disabled open_basedir.

    I suppose turning off open_basedir lessens php security somewhat.
     
  7. acumen

    acumen New Member

    F12 + ISPC 3.0.2.1 work fine for me. Just need to install a new server so I tried to use F13 but failed with open_base_dir. I also tried to use F13 + ISPC 3.0.2.2. But also failed.
     
  8. ppoetsma

    ppoetsma New Member

    I am having the same annoying issue on CentOS 5.5 and ISPConfig 3.0.2.1. Since I upgraded to PHP 5.2.13 this morning I get this same message in Drupal. Checked all paths and permissions, added more directories to open_basedir and no luck so far.

    In PHP 5.2.13 a fix introduced for open_basedir, see http://www.php.net/releases/5_2_13.php. But I cannot find what is extactly changed and how it impacts.
     
  9. ppoetsma

    ppoetsma New Member

  10. Doug G

    Doug G Member

    Thank you ppoetsma, uninstalling php-eaccelerator from my fedora 12 server got rid of the open_basedir error. I'm curious how you found this solution though ... :) Oh, never mind, I read the thread link you posted. Thanks again.
     
  11. zigi

    zigi New Member

    possible better solution

    If you want to use open_basedir restrictions and php-eaccelerator, then you have to add path from eaccelerator.cache_dir parameter to open_basedir variable (from /etc/php.d/eaccelerator.ini : default is "/var/cache/php-eaccelerator").
     

Share This Page