Title: Image upload error &#8211; open_basedir
Last modified: August 20, 2016

---

# Image upload error – open_basedir

 *  [katalonian](https://wordpress.org/support/users/katalonian/)
 * (@katalonian)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/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
       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!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Jackson Whelan](https://wordpress.org/support/users/madjax/)
 * (@madjax)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/image-upload-error-open_basedir/#post-2272857)
 * 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.
 *  Thread Starter [katalonian](https://wordpress.org/support/users/katalonian/)
 * (@katalonian)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/image-upload-error-open_basedir/#post-2272859)
 * **Jackson**
    How i wrote before, i run WP on my **own server**. There is some
   solution?
 *  [Jackson Whelan](https://wordpress.org/support/users/madjax/)
 * (@madjax)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/image-upload-error-open_basedir/#post-2272861)
 * > 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' );`
 *  Thread Starter [katalonian](https://wordpress.org/support/users/katalonian/)
 * (@katalonian)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/image-upload-error-open_basedir/#post-2272868)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [katalonian](https://wordpress.org/support/users/katalonian/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/image-upload-error-open_basedir/#post-2272868)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
