Announcement

Collapse
No announcement yet.

Apache is downloading php files instead of displaying them - after php update application/x-httpd-php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apache is downloading php files instead of displaying them - after php update application/x-httpd-php

    Hi, i just run few updates on my vps. And during the update php version also got update.

    Soon after the update all my websites on the server, stopped opening and start downloading .php files.

    I have virtualmin with debain 9 installed on my vps. Can some one help?

  • #2
    Originally posted by RhetoricalJudo View Post
    Hi, i just run few updates on my vps. And during the update php version also got update.

    Soon after the update all my websites on the server, stopped opening and start downloading .php files.

    I have virtualmin with debain 9 installed on my vps. Can some one help?
    Depending on your installed php version, make sure the corresponding php module is loaded:

    Verify that the PHP module is loaded
    Code:
     $ a2query -m php5.6
    or
     $ a2query -m php7.2
    or
     $ a2query -m php7.3
    or
     $ a2query -m php7.0

    if not enabled with:

    Code:
     $ sudo su
    $ a2enmod php5.6  
    or
    $ a2enmod php7.0
    or
    $ a2enmod php7.2
    or
    ​​​​​​​$ a2enmod php7.3

    Restart Apache server

    Code:
     $ sudo systemctl restart apache2
    This is it.

    But If you are still getting the error in case of debian 9 try commenting the following variable in /etc/apache2/sites-available/domain_name.conf:

    Code:
     # php_admin_value engine Off

    Other thing you can make sure that following php module is installed:

    Code:
     sudo apt-get install libapache2-mod-php7.0
    Last edited by DaMysterious; 08-29-2019, 01:12 PM.

    Comment


    • #3
      thanks for helping me out, really appreciate....

      Comment

      Working...
      X