Support » Fixing WordPress » Image upload error – open_basedir

  • Hi all! Im using wordpress on my own server. When i want to upload images, i getting this error:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/phpTohuWB) is not within the allowed path(s): (/var/www/ziya/data:.) in /var/www/ziya/data/www/mysite/wp-includes/functions.php on line 2497

    I read much more about that error, but nothing help me.
    Also, files are uploading but i getting this error on upload page and my images doesn’t apply to my post.
    Hope to get help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is a PHP configuration issue, your quickest solution is to contact your hosting company who will tell you what needs to be adjusted and how.

    When you figure it out, be sure to post back here with the name of your host as well so others can find the info.

    How i wrote before, i run WP on my own server.
    There is some solution?

    own server

    Means many things to many people… But if you are literally hosting this server yourself and have no admin support then you could try:

    Create and then specify a tmp directory ( ie: /var/www/ziya/data/tmp ) within the allowed path, via php.ini or http.conf

    ini_set( 'upload_tmp_dir', '/var/www/ziya/data/tmp' );

    if i create tmp directory, why i can’t specify this folder in wp-config.php with define function ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image upload error – open_basedir’ is closed to new replies.