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.

How to activate PHP?

Discussion in 'General Discussion' started by vince_v, May 9, 2013.

  1. vince_v

    vince_v Registered

    Joined:
    May 9, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    The question is, how can i make PHP work?.

    For some reason, php is not working at all. Not even a simple echo works.

    By example, if i put a html or php file. With this

    When i enter the page from browser, i only got a blank page. I tried using another PHP functions, but nothing.

    PHP is not working, just like that. How can be that possible?
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Try making it even simpler. Make a file with a .php extension that contains only this:

    Code:
    <?php
        echo "Hello world!";
    ?>
    In your example, you are trying to embed PHP in HTML, which is valid, but my example is straight PHP, no HTML, which should work by default. If it does not work, you need to ask your hosting provider for assistance. Your hosting provider will be able to check the Apache error_log, which you do not have access to as a site owner, and find the problem.
     
  3. vince_v

    vince_v Registered

    Joined:
    May 9, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I have already tried, was the same.

    The only thing i can think that should be, is there is a problem with the server. I guess i can't do anything on that side. So sholud be checking with the provider.
     
Loading...

Share This Page