| Jeox.com Web Hosting - User Manual | ||
|---|---|---|
| <<< Previous | Securing Your PHP Applications | Next >>> |
The solution to this problem is to rename your .php files to .phps and make them executable (e.g. with rwxr-x--- permissions). Those PHPS scripts will then be run as the UNIX user associated with your hosting package instead of as the apache user increasing the security for your application considerably.
So securing your PHP application is a simple matter of:
Renaming all your .php files to .phps
Setting the permissions of all .phps files to rwxr-x--- (executable and inaccessible for the rest of the world)
Updating any links that point to .php files to point to the new .phps files
Tightening the permissions of other sensitive files in your account - you should make .inc files that are included in the PHPS scripts inaccessible to the rest of the world as well as property files that contain for example database and other passwords, etc
You can use your favorite FTP client or the File Manager to accomplish those tasks.
| <<< Previous | Home | Next >>> |
| Securing Your PHP Applications | Up | APPENDIX C: Glossary |