Upload file not working
I have created a simple script to upload file. It's not working. Shows error code 7.
I am running the script on CentOS. I have given full permissions (777) on upload temporary, final folders, even on the script file.
Temporary upload folder set through php.ini
Script has all required parameters like enctype="multipart/form-data" etc.
Error code 7 is UPLOAD_ERR_CANT_WRITE:
Value: 7; Failed to write file to disk.
If you've given 777 permissions, you may want to add some debug statements to your file manipulation code to make sure you're not running into relative file location issues.
None of the "file manipulation code" is relevant - if you're getting error 7, it means PHP couldn't write to the upload directory before it ever started executing any of your script.
Originally Posted by Wynder
@sandeept: I'm wondering if the 0777 (not to be confused with 777 decimals ) permissions were given on the directory that PHP is attempting to use. Have you done a phpinfo() to confirm that this directory is indeed where you expect it to be?
Thanks for the response.
Yes, I have checked phpinfo and I have given 777 permissions on respeective directory. But, I am wondering if this issue is related to CentOS or AWS (Amazon cloud services). I have set up websites earlier on different hosting service like GoDaddy, DailyRazor etc. But, I never faced such issue.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)