Choosing php and mysql as programming language for a website is not enough. With open source coding being one of the inherent properties of php mysql development, securing your codes becomes essential. So when one allows the users to upload files on the website, then security is definitely at stake.
PHP Programming Protection
While it is not entirely possible to protect your site, yet there are few precautions that you can incorporate for better protection of PHP programming. Some of these are:
-> You should check the referrer, for being sure that the information sent is from your website and not an outside source. Since, there are maximum chances of the information being fake.
-> Restriction of the type of extension files being uploaded on the website is yet another method of security check.
-> Renaming files is another way in which the program can be secured. This procedure involves the checking of double-barreld extensions like yourfile.php.gif.
-> Changing the permission command for the upload folder so that files within it are not executable.
-> All the alterations created by the user should be allowed only when they...