I am with new web host. The public_html folder of each domain I create is auto generated with an .htaccess that has the following line:
AddHandler php5-script .php
What is this for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This just instructs PHP to handle files ending in
.phpby passing them to the PHP5 interpreter. Without this configuration in place, the web server may serve the files to the end-user’s web browser as raw PHP code, rather than executing the code. That raises the dangerous possibility of exposing database login credentials or, or other secrets.Using the same mechanism, you could configure the web server to parse files with other extensions besides
.phpas PHP scripts and hand them to the PHP interpreter. This is occasionally done to mask PHP scripts by naming them with.htmlextensions, for example.