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!

PHP in Suspend Page

Discussion in 'cPanel Developers' started by AlexisMeroni, Apr 26, 2014.

  1. AlexisMeroni

    AlexisMeroni Active Member

    Joined:
    Feb 9, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello guys,
    I have a problem with the suspending page. I want add the suspension reason so i have created this:

    PHP:
    <?php 

    $TheDomain 
    $_SERVER['HTTP_HOST'];
    $reason = @file_get_contents("http://MyWebSite.me/suspension/raisonsuspension.php?domaine=".urlencode($TheDomain));
     
    ?>
     
     <h1> Reason of suspension: <?php echo $reason?> </h1>

    When I add this on the suspension page, we do not see the reason and the PHP code is like comentated:

    bb62d127b98ee5ea45cc163fa7a293bc.png

    What can i do ? I really want this.

    Regards
     
  2. KostonConsulting

    KostonConsulting Well-Known Member

    Joined:
    Jun 17, 2010
    Messages:
    255
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    San Francisco, CA
    cPanel Access Level:
    Root Administrator
    There's no indication that cPanel is executing this template as PHP. In fact, the documentation shows this which indicates they are using Perl's Template Toolkit:

    You should try using JavaScript to fetch the account suspension reason instead of PHP.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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