Honesty Rocks! truth rules.

Wordpress "missing A Temporary Folder" Issue

HOME      >>       Software

mahesh2k

I have installed wordpress 2.9.2 for one of my site and it is giving me error "missing a temporary folder". This error is related to some php.ini and default settings in wordpress. Before creating support ticket i thought it's worth to ask if anyone knows how to solve this error in wordpress.

 

I tried a lot of google searching and tried to fix this issue with the procedure explained in the tutorials but it is not working. I don;t know if i have to contact Xisto - Support for this. So trying to get this solved here as of now..

 

I tried some fixes like

 

http://ww1.dwightjack.com//?gtnjs=1

 

https://wordpress.org/support/topic/missing-a-temporary-folder-4/

 

and there is no success for me. i don't know what to do now to sort this issue. i can't upload any image or media to my posts because of this. new install also gives same issue for me.

 

 

any idea how to fix this ?


anwiii

did you backup everything before you upgraded? i hope so, because ANYTHING could be the problem......but i doubt it's xisto's problem and your support ticket will probably be for nothing as they wont be able to help you.maybe there's a bug in the new upgrade. i suggest you revert back to your backup and stay with it as that was more secure than when you tried to upgrade.


truefusion

Following from the sources you provided and assuming this is where the problem indeed lies, i come across wp-includes/Text/Diff.php after some extra research. Here's the code that WordPress 2.9.2 uses to retrieve the temporary upload directory:

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'); /* Otherwise, try to determine the TMPDIR environment variable. */ if (!strlen($tmp)) { $tmp = getenv('TMPDIR'); } /* If we still cannot determine a value, then cycle through a list of * preset possibilities. */ while (!strlen($tmp) && count($tmp_locations)) { $tmp_check = array_shift($tmp_locations); if (@is_dir($tmp_check)) { $tmp = $tmp_check; } } /* If it is still empty, we have failed, so return false; otherwise * return the directory determined. */ return strlen($tmp) ? $tmp : false; }
If ini_get() is returning something presumably useful, then you may want to consider overwriting upload_tmp_dir with ini_set(). This would, of course, require editing the Diff.php file. Have upload_tmp_dir point to your tmp directory above your public_html directory. If this doesn't help, then you'll have to continue your research.

mahesh2k

@Anwii, as install is new and there is no data uploaded to wordpress. i don't need backup as of now. I was just testing few plugins with test post and stumbled onto this image uploading issue. can't revert back to old installation as 2.9.1 had some security issues.@truefusion, edited php.ini in the root and pointed upload directory path to tmp folder. But still it is giving me some trouble. found many other wordpress user having the same issue but few got it resolved somehow but i can't get it solved. i made a ticket to xisto, just in case if they can help with that.


truefusion

edited php.ini in the root and pointed upload directory path to tmp folder. But still it is giving me some trouble. found many other wordpress user having the same issue but few got it resolved somehow but i can't get it solved. i made a ticket to xisto, just in case if they can help with that.

After doing more research (i.e. grep-ing WordPress :angel:), WordPress relies on the errors given from PHP when handling file upload errors. If the folder had been found and the file could not be written to the temporary directory, i would have expected PHP to return UPLOAD_ERR_CANT_WRITE (turns out ~/tmp has 0755 permissions). Since PHP is the one returning the error to WordPress, then, yeah, it does seem like it is on the server's side.

 

By the way, editing the php.ini file requires the server to be restarted in order for changes to take effect (at least that is what i can derive from here). For that reason ini_set() should be used. So unless you can restart Apache from your end, editing php.ini is almost futile.

 

By the way, the WordPress file i pointed to in my previous post, it seems, was not the file that was supposed to be edited. I'm not sure which one might help, but maybe wp-admin/includes/file.php or wp-admin/includes/import.php.


web_designer

i got the same problem when i tried to install wordpress 9.2, but i believe this is some server issues because, recently i had many problem in setting up new domain, so i was keeping on installing and uninstalling wordpress and it works fine till the last two days i can't make anything work fine.if you find a solution please let us know , good luck.


webishqiptar

