Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jun 2004
    Posts
    30

    Exclamation Warning: open_basedir restriction in effect

    I have a client who is trying to set up a froogle feeder for OS Commerce and is getting an error saying there are directory restrictions "Warning: open_basedir restriction in effect".

    When doing multiple Google and cPanel searches for a solution I find a number of things including this.... "For security purposes, your host is running PHP in safe mode. If you are tying to install a script that will allow the outside world to upload files to the server, this will be disallowed by default. Create a vhost.conf file that will allow uploading via PHP.".... I also found more info on the vhost.conf but I can not find it on our server.

    Is this file created by default or do I have to create it? If I have to create it where do I put it so it fixes this clients issue but does not comprimise the overall server?


    Thanks for any help.

  2. #2
    Member
    Join Date
    Sep 2004
    Location
    Cleveland, Ohio
    Posts
    378

    Default

    In WHM Security tweaks, you must exlude that site's virtualhost in the open_basedir protection page.

  3. #3
    Member
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    237

    Default

    Ver17:

    By default, the open_basedir restriction prevents users from running PHP scripts outside of their /home/accountname/ directory. As Blue|Fusion indicated, you can remove the restriction on that account if needed through the WHM.

    However, you can also control this through an entry in .htaccess or php.ini (depending if phpsuexec is running), as well as in the httpd.conf file. In fact, if you look in /usr/local/apache/conf/httpd.conf, you will find a directive in the account's VirtualHost container that is something like this:

    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/AccountName:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>

    Basically the above states the account can only run PHP scripts in the directories indicated (or anything below them).

    I'm not familiar with this froogle feeder ... but I'd want to know what they are trying to do that would install something outside of their home directory. I've had a case where it made sense to install "shared" php scripts (for all accounts) in a directory such as /home/common/ ... but you then have to adjust the open_basedir directive above to include this directory otherwise they will not run.

    Hope this is of some help -
    Last edited by RickG; 05-28-2005 at 10:27 AM.

Similar Threads & Tags
Similar threads

  1. open_basedir restriction in effect, but is disabled
    By AudunS in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-30-2011, 06:18 PM
  2. open_basedir restriction in effect.
    By Guda in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-23-2008, 08:34 PM
  3. After transfer backups I got open_basedir restriction in effect.
    By esupport.org.ua in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-08-2005, 07:08 AM
  4. open_basedir restriction in effect.
    By melvinmeow in forum New User Questions
    Replies: 0
    Last Post: 04-09-2005, 02:31 PM
  5. Error: open_basedir restriction in effect
    By Jeff75 in forum cPanel and WHM Discussions
    Replies: 17
    Last Post: 01-29-2004, 07:18 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube