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.

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:
    18
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page