Hi the same problem lies for me. I upgraded to 2.9.2 a couple of days ago and while I tried to upload a photo, I get the following " missing temporary folder"..I googled it and seems that the solution lies in changing some lines on the php.ini file, which in turns is commanded by the admin of the servers, and we don't have access on this file. So please let us know about the issue and what did the support told you for this..


mahesh2k

well i have that folder already but there is no success when it comes to uploading files. new version wordpress have upload structure something like " uploads/year/month/" and we can set this or use upload directory directly. not sure if this works cause i tried this already. i'll try if it works, else will create support ticket this time.


truefusion

I have been informed by tech support that this issue has been fixed, and i have just tried it out and i was able to successfully upload a file to a new WordPress installation. All i needed to do was create the folder "uploads" at wp-content/ (since i did not already have one) and give it 0777 permissions.


Saint_Michael

It had something to do with Apache being corupted and so wordpress should be working again since I test out my account and it works fine.


mahesh2k

well i'm facing one more problem. i just removed wordpress and all the files. now "wp-content" is not getting deleted. whenver i delete it gets created once again. so i have no clue what i have to do in order to remove old folders. is it some sort of virus that creates "wp-content" over and over again ? i'm damn tired of checking settings of public_html and other folders to see if there is any hidden file that is doing something like that but there isn't any.


anwiii

that is odd for that folder. i know i had problems deleting folders before, but it usually had to do with cache files that i didn't create so i wasn't the owner. if you have any of those file in there for some reason(i don't know why you would), you would have to write a support ticket to have the folder deleted since you may not own the files.

otherwise, if you are going to install wp again and use the same folder, you might just try overwriting and see if that might work? also, sometimes when i can't delete a folder, i delete all files in the folder first, and then sometimes that allows me to delete the folder.

well i'm facing one more problem. i just removed wordpress and all the files. now "wp-content" is not getting deleted. whenver i delete it gets created once again. so i have no clue what i have to do in order to remove old folders. is it some sort of virus that creates "wp-content" over and over again ? i'm damn tired of checking settings of public_html and other folders to see if there is any hidden file that is doing something like that but there isn't any.


Saint_Michael

How are you trying to delete the folder through FTP or through Cpanel? If you going through Cpanel try deleting it through the Legacy Cpanel and not the new one and if that doesn't work try a FTP program I recommend using FireFTP to get in.


truefusion

well i'm facing one more problem. i just removed wordpress and all the files. now "wp-content" is not getting deleted. whenver i delete it gets created once again. so i have no clue what i have to do in order to remove old folders. is it some sort of virus that creates "wp-content" over and over again ? i'm damn tired of checking settings of public_html and other folders to see if there is any hidden file that is doing something like that but there isn't any.

If you had ever uploaded something through the WordPress media manager (since the "uploads" directory is located under "wp-content"), then the files stored there aren't going to be deleted through cPanel or through FTP. You can even change all the permissions available, that won't help, because you do not own the uploaded files (though that may sound counter-intuitive). Even if there aren't any files, WordPress creates folders within the "uploads" directory too (as you mentioned, according to date), which you do not have ownership of. To delete the files and directories under "wp-content" (since you have already deleted the rest of WordPress), you'll have to create a PHP file that recursively goes through all the directories under "wp-content" and deletes any files and directories under it.

BuffaloHelp

And if you cannot write you own script to delete folder/file that you do not have the Owner privilege (because what truefusion mentioned) please contact the support and submit a ticket to delete them for you.Another way to quickly resolve this issue is to install a fresh one from your cPanel. They are outdated version, I know. Then upload updates and install them. In the past, installing another from cPanel resolved the issue of running the WordPress and upgrading with newer files have solve the issue you described.Let us know how it goes.


mahesh2k

I just reinstalled the wordpress from fantastico and looks like this problem is solved for folder deletion. i don't know how but i guess BH was right about the folder/file overwrite with new installation. i do have another cms install which i have removed and it's files/folders remained and as there is no fantastico or auto uninstallation for that i can't delete the files for that, same like wordpress. but this time the cms is frogcms. ive just changed the directory permission to 644 for it as i can't delete it i just let it remain there.