Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
php Files Not Parsing (Trying to download instead of display) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • php Files Not Parsing (Trying to download instead of display)

    I just set up my account and am in the process of getting things figured out. I uploaded an index.php file to test the server, and it is trying to download the file rather than display it. An html file displays just fine. From my experience setting up servers this usually indicates an error with the httpd.conf file, but it seems to be setup correctly, i.e.

    Code:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    Any other suggestions?

  • #2
    So apparently I was trying to upload files to high up on the server, when I uploaded a php file under /var/www/vhosts/domain.name/httpdocs/ and clicked the preview site link it works ok. I apparently confused the public documents shown on Plesk for the web site files.

    Comment


    • #3
      Restart apache

      I installed php5 on ubuntu lucid lynx 10.04 by following the instructions at
      https://help.ubuntu.com/community/ApacheMySQLPHP
      I already had apache2 server running on my machine, so I installed only PHP5 and mySQL 5 using

      Code:
      sudo apt-get install php5-mysql libapache2-mod-php5 mysql-server
      (During the installation, the apache2 server I already had on my machine was stopped and re-started.)

      I faced the same issue with my php files - they were downloading, instead of being parsed by apache. Googled around and found your post.

      Then I followed the guidelines at https://help.ubuntu.com/community/ApacheMySQL under section titled 'Checking PHP 5 installation' and did all the testing recommended there.

      I tried this command suggested there:

      Code:
      sudo a2enmod php5
      and it said "Module php5 already enabled".

      Finally I tried re-starting apache2 with the following command:

      Code:
      sudo apache2ctl restart
      and PHP started parsing and working fine after that.

      So most likely your apache server needs a re-start too!

      Comment


      • #4
        Thanks for sharing the solution with us!
        Originally posted by arunr View Post
        I installed php5 on ubuntu lucid lynx 10.04 by following the instructions at
        https://help.ubuntu.com/community/ApacheMySQLPHP
        I already had apache2 server running on my machine, so I installed only PHP5 and mySQL 5 using

        Code:
        sudo apt-get install php5-mysql libapache2-mod-php5 mysql-server
        (During the installation, the apache2 server I already had on my machine was stopped and re-started.)

        I faced the same issue with my php files - they were downloading, instead of being parsed by apache. Googled around and found your post.

        Then I followed the guidelines at https://help.ubuntu.com/community/ApacheMySQL under section titled 'Checking PHP 5 installation' and did all the testing recommended there.

        I tried this command suggested there:

        Code:
        sudo a2enmod php5
        and it said "Module php5 already enabled".

        Finally I tried re-starting apache2 with the following command:

        Code:
        sudo apache2ctl restart
        and PHP started parsing and working fine after that.

        So most likely your apache server needs a re-start too!

        Comment

        Working...
        X