1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Web server return file to download for .PHP file

Discussion in 'Plesk for Linux - 8.x and Older' started by flupke, Aug 6, 2007.

  1. flupke

    flupke Guest

    0
     
    don't know after what upgrade this happens, this is new since 2 weeks:

    PHP file are not displayed anymore but returned to the browser as a file to download!


    There are many consequences like it is now impossible to access to the stats anymore, browser asks 'do you want to download xxxx.php'? With Firefox it is even worst: it enters an infinite loop and opens a new tab after each other

    Incredible this story, any advise welcome.

    NB: happens for all he domains
     
  2. jgalvez

    jgalvez Guest

    0
     
    The same happens to me after i upgraded to plesk 8.2
    If i fix i will tell you how.

    Jose
     
  3. rsumner

    rsumner Guest

    0
     
    config problem

    Verify the following in Apache's config:

    $ grep Type /etc/httpd/conf.d/php.conf
    AddType application/x-httpd-php .php

    If this is good, then you might also try a simple restart of the Apache server (httpd).
     
  4. flupke

    flupke Guest

    0
     
    doesnt help. In fact the webstat file is an .html file without any PHP script in it.

    all domains impacted! .html files in the httpdocs directory are ok.
     
  5. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    I observed the same thing and the solution was (or I think at least) to remove httpd.conf from /etc/httpd/conf/
    I saw there that now PLESK do near httpd.conf a file psa*_httpd.conf file and initially I though that is a copy and for some misconfiguration cannot delete it. Initially I deleted this file psa*_httpd.conf but all the times was there. Then on a new server with PLESK 8.2 I saw that is used only this one, psa*_httpd.conf and NO httpd.conf. So I deleted httpd.conf on the same server and now this PHP problems was solved.
    I think that load 2 times and this is why happening this error.
    So please try this (you can move to /root folder httpd.conf to have it as backup) and restart apache, then confirm if I have right or no.
     
  6. flupke

    flupke Guest

    0
     
    httpd.conf is needed, as I can see it is also the file that include the psa.conf file, sitebuilder.conf file .....
     
  7. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    I just installed several new servers with PLESK 8.2 and there is only zz010_psa_httpd.conf so I think on upgrades from 8.0 or 8.1 will remain there httpd.conf and is happening a collision.
     
  8. flupke

    flupke Guest

    0
     
    doesn't work with 8.1, obviously httpd fails to start.

    I also noticed another problem: when accessing a non-existing page on a domain, the browser also asks to download a file! The worst is that with firefox the browser enters in a loops and keep opening tabs.

    I've opened a ticket.
     
  9. jgalvez

    jgalvez Guest

    0
     
    Fixed i have added to httpd.conf

    LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps
     
  10. flupke

    flupke Guest

    0
     
    SWsoft fixed it, here what they did: the commented this line in both httpd.conf and php.conf

    #AddType application/x-httpd-php .html


    Now, I wonder why apache still processes php code in .html file, I restarted service httpd, the problem is correct (great) and I notice that .html files are still processed by apache, there is nothing in local http.include file tellin apache to do so.

    How can you explain this?
     
  11. freaky@

    freaky@ Regular Pleskian

    26
     
    Joined:
    May 2, 2006
    Messages:
    104
    Likes Received:
    0
    It could be in one of the tons of include files.

    You did reload apache right?
     
  12. jgalvez

    jgalvez Guest

    0
     
    Fixed i have added to httpd.conf

    LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps

    I restart the apache2

    Thanks a lot.How can i configure apache to use php5?

    Jose Galvez
     
Loading...