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!

How to run PHP within branding theme?

Discussion in 'cPanel Developers' started by dansgalaxy, May 19, 2010.

  1. dansgalaxy

    dansgalaxy Well-Known Member

    Joined:
    Jan 29, 2007
    Messages:
    91
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Reading, UK
    cPanel Access Level:
    Root Administrator
    Ok, I am trying to develop a custom theme however I can't seem to get the PHP to execute :(

    I have looked at previous threads and just changing the file name of index to .php doesnt seem to work... it seems to be ignored and go to the default or something instead... :/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please keep in mind available Search features to help locate related information, such as what is detailed in the following forum threads:

    Here are additional resources from our official documentation:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Friendly Moderator Note

    This thread has been moved to the Developer Discussions area as the inquiry appears to be about developing custom PHP code for use within cPanel.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi dansgalaxy,

    Are you making a WHM theme or a cPanel theme?

    I presume its cPanel:
    1) When you manually mv the file, you can't get it to serve the "new" page (once authenticated)?
    ex.
    Code:
    mv /usr/local/cpanel/base/frontend/x3/sql/index.html /usr/local/cpanel/base/frontend/x3/sql/index.php
    
    goto=> https://mytestbox.test:2083/frontend/x3/sql/index.php

    2) Remember that your php code must reside in the theme directory /usr/local/cpanel/base/frontend/$customTheme/ or it's descendants. You can symbolic link to a directory or file elsewhere in the system if necessary. If you do ln -s, just be absolutely sure that it doesn't introduce any security or maintenance issues.

    Hope that helps,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. blazenetworks

    blazenetworks Member

    Joined:
    May 21, 2009
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    51
    For Cpanel or WHM

    Hi
    Are you trying to develop the theme for either Cpanel forum or WHM? so that we can help you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #5 blazenetworks, Jun 9, 2010
    Last edited: Jun 9, 2010
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