Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Default Execute PHP in branded index page (stats)

    I'm looking to execute PHP in the branding/index.html file - namely in the stats area. I've scoured the forums and have come across a couple of suggestions / references to how cPanel handles PHP execution within themes.

    http://forums.cpanel.net/f42/cp-incl...ile-96049.html
    http://forums.cpanel.net/f42/adding-...ipt-76243.html

    What I've tried ..

    I've renamed branding/index.html to the following:

    index.php
    index.phpcp
    index.cpphp

    I've tried to both include PHP directly in that template, and include an external file (using the test.phpcp / test.phpcp symlinks provided in the base of the template directory). Unfortunately it still isn't executing the PHP and only spitting out the source.

    Am I doing something wrong?

  2. #2
    Registered User
    Join Date
    Apr 2007
    Posts
    3

    Default

    Quote Originally Posted by CodyRo View Post
    I'm looking to execute PHP in the branding/index.html file - namely in the stats area. I've scoured the forums and have come across a couple of suggestions / references to how cPanel handles PHP execution within themes.

    http://forums.cpanel.net/f42/cp-incl...ile-96049.html
    http://forums.cpanel.net/f42/adding-...ipt-76243.html

    What I've tried ..

    I've renamed branding/index.html to the following:

    index.php
    index.phpcp
    index.cpphp

    I've tried to both include PHP directly in that template, and include an external file (using the test.phpcp / test.phpcp symlinks provided in the base of the template directory). Unfortunately it still isn't executing the PHP and only spitting out the source.

    Am I doing something wrong?
    It appears to be a caching issue, time to investigate that .

    **EDIT**

    I may have been mistaken - can someone help clarify with the information I've provided?
    Last edited by CodyRo; 06-04-2009 at 08:45 PM.

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by CodyRo View Post
    It appears to be a caching issue, time to investigate that .

    **EDIT**

    I may have been mistaken - can someone help clarify with the information I've provided?
    Are you sure you're looking at index.php/index.cpphp/index.phpcp and not index.html?

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    Default use php in cpanel index file

    please tell me
    how can i use php in index file
    and how do i change index.html to index.php,phpcp,cpphp

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by vinodwedhera View Post
    please tell me
    how can i use php in index file
    and how do i change index.html to index.php,phpcp,cpphp
    You can change index.html to index.php, index.phpcp or index.cpphp by renaming the file. Only once there is "php" in the file extension can PHP be used in the index file.

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by cPanelDavidG View Post
    You can change index.html to index.php, index.phpcp or index.cpphp by renaming the file. Only once there is "php" in the file extension can PHP be used in the index file.
    I saw your post in the other thread, I'll follow up on that other thread.

  7. #7
    Member
    Join Date
    Jan 2010
    Posts
    9

    Default

    What file is it exactly that i rename? will it be the index.html file that is in my "branding>x3" folder?

Similar Threads & Tags
Similar threads

  1. want to switch hom page from index.html to index.php
    By websoftbiz in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-12-2008, 08:14 PM
  2. Which page do you want to load first index.html or index.htm?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 22
    Last Post: 04-10-2008, 10:36 AM
  3. How to execute stats run for single user?
    By Metro2 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-09-2008, 05:54 PM
  4. index.php not picked up as default page
    By charlieperry in forum New User Questions
    Replies: 5
    Last Post: 12-15-2007, 01:42 PM
  5. Branded login page?
    By ffeingol in forum Themes and Branding
    Replies: 1
    Last Post: 07-24-2005, 08:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube