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.

Security Token / x3 Theme

Discussion in 'General Discussion' started by aoit, Jan 26, 2016.

  1. aoit

    aoit Registered

    Joined:
    Jun 4, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have a script that builds sites using a lot of automation. The issue that I have is that WHM recently updated to v 54, which removed x3 theme, and I think Security Token configuration. Is there a way to get x3 theme back? What changes to Security Tokens were made with v 54? Is there a way to revert back other than a full system restore?
     
  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
    The X3 theme is still available in version 54. Also, we made no changes to security tokens in version 54. Could you provide us with more information on the problem you are encountering?
     
  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
    Hello :)

    I suggest exploring the use of the Paper Lantern theme:

    It’s time to say goodbye to X3 | cPanel Blog

    As far as security tokens, there's no change to that functionality, but it's important to note the following from the release notes:

    Could you elaborate on the type of plugin or custom script you are using? Is it directly related to the theme?

    Thank you.
     
  4. aoit

    aoit Registered

    Joined:
    Jun 4, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Here is the snip of code that is failing. Domains have been replaced with domain1,2,3.... The error is ending up with status==1

    Code:
    We are checking to see if a subdomain exists before creating it, using the cPanel subdomain functions. Ideas on how to fix this?
    
    //NOTE: Check to see if the subdomain exists...
      $subdomain = $DOMAIN . $EXTENSION; //'.domain1.com';
    
      $path = null;
      if ($EXTENSION === '.domain1.com') {
      $path = "https://domain1:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      } else if ($EXTENSION === '.domain2.net') {
      $path = "https://domain2:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      } else if ($EXTENSION === '.domain3.com') {
      $path = "https://domain3:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      } else if ($EXTENSION === '.domain4.com') {
      $path = "https://domain4:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      } else if ($EXTENSION === '.domain5.com') {
      $path = "https://domain5:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      } else if ($EXTENSION === '.domain6.com') {
      $path = "https://domain6:$userPW@$configServer:2083/frontend/paper_lantern/subdomain/index.html";
      }
    
      $f = fopen($path, "r");
      $status = 0;
    
      if (!$f) {
      $status = 1;
      } else {
    
      //check if the account exists
      while (!feof($f)) {
      $line = fgets($f, 1024);
      //NOTE: Was -- if (ereg($subdomain, $line, $out)) {
      if (stristr($line, $subdomain)) {
      $status = 2;
      }
      }
    
      fclose($f); //close the file resource
      }
    
      if ($status == 1) {
      echo '<div class="error_message">We are sorry, there was an error. Please try again.</div>';
      exit();
      } else if ($status == 2) {
      echo '<div class="error_message">We are sorry, but that domain already exists.</div>';
      exit();
      } else {
    
    
     
    #4 aoit, Jan 29, 2016
    Last edited by a moderator: Jan 29, 2016
Loading...

Share This Page