The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wierd Problem: somepeople can't see my index page

Discussion in 'General Discussion' started by dc2447, Oct 18, 2004.

  1. dc2447

    dc2447 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    I have a wierd problem:

    On my site www.cpfc.org - I upgraded PHP last night as WHM was reporting that I was running an insecure apache config.

    I rebuilt apache/php without getting an error however when I went to www.cpfc.org I was prompted to see if I wanted to download the file of type PHP - this happened in both mozilla and firefox. My index page was php but ALL other php pages were displaying ok.

    After much investifgation I deleted my browser cache and made sure my web browser was requesting a fresh copy of every page and the problem went away for me however now I am getting loads of complaints of people getting prompted to download the index page.

    Really wierd.

    So to rule out PHP - I converted the index page to static HTML but the problem still occurs. I have also added to cache tags to the new html page but still people are reporting that they are prompted to download the homepage.

    Anyone got any ideas?
     
  2. nickn

    nickn Well-Known Member
    PartnerNOC

    Joined:
    Jun 15, 2003
    Messages:
    619
    Likes Received:
    1
    Trophy Points:
    18
    Works fine here.
     
  3. djandyr

    djandyr Member

    Joined:
    Oct 11, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem.

    As of yet i am unable to find a solution. The index.php will be downloaded as :

    application/x-httpd-php
     
  4. dc2447

    dc2447 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    disable mod_gzip, and add no cache headers to your index page
     
  5. djandyr

    djandyr Member

    Joined:
    Oct 11, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have disabled mod_gzip in httpd.conf and made sure there are no cache headers in my index.php.

    But the same error still occurs.
     
  6. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    Be sure that "index.php" (no quotes) is listed in your "/etc/httpd/conf/httpd.conf"

    Example: pico /etc/httpd/conf/httpd.conf

    Code:
    <IfModule mod_dir.c>
    DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp index.js index.jp index.php4 index.php3 [b]index.php[/b] index.phtml index.htm default.htm default.html home.htm
    </IfModule>
    
    ====================

    Is this problem found using both IE and Netscape/Mozilla browsers?
     
  7. djandyr

    djandyr Member

    Joined:
    Oct 11, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    It appears to only occur using Mozilla browser.

    The index.php is parsed fully by IE, but when loaded in Mozilla it prompts a download of the source of the index.php as application/x-httpd-php

    My mod_dir directive is correct but still this problem persists.

    Many thanks for your response
     
  8. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    IE is much more forgiving with code than Netscape and Mozilla (built on Netscape code).
    A missing </table> in your page is enough to cause this, and a missing </table>, or one </table> to many will result in what you are experiencing.

    However, I just accessed http://www.cpfc.org/ successfully using IE and Mozilla. I haven't got Netscape installed, so cannot check your pages using it. Maybe someone else can confirm using Netscape for you.

    Have you cleared your cache? Do you use Cable Modem... if so, you may have to request that your ISP flush their cache.
     
    #8 Host4u2, Oct 21, 2004
    Last edited: Oct 21, 2004
  9. djandyr

    djandyr Member

    Joined:
    Oct 11, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    It only happened since we done an update of cpanel to the latest STABLE release.

    It happens on all index.php even on a simple correct HTML build up. But strange thing is when the page is loaded in mozilla if the URL is :

    http://www.example.com/index.php

    the pages loads.

    But if the URL contains any variables for example :

    http://www.example.com/index.php?idx=index

    Mozilla will prompt to download the PHP file as source.
     
    #9 djandyr, Oct 21, 2004
    Last edited: Oct 21, 2004
  10. djandyr

    djandyr Member

    Joined:
    Oct 11, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
  11. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
  12. icanectc

    icanectc Well-Known Member

    Joined:
    Mar 10, 2003
    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    If your truly having this many problems with your php sites.

    I would run the buildapache from ssh and recomplie php into apache again.
    BTW - what version of PHP did you upgrade too?
     
  13. icanectc

    icanectc Well-Known Member

    Joined:
    Mar 10, 2003
    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    On a side note: it is recommended that you USE the no cache headers in your php files. Don't remove them, use them :)
     
Loading...

Share This Page