Forum Moderators: coopster
Without seeing the code in question or the error messages you're getting it's impossible to say: there's no fundamental issue with uploading bmps with move_upload_file
if ($result[2]<=3) {
...
}
Now then, my problem is apparently common, but I can't find a workable solution. Its the permissions problem. Several hosts I work on won't allow PHP to create/rename/alter files unless the file or directory's permissions are set to 0777, so live file uploads to public directories are impossible without leaving a huge security hole. I'm a newcomer to PHP, so I don't know how to set the user mode to owner or whatever is required to allow my code to work around this problem. My current implimentation does an initial move_uploaded_file to an inaccessible directory where I confirm its a real image file, and that's when I need to move it to the public directory... and I can't. Any advice or references would be appreciated. Thanks.
by the way, i have other issue regarding the upload images or file.
If my upload file size is 10Mb, in php.ini the "upload_max_filesize = 2M" & "post_max_size=8M".
Even i set the maximum file size can't over than 2M but the error message didn't show out.
If the user try to upload a too bigger file then the upload procedure will fail even if u have established an error message.
How to avoid this problem?