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 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:
    92
    Likes Received:
    0
    Trophy Points:
    6
    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... :/
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    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:
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    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.
     
  4. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  5. blazenetworks

    blazenetworks Member

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

    Hi
    Are you trying to develop the theme for either Cpanel forum or WHM? so that we can help you.
     
    #5 blazenetworks, Jun 9, 2010
    Last edited: Jun 9, 2010
Loading...

Share This Page