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 No Longer Working In Frontend Directory?

Discussion in 'General Discussion' started by Jeff75, Mar 17, 2004.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I've been using a custom skin written in PHP that I designed for the past 7 months without any problems. I upgraded to the latest STABLE yesterday and started having problems with something. My data center ran a script to try and fix it but in doing so it caused PHP to stop working all the sudden in my theme and the entire thing is broken.

    Can somebody tell me what I need to do to get PHP files to work in /usr/local/cpanel/base/frontend?

    Here's an example of a page that I try to load in the directory of my skin:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    
    <body>
    <?php echo "Hi"; ?>
    </body>
    </html>
    
    Here's what prints out instead of the page:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
    <BODY></BODY></HTML>
    Any .html file works without any problems.
     
  2. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I still haven't figured this out my control panel has been down for around 14 hours and now my clients are complaining that Horde and Squirrelmail are no longer working (which also happen to be PHP scripts).

    Does anybody have any idea why PHP does not work when running it under cPanel? I found out my data center deleted the /usr/local/cpanel directory and ran /scripts/updatenow and /scripts/upcp which was when this started happening.
     
  3. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    CPanel runs it own copy of PHP. It has nothing to do with the PHP you install when building apache.
     
  4. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I know that cPanel runs it's own PHP and it's under 3rdparty/lib/php but it just doesn't make any sense. It's not like cPanel doesn't recognize .php files because it doesn't print the code or prompt to dowlnad the file. Instead it just prints out some other code of a blank html page and nothing in the file I try to load.
     
  5. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Strange... did you try reinstalling cpanel yourself once more (using the same commands as stated in your post) ?

    Did you try downgrading to an earlier version?
     
  6. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    I had tried updating it again last night with another STABLE but it didn't help. I just updated it to a RELEASE version and IT FIXED THE PROBLEM! Thanks for the suggestion. This was the list time I will ever upgrade to another STABLE release. Everytime I do this I run into some kind of problem but when I upgrade to a RELEASE I never have any trouble.
     
Loading...

Share This Page