Support » Fixing WordPress » open_basedir restriction in effect

  • So, I’ve also got this problem.

    I’ve read some about it here on the forums, but still can’t get it to work. Basically it tells me that my /tmp folder isn’t within the allowed path(s). I’ve tried some different commands like

    define('WP_TEMP_DIR','/tmp');
    define('WP_TEMP_DIR', ini_get('upload_tmp_dir'));
    putenv('TMPDIR=' . ini_get('upload_tmp_dir'));
    putenv('TMPDIR=/path/to/my/web/hosting/directory/www/tmp/');

    well, think that’s all… and none of those work. What am I doing wrong? As far as I can tell the path to my root is:
    /usr/local/pem/vhosts/my_account_number
    and the path for my httpdocs is:
    /usr/local/pem/vhosts/my_account_number/webspace/httpdocs

    I’m httpdocs I’ve created a tmp folder with the correct attributes, and now I try to link it, but it won’t work… I’ve tried alot of different options, and now I come to you for help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • one of those should work unless your host simply won’t allow it – some paranoid ones don’t
    ask them

    I have, they told to google it… apparently other users are running WP on the same host as I am, and it’s working good for them… I’m starting to regret my choice of host though, they seem to be a bunch of *fill in something bad*…

    I think I’ll just try to reinstall WP and see what happens.

    Alright, got 1 of the problems sorted and another one came up. (of course, would’ve been to easy otherwise).

    Anyhow, this is what I get now

    Warning: ftp_rawlist(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/local/pem/vhosts/******) in /usr/local/pem/vhosts/******/webspace/httpdocs/wp-admin/includes/class-wp-filesystem-ftpext.php on line 203
    Warning: ftp_rawlist(): Unable to create temporary file. Check permissions in temporary files directory. in /usr/local/pem/vhosts/*******/webspace/httpdocs/wp-admin/includes/class-wp-filesystem-ftpext.php on line 203
    
    Unable to locate WordPress Plugin directory.
    
    Installation Failed

    Any suggestions?

    shameless bump…

    I’ll bump too, because I’m having the same problem. I can activate some but not all of my plugins; the ones that fail do so for the open_basedir restriction. Ugh.

    Let me bump it again cause I’m having the same problem. Except mine is on an add-on domain. I think in my case it’s just not finding the right file because my server isn’t paranoid.

    Added my code:

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/a3dfiner:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/a3dfiner/public_html/raswarrior.com/wp-includes/functions.php on line 1746
    
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/a3dfiner:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/a3dfiner/public_html/raswarrior.com/wp-includes/functions.php on line 1737
    
    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/a3dfiner:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/a3dfiner/public_html/raswarrior.com/wp-includes/functions.php on line 1746
    Unable to create directory /public_html/raswarrior.com/wp-content/uploads/2009/06. Is its parent directory writable by the server?

    Yes, the directory is writable. Keep in mind, I’m on an addon domain.

    OK, GOT IT!
    In Settings “Miscellaneous”, no matter what, make sure it has the default wp-content/uploads Anything else will give you an error.

    hjertis

    (@hjertis)

    Guess here’s another bump… cleasterwood’s solution didn’t work for me, since it’s my \tmp dir I can’t get access to. Somehow I need to change it…

    Any suggestions? Does 2.8.2 work better with this?

    Thanks cleasterwood – would never have thought to look there!

    I do have this issue with a complete new install. I have the same blog running on another domain, same provider, same server. I don’T have this issue with other blogs.

    So the error message I get right at the very first install screen:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/xxxxxx.xxx/wp-config.php) is not within the allowed path(s): (/var/www/vhosts/xxxxxx.xxx/httpdocs:/tmp) in /var/www/vhosts/miguet.info/httpdocs/wp-load.php on line 32

    It also won’t let me write the wpconfig. It always says it’s write protected, but it’s not.

    No clue what’s wrong, I have 4 blogs running, without an issue, but this one just doesn’t want to get even installed.

    Cleasterwoods answer fixed it for me.
    In Settings “Miscellaneous” >Store uploads in this folder:
    My entry was “/wp-content/uploads” rather than “wp-content/uploads”

    after I changed that, i didn’t have any more problems.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘open_basedir restriction in effect’ is closed to new replies.