Clearing your browser cache is always a good idea. AddHandler php5-script. DirectoryIndex index. Sam Azer Sam Azer 3 3 bronze badges. The problem here is that PHP is not being run correctly somehow, or the wrong headers are being sent Note the last AddType directive which is commented out in the above example, causes a.
Is it possible that your Apache configuration is pretty-printing. You can begin installation of modules like, sudo apt-get install libapache2-mod-php7. Noushad Noushad 4, 3 3 gold badges 22 22 silver badges 27 27 bronze badges. Thanks to all!!! Ladislao Garcia Ladislao Garcia 62 2 2 bronze badges. Take care of browser cache too. My system : Ubuntu Do NOT set it to On as it prevents.
In case someone is using php7 under a Linux environment Make sure you enable php7 sudo a2enmod php7 Restart the mysql service and Apache sudo systemctl restart mysql sudo systemctl restart apache2. MedoAlmasry MedoAlmasry 3 3 silver badges 18 18 bronze badges. Jeffrey Bosboom Craig Smilovitz Craig Smilovitz 13 3 3 bronze badges. Marouen Mhiri Marouen Mhiri 1, 1 1 gold badge 12 12 silver badges 20 20 bronze badges.
The conclusion If I commented these two lines out in my. The entire story I have VirtualMin installed on an Ubuntu I tried all kinds of stuff: Removed PHP7.
Tried enabling and disabling apache modules, on the existing installation, but without luck. Then I removed apache completely and installed it again, where-after the problem was still there!
And I found the module name by Googling around. I had to active about modules, before I got past that step in the validation - and it took a couple of minutes before the cache ran out, - so doing this was a tedious step. And lastly, I figured out above-written conclusion - together with the symlinks, - and then I got it to work.
I had to go through it for every site on my VPS, though. Zeth Zeth 1, 2 2 gold badges 29 29 silver badges 59 59 bronze badges. Dia Dia 1 1 gold badge 2 2 silver badges 15 15 bronze badges. TomoMiha TomoMiha 1 1 gold badge 11 11 silver badges 11 11 bronze badges.
I had constructed a test. Slip Slip 1 3 3 bronze badges. If none of the above works, try commenting out the line SetHandler Arun Panneerselvam Arun Panneerselvam 1, 1 1 gold badge 15 15 silver badges 21 21 bronze badges. Then I check PHP is enabled. I check installed PHP packages. I think this will help anyone. Janaka Pushpakumara Janaka Pushpakumara 4, 3 3 gold badges 23 23 silver badges 30 30 bronze badges. Find centralized, trusted content and collaborate around the technologies you use most.
Connect and share knowledge within a single location that is structured and easy to search. I would really like my index. I read that you can do this through the htaccess file.
I only have access to a subdomain website directory, where I can upload my files through FTP. The directory did not have a htaccess file, so I created one using notepad:. The problem is, instead of loading the index. You don't need to name the file index. You can change the default document using your with an entry in your.
If really do want PHP to interpret your. If the server has PHP installed and enabled, that content-type will cause it to be run though the PHP engine and then the output from that sent to the client. If it doesn't have PHP installed, then the file will just be served up to the client with that content-type.
Since browsers don't handle PHP scripts themselves, they will then just save the file. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
You may want to always have the user download the file instead of opening it within their browser. This way the user has their own copy of the file. To do so requires a small bt of code to be added to your htaccess file for that domain. Below is the set of instructions to help you do just that. How to force a file fo download instead of displaying via the. In the example below, we will give an example for two types of files.
WebHostDesignPost is a blog that will help you learn something new. We cover everything from planning your website, designing, to seo and marketing. What is a. How to create the file? Create a. Enter all custom rules and commands. File Save As, choose "All Types" as save type. File name:. Main Directory Option Settings Default setting that are commonly used. Order Allow, Deny Deny from Select rating Give Create.
0コメント