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.

PHP not always processed?

Discussion in 'General Discussion' started by AtariAge, Nov 11, 2007.

  1. AtariAge

    AtariAge Registered

    Joined:
    Mar 14, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I am having a strange problem. Yesterday I moved my site from one dedicated cPanel server to another. I'm running newer versions of Apache (2.2 instead of 1.x) and (PHP 5.x instead of 4.x). Everything seems to be working fine except for one thing that is driving me nuts. For some users, when they go to the root of the website, they the raw PHP file instead of the properly parsed file. However, visiting "http://www.atariage.com/index.html" works fine.

    So, visiting this sometimes displays PHP for some of my users:

    http://www.atariage.com

    Visiting this does not:

    http://www.atariage.com/index.html

    Also, visiting the SSL version of the site without explicitly including the index works:

    https://www.atariage.com

    My php.conf looks as follows:

    Code:
    # LibPHP5 configuration
    LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php5 .html .php4 .php .php3 .php2 .phtml
    
    # End of autogenerated PHP configuration.
    In the httpd.conf, the DirectoryIndex variable looks as follows:

    Code:
    DirectoryIndex  index.html index.htm index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm
    In my error log, I have been seeing this error (and I know this is one of the people having problems):

    Code:
    [Sun Nov 11 13:47:47 2007] [error] [client 69.183.160.82] File does not exist: /home/atariage/public_html/'.$BASE_DOC.'
    [Sun Nov 11 13:47:47 2007] [error] [client 69.183.160.82] File does not exist: /home/atariage/public_html/'.$BASE_DOC.'
    [Sun Nov 11 13:47:47 2007] [error] [client 69.183.160.82] File does not exist: /home/atariage/public_html/<
    $BASE_DOC is a variable used by several of the PHP scripts generating the output for the index (and other pages throughout the site). I assume the above errors are not being generated by PHP since they are not prefixed with a PHP tag (like "PHP Warning").

    Any ideas?

    Thanks in advance..

    ..Al
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  3. tautauh_jr

    tautauh_jr Registered

    Joined:
    Jun 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    It's generally a browser issue.

    In fact i'm pretty sure that it's working with internet explorer whereas not working with firefox for instance.

    I have several sites doing same on my server, but when I installed it I also tested it on the former server and it was doing the same thing.
     
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    PHP not working on "some" browsers doesn't sound possible to me. If a request is made to apache to a php file - php should generate the code. It's server-side - not like Java which is based on which browser/OS/etc it's running on.

    If anything, for that to be possible apache would firstly have to decide if your running IE/FF and then "not" pass the file to PHP because of that. Sounds like a silly setup to me, and certainly isn't default. Must be something else to do with the extentions, and then only sometimes being passed to PHP.
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Try clearing your caches and cookies.

    As another poster said, PHP is server-side therefore it is highly unlikely that the browser you are using could cause any issues.

    Also, are you sure it isn't something like Javascript/JScript (something known to be very browser-dependent) that is contributing to the differences?
     
Loading...

Share This Page