Announcement

Collapse
No announcement yet.

Is VPS having a Container or .htaccess problem?

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

  • Is VPS having a Container or .htaccess problem?

    After re-installing my PHP setting from a backup my web pages started downloading instead of showing in the browser. I found the following solution online:

    "Does your browser ask if you want to download the php file instead of displaying it? If Apache is not actually parsing the php after you restarted it, install libapache2-mod-php5. It is installed when you install the php5 package, but may have been removed inadvertently by packages which need to run a different version of php.

    If sudo a2enmod php5 returns "$ This module does not exist!", you should purge (not just remove) the libapache2-mod-php5 package and reinstall it."


    I did contact RSP Support about this and after telling me I shouldn't have restored the settings myself they gave me the following advice:

    "I can advise you to remove any installation that you installed and reboot the VPS container, so that any system files that might have been replaced during that process, may be re-generated."

    As I was about to reboot the VPS container I realized that all but one of the sites hosted on my VPS are working correctly. To me that means the the installation is working correctly, so I didn't do it. Later, another tech said:

    "The reason why your website is not opening correctly is because of this line in your .htaccess file:

    'AddType application/x-httpd-php .html'

    Unfortunately it is not possible to parse PHP in HTML files."


    That line was removed. The site stopped downloading the file, but it is still not parsing in the browser. Should that line be replaced with something else, or should I go ahead and reboot the VPS, or do something else? The site is at www. JokeyPokey .com. Any help would be appreciated.

    RSP support tried to help, but I would like to have a conversation about this in order to turn it into a learning experiance, and i don't think that some of the techs are in a teaching mode.

    Thanks...

    PS: If I "remove any installation that you installed and reboot the VPS container", would it have the sites that are working?


  • #2
    having a similar but not quite the same issue this week, I'm going with the second tech that said its the php line in htaccess. If all the other sites are working and have their own unique htaccess that pretty much nails it being the single htaccess file with that line. You need a better opinion than mine on THIS but I think if you simply #out your htaccess line you'll be fine. if not, then you know you will indeed need to replace it with "something".

    - all the best.

    Comment


    • #3
      iads, it depends on how the VPS is setup. If its a managed Hepsia based VPS then it is not a good idea to change any packages on the server. Hepsia is very fussy on what it works with!! Usually if Hepsia is installed you wont have access to the root console, basically to stop someone messing up the config.

      If the VPS is self managed and no Hepsia CP then you have to do all the setup yourself and the configuration does vary from dist to dist. For example, what works under Ubuntu, wont work under CentOS. Would it not be better to rename your files in this one site to be .php instead of .html ?? It seems a very illogical to force the parser to parse HTML files

      Comment


      • #4
        Thank you everyone. The problem is fixed. It was a combination of issues therefore i had to use all of the information given to me. Thank you.

        Comment

        Working...
        X