Title: Missing Temporary Folder; php.ini not accessible
Last modified: August 19, 2016

---

# Missing Temporary Folder; php.ini not accessible

 *  Resolved [lightfoot33](https://wordpress.org/support/users/lightfoot33/)
 * (@lightfoot33)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/)
 * I hate to post yet another topic on the dreaded “Missing a temporary folder” 
   but I think I know what my problem is… I just don’t have a solution.
 * Upon initially getting this error, I did all the suggested fixes:
    – I tried 
   a variety of paths and full URLS on the Settings > Miscellaneous page – I created
   a “tmp” and “wwwtmp” folder in the directory where WordPress is installed (since
   it is not installed in the root folder) – I contacted the hosting company in 
   regards to the php.ini file (since I don’t have shell access) and they just told
   me: “In the ‘ www / htdocs / tmp’ folder on the server, there is a folder called“
   tmp” that already exists. You should be able to read-write-execute that folder.”
   This, of course, wasn’t the answer I was hoping for, especially since I was the
   one who created that folder.
 * My question is this: Is there anyway I can set the upload_tmp_dir in a file other
   than the php.ini? Without access to that file, I don’t know what my options are.
   I have recontacted the hosting company in regards to that file, but don’t expect
   to get much helpful information back.
 * Any solutions would be greatly appreciated.

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

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224668)
 * who is your host?
 * I have godaddy, and since it is shared hosting I don’t have shell access, but
   I was able to just create my own php.ini file and it worked for me to be able
   to adjust tmp directory & file upload sizes….
 *  Thread Starter [lightfoot33](https://wordpress.org/support/users/lightfoot33/)
 * (@lightfoot33)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224670)
 * It’s a smaller, local hosting company. I think I am going to have to create my
   own php.ini file since they just confirmed that one doesn’t currently exist on
   the server… That is unchartered territory for me. Any advice on what information
   goes in that file? Or better yet, is there an example you can post?
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224673)
 * well….if you are looking to learn about it, just google php.ini so that you know
   what functions are available to you…..it’s pretty simple….
 * rg_emulation = off
    allow_url_fopen = on memory_limit = 250M post_max_size = 
   100M file_uploads = On upload_max_filesize = 900M upload_tmp_dir = /home/content/
   b/a/d/badexample/html/tmp
 * here’s an example tho of some stuff that could go in it…… it’s a pretty simple
   file…
 *  Thread Starter [lightfoot33](https://wordpress.org/support/users/lightfoot33/)
 * (@lightfoot33)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224674)
 * Okay thanks. I usually only deal with HTML and CSS so this is a new language 
   for me. I assume then that I upload it to the etc folder in my root directory?
   Even though my wordpress is not installed in the root directory? Thanks for all
   your help — I appreciate it!
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224688)
 * mine’s in the html folder…..which is the root folder I can get to….
 *  Thread Starter [lightfoot33](https://wordpress.org/support/users/lightfoot33/)
 * (@lightfoot33)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1224720)
 * Thanks RVoodoo. I definitely feel more confident now about fixing this problem.
   Hopefully anyone else having similar problems will be able to follow your advice
   as well. Thanks again!
 *  [lovejungle](https://wordpress.org/support/users/lovejungle/)
 * (@lovejungle)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225117)
 * Did anyone get a fix for this?
 * I’ve got the same problem now. Missing temporary folder. and no SSH access..
 * My account is at –
    [http://www.some-things.net/wordpress](http://www.some-things.net/wordpress)
 * I’m not too sure who my hosting is with, as I’ve not had contact with them for
   over 4 years, but miraculously my website is still online..
 * I have access to DirectAdmin and myPHP menus..
 * Does any one have any tricks I can try?
 *  [maijag](https://wordpress.org/support/users/maijag/)
 * (@maijag)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225126)
 * I had this problem and it took a ton of trying dead ends to finally fix it. In
   all of my reading on this subject I’ve found that there is no one solution that
   works and it varies depending upon the hosting arrangement. The one solution 
   often cited is to edit the php.ini in the /etc/ folder, except that this only
   works if you have access to that directory, for example, because you’re running
   your own server. However, if you are using shared hosting, php.ini might exist,
   but you might not be allowed to access and modify it. In this case you create
   your own user php.ini to add your own directives (assuming you’re allowed by 
   your host to do this. If you’re not, you might need a new host!)
 * To find where php.ini is, create a plain text file called phpinfo.php and putting
   this code into it:
 *     ```
       <?php
       phpinfo();
       ?>
       ```
   
 * Upload it to your root directory and then access it by looking at [http://mydomain.com/phpinfo.php](http://mydomain.com/phpinfo.php)
   You should see a long formatted table of all of your server’s php settings, including
   the location of php.ini. It might turn out that it’s someplace that you can access
   it, in which case you can proceed to edit the ‘upload_tmp_dir’ line (more below).
 * You can also see the setting for ‘upload_tmp_dir’, which, if you’re getting this
   error, probably has no value. If it *does* have a value then you might want to
   hunt around for that folder on your own server space and check the permissions
   for it before trying anything else. (Google “wordpress permissions” for more 
   info. Use the 777 setting temporarily if at all). If it works and you get an “
   unable to move files to…” error, then you have to fiddle with the permissions
   on the uploads folder as well.
 * Here’s the fix if you don’t have access to the system-level php.ini (hopefully
   it’s a fix, again, these solutions seem to vary according to service provider
   and their set up):
 * 1) Find out where WordPress is trying to create the tmp file. (Courtesy of **
   danoph** in [this thread](http://wordpress.org/support/topic/224319?replies=17)):
 * > If you are using WordPress 2.7 [or later], go to wp-admin/includes/file.php,
   > and after line 260 [seems to be line 257 in 2.9], add this line temporarily:
   > `echo getcwd();`
   > This will tell you the current working directory [when you try to upload a 
   > file it appears at the top of the upload window]. If there is more than just“/”,
   > you will need to add this to your PHP temporary directory line as well instead
   > of just the usual “/tmp”
   > So, I changed my php.ini file from upload_tmp_dir =”/tmp/” to
   > `upload_tmp_dir ="/usr/home/usernamehere/tmp/"`
 * 2. If you were unable to find a php.ini to edit, you must create one. Using a
   plain text editor like NotePad, create a file called php.ini.
 * 3. Put the following code into your new file or edit the line in your existing
   file: `upload_tmp_dir ="/whatever-path-you-got-from-step-one/tmp/"`
    If you have
   an existing php.ini file, the line may be commented out with a preceding semicolon(;),
   so be sure to remove the semicolon. Save the file.
 * 3. This is the step that may vary according to service provider and WordPress
   version. Your service provider may tell you where to put php.ini if you ask, 
   or have PHP documentation in their help files which will say, or you might have
   to do trial and error. Upload the file into one of the following:
    - wp-admin folder
    - the root folder where you have your WordPress files stored, eg. ‘myblog’ or
      the ‘public_html’
    - cgi-bin folder (this is the one that worked for my situation)
    - or (heaven forbid) any WordPress folder containing PHP. This seems like overkill
      but I did see it suggested in one discussion of the issue
    - Hope that helps somebody!
 *  [maijag](https://wordpress.org/support/users/maijag/)
 * (@maijag)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225127)
 * **IMPORTANT!! I forgot a step in the above!**
 * You also have to create the “tmp” folder at the location where WordPress is trying
   to create it! Make sure the owner (you) has permissions to write to it (again,
   google for more info).
 *  [thewordpresser](https://wordpress.org/support/users/thewordpresser/)
 * (@thewordpresser)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225129)
 * Well if you had BlueHost hosting it wouldn;t be a problem…. in fact it is verrrry
   simple to fix. This may work with your host as well –
 * First you need to find the php.ini file as mentioned above. This will usually
   be in your main “public_HTML” folderon your server so you’ll need to use your
   FTP to locate it. A lot of times you won’t have one. That is why I said it is
   cake if you have BlueHost, because they will create one for you and then all 
   you have to do is edit it. If you have BlueHost just follow these instructions.
 * [http://helpdesk.bluehost.com/index.php/kb/article/128](http://helpdesk.bluehost.com/index.php/kb/article/128)
 * Then when you are done, just go to your FTP, locate your new php.ini.default 
   file and then download it to your hard drive. Now open that file using Notepad
   C++ ( a great free text editor) or any other text editor… I used Notepad C++ 
   because it lays out the text in an understandable manner (it’s not cluttered)
   and plus you can use the search function at the top left side to find the little
   piece of code you need to edit which is – “memory_limit = ”
 * To find it in the php.ini.default file just use the search function in your text
   editor and search for the term “memory” and it should show up. Then type in 250m
   to the right of the equal sign. I.E. if your file currently says “memory_limit
   = 32M” then you would need to change it to memory_limit= 250M”.
 * Now save the file, and then rename it to “php.ini”. Now upload that file back
   to the same folder you downloaded it from. I.E. if you downloaded it form your
   Public_HTML folder, then you would upload it back to that folder. Make sure the
   file is named – php.ini!
 * That;s it you’re done! Hoped this helped! If you have trouble you can call BlueHost
   support at any hour of the day… another reason why I use them! 😉
 *  [Jodi Wigmore](https://wordpress.org/support/users/jodi-wigmore/)
 * (@jodi-wigmore)
 * [16 years ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225140)
 * hi maijag
 * thanks, i managed to edit the php.ini and it also worked in my cgi-bin dir
 * i am using a hosting company that has been sadly lacking now for years – bluehost
   is proving to be steady, so i’ll probably move the site soon – everything got
   messed up when they upgraded me to php 5.2
 * and thanks, thewordpresser, i added more memory, too
 * jodi
 *  [Sjeng](https://wordpress.org/support/users/sjeng/)
 * (@sjeng)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225151)
 * Well, I’ve tried several things with my limited knowledge of php editing, but
   no luck here.
    The php.ini is there on the server, but I am not allowed to access
   it, as I am just a user on the server. There’s also a /tmp/ folder, so basically,
   that shouldn’t be the problem either. Adding self made tmp folders to my website’s
   wordpress directories doesn’t work. I think the server is using Apache. It’s 
   @ onedot.nl So, I’m stuck here…
 *  [Sjeng](https://wordpress.org/support/users/sjeng/)
 * (@sjeng)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225152)
 * I noticed another strange thing:
    `Uploading FilesStore uploads in this folder:(
   blank) Default is wp-content/uploads` The mentioned “default” folder isn’t there
   in the WP3 zip file… So I created it myself, but to no avail… setting that folder
   to 777 also does not work.
 *  [Sjeng](https://wordpress.org/support/users/sjeng/)
 * (@sjeng)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225153)
 * found this in the standard wordpress 3 installation files, wp-includes/Text/Diff.
   php:
 *     ```
       function _getTempDir()
           {
               $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp',
                                      'c:\windows\temp', 'c:\winnt\temp');
   
               /* Try PHP's upload_tmp_dir directive. */
               $tmp = ini_get('upload_tmp_dir');
       ```
   
 * C:\??? That can’t be right…
 *  [Sjeng](https://wordpress.org/support/users/sjeng/)
 * (@sjeng)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225154)
 * Well, my hosting service looked into it, and he did the following:
    He made a/
   var/www/tmp directory, with the same permissions as /tmp, and had php.ini redirect
   to that folder, which was impossible for me to do. He says it’s a typical WordPress
   thing. So I guess this should be fixed in the next WP update. I think he also
   made a htaccess file, because now I can make custom permalinks, which didn’t 
   work at first. The default ?p=N only worked, all others didn’t, because WP3 apparently
   does need a htaccess file, even though it isn’t included in the WP3 zip.
 * Guys, WP3 needs work!

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

The topic ‘Missing Temporary Folder; php.ini not accessible’ is closed to new replies.

## Tags

 * [php.ini](https://wordpress.org/support/topic-tag/php-ini/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 15 replies
 * 7 participants
 * Last reply from: [Sjeng](https://wordpress.org/support/users/sjeng/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/missing-temporary-folder-phpini-not-accessible/#post-1225154)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
