Results 1 to 7 of 7

Thread: ioncube encryption of tpl files

  1. #1
    Join Date
    Jul 2009
    Posts
    69

    Unhappy ioncube encryption of tpl files

    ioncube encryption of tpl files

    been at this for hours with no result.

    http://www.ioncube.com/sa_encoder.php?page=smarty_patch


    http://www.ioncube.com/resources/encrypted_smarty_patch.phps


    any feedback is much appreciated.

    thanks in advance.

  2. #2
    Join Date
    Jul 2009
    Posts
    69

    Default

    is it possible to encrypt .tpl files with ioncube in whmcs?

  3. #3
    Join Date
    Feb 2008
    Posts
    903

    Default

    why do you want to encrpt the ioncube files?

  4. #4
    Join Date
    Aug 2010
    Posts
    434

    Default

    While I haven't tested the template encryption with WHMCS specifically...

    Please note that the script calling ioncube_read_file(), e.g. the template engine, must be encoded.
    That means that the file "includes/smarty/Smarty.class.php" needs to be encoded as well. I'm guessing that you replaced the _read_file function, but haven't encoded the .PHP though?
    Last edited by GGWH-James; 04-23-11 at 04:50 AM.

  5. #5
    Join Date
    Jul 2009
    Posts
    69

    Default

    Hello mylove4life, GGWH-James,

    Thank you both for your replies.

    why do you want to encrypt the ioncube files?
    sorry if i was not clear on that mylove4life, when i write tpl file i am referring to the files located in the templates directory with the .tpl extension.

    GGWH-James,

    in smarty.class.php, i commented out line3429 to 3455 and added the patch code directly under that.

    encoded the file and uploaded it to the smarty directory.

    i get this error:

    Fatal error:
    The encoded file /home/mydir/public_html/includes/smarty/Smarty.class.php is corrupt. in Unknown on line 0

    thanks in advance for your time.

    best regards
    Andreas

  6. #6
    Join Date
    Aug 2010
    Posts
    434

    Default

    Quote Originally Posted by gr2 View Post
    in smarty.class.php, i commented out line3429 to 3455 and added the patch code directly under that.

    encoded the file and uploaded it to the smarty directory.

    i get this error:

    Fatal error:
    The encoded file /home/mydir/public_html/includes/smarty/Smarty.class.php is corrupt. in Unknown on line 0
    Did you encode the file in BINARY, but upload it in ASCII or AUTO mode? If you did encode it in BINARY, force BINARY mode in your FTP program while uploading the file.

  7. #7
    Join Date
    Jul 2009
    Posts
    69

    Default issue resolved

    issue resolved.

    Thank you all for your feedback.

    for some ridiculous reason i felt the need to put the contents of the tpl files inside {php}{/php} tags thinking it was needed and that was my mistake.

    yes, i had uploaded the smarty.class file in auto mode and that is why the file broke.

    so just to let you all know, .tpl WHMCS files can be encoded with ioncube.
    Last edited by gr2; 04-23-11 at 03:28 PM.

Similar Threads

  1. PHP in .tpl files
    By SRobinson in forum Customisation & Integration Questions
    Replies: 12
    Last Post: 08-07-12, 11:11 PM
  2. About php and tpl files
    By sanalreis in forum Customisation & Integration Questions
    Replies: 6
    Last Post: 07-06-10, 11:44 AM
  3. how to use tpl files?
    By chaddsuk in forum Customisation & Integration Questions
    Replies: 3
    Last Post: 05-13-08, 08:34 PM