rahvee
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Missing a temporary folder.When you see the “missing a temporary folder” error, it just means wordpress was unable to write to the temp folder – either because it’s not defined, or because the user nginx or apache httpd runs as doesn’t have write permission in the target directory.
The problem could be permission bits (you can try
chownorchmodon the target directory) or selinux or apparmor.First, figure out what directory the system is trying to use (described below), and then check what user the web server is running as, and check the permissions on the target directory. If permissions look good, consider if selinux is enforcing by running (as root or sudo)
sestatusand if it’s enforcing, you might have to change the target directory’s selinux context. If you’re on a debian/ubuntu variant of linux, you might have apparmor running. I don’t know how to check status on that one; you’ll have to google it or something.If you want to confirm which directory your wordpress is using for temp, there might be an easier way than this, but I was able to edit
wp-includes/functions.php, find the functionget_temp_dir(), and everywhere it says “return” stick a line just above it to display what’s getting returned. You can useerror_log(), orecho, orprint.Forum: Fixing WordPress
In reply to: Missing a temporary folder.If you
define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');in thewp-config.phpfile, then it should take effect inget_temp_dir()function inwp-includes/functions.php.Sometimes you might need to do this, to specify a custom temp dir, to resolve the
Missing a temporary foldererror message.In previous posts on this forum, found by googling and using the search function on this forum to find the
Missing a temporary foldererror message, people have pasted thedefineline, using unicode quote-like characters, instead of the actual ASCII single quote characters. This is almost indistinguishable to a human reading the code (depending on your font), but the end result if you paste the wrong quote type into yourwp-config.phpfile isWP_TEMP_DIRhas no effect.