WordPress.org

Ready to get started?Download WordPress

Forums

Image upload error - open_basedir (5 posts)

  1. katalonian
    Member
    Posted 2 years ago #

    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
    167

    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!

  2. Jackson
    Member
    Posted 2 years ago #

    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.

  3. katalonian
    Member
    Posted 2 years ago #

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

  4. Jackson
    Member
    Posted 2 years ago #

    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' );

  5. katalonian
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.