Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP files not opening

Discussion in 'General Discussion' started by anj109, Feb 14, 2007.

  1. anj109

    anj109 Registered

    Joined:
    Feb 11, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Hey guys,

    When I try to view a .php file it pops up a box to save or view the file. PHP seems to be installed on my machine but how can I check and if not, install? I'm very new to VPS's and WHM.

    Thanks,
    Alex
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,561
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Sounds like the Apache configuration is messed up. Fixing it depends upon whether PHP is being used as a module or cgi binary.

    If a module, check for the proper AddType statement in /usr/local/apche/conf/httpd.conf, like this:

    Code:
       AddType application/x-httpd-php .php                                  
       AddType application/x-httpd-php .php4
       AddType application/x-httpd-php .php3
       AddType application/x-httpd-php-source .phps
       AddType application/x-httpd-php .phtml
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice