1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PEAR open_basedir trouble

Discussion in 'Plesk for Linux - 8.x and Older' started by hegebutt, Dec 28, 2005.

  1. hegebutt

    hegebutt Guest

    I'm trying to use PEAR, but I'm getting the following error:

    Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/HTML/Template/ITX.php) is not within the allowed path(s): (/home/httpd/vhosts/yumyumweb.com/subdomains/itns/httpdocs:/tmp) in /home/httpd/vhosts/yumyumweb.com/subdomains/itns/httpdocs/wda2-book/wda/ch10/example.10-1.php on line 2


    I read some other posts in this forum and created a vhost.conf file in /home/httpd/vhosts/yumyumweb.com/subdomains/itns/conf, which looks like this:

    <Directory /home/httpd/vhosts/yumyumweb.com/subdomains/itns/httpdocs>
    php_admin_value open_basedir /home/httpd/vhosts/yumyumweb.com/subdomains/itns/httpdocs:/tmp:/usr/share/pear

    I then restarted httpd, but I'm still getting the error that there's a restriction.

    Here's my phpinfo:

    It seems like this should work, so I'm stumped. Ideas?
  2. hegebutt

    hegebutt Guest

    Sorry about this post, must have not been searching correctly yesterday, because today I found the answer to my problem in another post.

    In case anyone stumbles upon this post looking for the answer, here it is:

    After creating the vhost.conf and/or vhost_ssl.conf files, you must run the command:
    /usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
    (replace domain.com with the name of the domain)

    Then restart the Apache service. Then the changes will take effect.
  3. kliksys

    kliksys Guest

    common errors & filling in the blanks.

    I spent about 8 hours reading various post with tons of trial and error to figure this out. Some of things I've learned which may help others.

    1) creating the vhost.conf file
    Everyone assumes everyone know how to create this file.

    # cd /home/httpd/vhosts/domain.com/conf
    ls -l (this will show you all the files in the folder.

    # touch vhost.conf
    Hit enter and the file is created, after you've created the file.

    # vi vhost.conf
    Type (Shift+c)

    This allows you to edit the file

    (Shift+c) allows you to insert the text in the file. Enter the information you have scene for what should be in the file hit (Esc) then (Shift):wq to save your changes.

    2) Make sure to enclose the file path after open_basedir "file path"

    3) Make sure that you create a file called vhost.conf and not vhosts.conf. Simple as it seems it happens.

    Other than that you should be good, I worked on this thing so long I can't be sure which or exactly what was needed plan to go back through and back stuff out to see when it stops working, but overall the information is on here to get it working.