.htaccess php file downloads instead of being Opened with CPanel - Solved

.htaccess should have following directive in a correct manner otherwise it shows the following error in apache error log which can be seen in logs section of cpanel.

AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml


AddHandler application/x-httpd-php53.php won't work and will give the following errors so use AddType Directive instead.

Error Log:

[Wed Jun 25 00:19:45 2014] [alert] [client 139.190.50.121] /home/idoidoco/public_html/.htaccess: AddHandler requires at least two arguments, a handler name followed by one or more file extensions
[Wed Jun 25 00:19:45 2014] [alert] [client 139.190.50.121] /home/idoidoco/public_html/.htaccess: AddHandler requires at least two arguments, a handler name followed by one or more file extensions
[Wed Jun 25 00:19:45 2014] [alert] [client 139.190.50.121] /home/idoidoco/public_html/.htaccess: AddHandler requires at least two arguments, a handler name followed by one or more file extensions
[Wed Jun 25 00:19:45 2014] [alert] [client 139.190.50.121] /home/idoidoco/public_html/.htaccess:


After getting it worked, an internal server error might be seen which can be resolved by changing to a proper PHP version for your application.

Popular posts from this blog

How to Delete WHM Mail Queue through SSH sent from a particular sender

how to change witribe wlan password? how to secure your witribe router

How to Delete all logs in a cpanel server - SSH