1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Open Basedir Error

Discussion in 'Plesk for Linux - 8.x and Older' started by medro, May 31, 2005.

  1. medro

    medro Guest

    0
     
    I started to have a big problem with an open basedir error.

    If i call a specific PHP Script, my system says:

    Warning: main(): open_basedir restriction in effect. File(/webEdition/we/include/we_showDocument.php) is not within the allowed path(s): (/home/httpd/vhosts/antiseptica.info/httpdocs:/tmp) in /home/httpd/vhosts/antiseptica.info/httpdocs/auswahl-flaechen.php on line 16

    I run Plesk 7.5.3 on a Suse 9.1 System.

    You can check the PHP.info for that domain at:

    http://www.antiseptica.info/phpinfo.php

    Please help !
     
  2. BoXie

    BoXie Guest

    0
     
    Plesk configures Apache in a way so PHP can only do file-access in users webroot and /tmp. This is called the open.basedir.

    So there is no problem with Plesk here ... you are just trying to run a script which demands more access than it gets.

    So you'll have to wonder .. WHY isn't the homedir + /tmp enough ??? Do you really want a script to have more access to the file system ?
     
  3. poke

    poke Guest

    0
     
    I hear ya, but, sometimes it's needed. Trust the user and the scripts you install b/f doing this. To answer the question:

    You will need to create a vhost.conf file from a text file and put it in the domains' conf directory. vhost.conf should be something like this:

    <Directory /home/httpd/vhosts/yourdomain.com/httpdocs>
    php_admin_value safe_mode 0
    </Directory>

    Then run:
    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

    Then restart apache.

    That should do it. Sometimes it depends on the php release you are running, you might need to use 'none' instead of '0'.....

    -poke
     
  4. medro

    medro Guest

    0
     
    Thanks for the try, but it doesn´t work:

    http://www.clikserve.de/webEdition/index.php

    And this is, what the logfile says:

    [client 80.132.73.47] PHP Warning: main(): open_basedir restriction in effect. File(/webEdition/we/include/we.php) is not with
    [client 80.132.73.47] PHP Warning: main(/webEdition/we/include/we.php): failed to open stream: Operation not permitted in /hom
    [client 80.132.73.47] PHP Warning: main(): Failed opening '/webEdition/we/include/we.php' for inclusion (include_path='.:') in
    [client 80.132.73.47] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/v
    [client 80.132.73.47] PHP Warning: main(): open_basedir restriction in effect. File(/webEdition/we/include/we_html_tools.php)
    [client 80.132.73.47] PHP Warning: main(/webEdition/we/include/we_html_tools.php): failed to open stream: Operation not permit
    [client 80.132.73.47] PHP Warning: main(): Failed opening '/webEdition/we/include/we_html_tools.php' for inclusion (include_pa
    [client 80.132.73.47] PHP Warning: main(): open_basedir restriction in effect. File(/webEdition/we/include/we_browser_check.ph
    [client 80.132.73.47] PHP Warning: main(/webEdition/we/include/we_browser_check.php): failed to open stream: Operation not per
    [client 80.132.73.47] PHP Warning: main(): Failed opening '/webEdition/we/include/we_browser_check.php' for inclusion (include
    [client 80.132.73.47] PHP Fatal error: Call to a member function on a non-object in /home/httpd/vhosts/clikserve.de/httpdocs/w
     
  5. BoXie

    BoXie Guest

    0
     
    It's not about safe mode (check your main php.ini file if it is disabled anyway) ... but you'll have to override / disable the open.base_dir.

    Not sure how to do this though.
     
Loading...