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.

Including PHP in 'stdheader'

Discussion in 'cPanel Developers' started by Qix, Nov 19, 2008.

  1. Qix

    Qix Member

    Joined:
    Sep 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I've been trying to get a custom reseller system built on top of CPanel running, but in order to do so, I need to include a bit of PHP code inside stdheader (which is obviously a problem). It would be possible to generate a stdheader per user - but that seems just as problematic.

    At the moment, by solution is in insane hack where I create a .phpcp file replacement for every file using 'stdheader', which first loads my custom stdheader, and then the normal file without the stdheader include. Along with a bunch of other hacks that makes sure CPanel still works.

    Is there any other way around it ?

    Also, one of my biggest problems was if I had to rename all the files as phpcp, the php engine picks up the <?cp tag as a php short_open. Any way to disable short_open for the theme?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Try modifying the short_open directive in /usr/local/cpanel/3rdparty/etc/php.ini
     
  3. Qix

    Qix Member

    Joined:
    Sep 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Short Open Tag

    I tried that and a whole lot of other services broke down, the problem is I think Fantasico uses the tags, along with some other CPanel services - don't remember exactly what
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    As long as you are using cPanel 12.23 or higher, the 3rdparty PHP applications that come with cPanel each have their own php.ini file. However, I cannot state the same about Fantastico.
     
Loading...

Share This Page