davidterranova Posted March 26, 2012 Share Posted March 26, 2012 Hello there, I built a Flash app a few years ago that was used in a CMS to upload files to the local filesystem. It is using a php script which includes this: $ext = explode('.',strtolower($_FILES['Filedata']['name'])); $ext = ".".$ext[count($ext)-1]; $a1 = move_uploaded_file($_FILES['Filedata']['tmp_name'], $path.$id.$ext); // $path and $id are being passed from the flash file $a2 = chmod($path.$id.$ext, 0777); It's been working fine for all this time, however something has changed recently on the server and it has stopped working. The Flash file takes the file and goes through the motions of uploading, and doesn't return any errors, except that when I go to the folder the file just isn't there. So I got the php file to mail me whenever it got processed: path = ../../_res_dropbox/website/_mediafiles/ id = 100 ext = .swf _FILES['Filedata']['name'] = Zambia.swf _FILES['Filedata']['tmp_name'] = So it turns out that $_FILES['Filedata']['tmp_name'] is empty... In fact the server returns this PHP Warning: chmod() [<a href='function.chmod'>function.chmod</a>]: No such file or directory in /var/www/vhosts/redearthstudio.com/httpdocs/client/website/uploadScript.php on line 13 (line 13 is the 'tmp_name' line) Does anyone know why this might be happening, all of a sudden and out of the blue? This website has been out of my hands for a while, so I don't know what has changed on the server over the past few months... possibly upgrading from php4 to 5? Many thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/259765-upload-script-stopped-working-suddenly/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.