On my localhost (XAMPP) environment I am using WordPress plugin called nMedia User Uploader and getting below error while uploading file
Warning: filesize() [function.filesize]: stat failed for C:\xampp\htdocs\newsite/site-content/uploads/articles/user_uploads/jack_artist/Untitled-1.jpg in C:\xampp\htdocs\newsite\plugs\nmedia-user-file-uploader\nm_fileuploader.php on line 214
I tried to check with var_dump($dt); but cant understand what is wrong here.
array(6) { ["fileName"]=> string(14) "Untitled-1.jpg" ["fileDescription"]=> string(0) "" ["userID"]=> int(3) ["fileType"]=> string(4) ".jpg" ["fileSize"]=> bool(false) ["fileUploadedOn"]=> string(19) "2012-08-25 19:20:37" }
Here is the $dt array
$dt = array( 'fileName' => nmFileUploader::$file_name,
'fileDescription' => nmFileUploader::$desc,
'userID' => $user_id,
'fileType' => nmFileUploader::$file_type,
'fileSize' => filesize($filePath),
'fileUploadedOn' => current_time('mysql')
);
So is this issue with localhost xampp and will work on live server?
Well the problem is due to file permission setting on localhost, please check this on live or Linux based environment where directory permissions set to 775.