Index.php starts to download instead of opening in Linux Web Host

 

Outputs gives large amount of information about the client state of the PHP. This will be including the information about the PHP compilation options as well as extensions. The server information ad environment as well this will be shown if it has been compiled as a module. Here the PHP information, the OS version information the paths and the local version of the configuration options. It shows the HTTP headers as well as the PHP license.

Sometimes when trying to access the index.php page in linux web hosting, the browser tries to download it instead of opening it. In this case a dialog box will appear which says that "downloading file" and then it will start the downloads process.




This type of incidents in linux web hosting mainly occurs when the website has been migrated from one server to another server. This case can also appear if the server has been updated. This type of issue arises mainly when the website is developed on "drupal".

Steps to Solve the Issue of Index.php being downloaded instead of Opening in linux web hosting:

Step 1: The first step for solving the issue, is by opening the file manager and then by looking for the .htaccess file in the main directory.


Step 2: Once the main directory has been opened in linux web hosting you will be able to find the codes which has been shown in the screenshot as shown below.


 

Step 3: Here you will be able to find the .htaccess file which is at the bottom. You just have comment on the 2 lines and then save the file.

By following the above three steps you will be able to open the index.php file instead of downloading it.

If you still find any difficulties you can always contact us. Our Technical Experts are always available in resolving your query.