Results 1 to 5 of 5

Thread: PHP Scripts open_basedir restriction in effect Error

  1. #1
    Join Date
    Feb 2009
    Posts
    78

    PHP Scripts open_basedir restriction in effect Error

    hie,

    I am getting the warning error - open_basedir restriction in effect while dealing with the PHP script. This error prevents me from opening files or scripts located outside the home directory with PHP, unless the folder has specifically excluded.
    How do I resolve it ?

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: PHP Scripts open_basedir restriction in effect Error

    The solution to open_basedir restriction problem is -

    - to disable the PHP open_basedir protection altogether, or
    - to exclude the protection for certain privileged user accounts, or
    - to allow access to the additional directory for PHP scripts.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: PHP Scripts open_basedir restriction in effect Error

    Check your PHP configurations. I think something is seriously restricting you there due to which PHP is not allowing you to open any file which is not in a current directory.....Try setting open_basedir to none.

    Are you using Apache virtual hosts? becoz....that's one of the common reasons of this error (according to a PHP 4.2 bug report).

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: PHP Scripts open_basedir restriction in effect Error

    I had also received the similar warning.

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg) is not within the allowed path(s): (/home/user_name:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/user_name/public_html/wp-admin/inline-uploading.php on line 156

  5. #5
    Join Date
    Oct 2005
    Posts
    2,393

    Re: PHP Scripts open_basedir restriction in effect Error

    Are using cPanel WebHost Manager (WHM) ??

    if you are using WHM, it's very easy to disable PHP open_basedir protection or exclude certain users from the protection with WHM.

    > under the Security section, go to Tweak Security
    > select “Configure” link for “Php open_basedir Tweak”
    > Inside it, enable or disable php open_basedir Protection, or exclude and include hosts from the protection.

Similar Threads

  1. Replies: 3
    Last Post: 10-03-2012, 04:01 AM
  2. Replies: 3
    Last Post: 07-01-2011, 04:40 AM
  3. Webmail slow and /scripts/fixwebmail error
    By Acolapissa in forum Software Development
    Replies: 6
    Last Post: 19-06-2010, 12:33 AM
  4. An error has occured running scripts on this page
    By Swine Flu in forum Technology & Internet
    Replies: 3
    Last Post: 17-08-2009, 01:21 PM
  5. Replies: 7
    Last Post: 05-02-2007, 03:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,559,261.96816 seconds with 16 queries