I have added some file upload fields to a custom admin menu in the backend of wordpress. This is on a multisite installation with the uploaded files going to the blogs.dir/store-name directory in wp-content. For each new store in the network, if the blogs.dir/store-name folder doesn’t already exist, it creates it. However I am receiving the folloing errors the first time I use the file upload for each site:
Warning: filesize() [function.filesize]: stat failed for /tmp/php988u62 in /home/ckfash/public_html/wp-admin/includes/ms.php on line 31
Warning: Cannot modify header information - headers already sent by (output started at /home/ckfash/public_html/wp-admin/includes/ms.php:31) in /home/ckfash/public_html/wp-includes/pluggable.php on line 890
It always works fine on the second attempt. My first impression was a permissions issue when attempting to set up the folder if it doesnt exsist (which it wont for most sites) and returns the error even tho the folder is successfully setup? I have set the permissions to 777 for the blogs.dir directory and all its children and files.
Any ideas?