ionCube PHP Encoder 6.5 User Guide ionCube Ltd. www.ioncube.com Contacts and Li
ionCube PHP Encoder 6.5 User Guide ionCube Ltd. www.ioncube.com Contacts and Links CONTACTS AND LINKS Contacting ionCube Please see our contact details at www.ioncube.com/contact.php FAQ Find answers to common questions in our FAQ at www.ioncube.com/faq.php Support For online support please visit support.ioncube.com or our online forum at forum.ioncube.com Purchasing Products To purchase ionCube products please visit www.ioncube.com/purchase.php Errors, Omissions and Suggestions In common with all ionCube products, the utmost care and attention has been put into the preparation and checking of this User Guide. In the unlikely event that you discover any errors or omissions, or should you have suggestions for improvements, please contact our publications department at publications@ioncube.com who will be pleased to hear from you. 17-Aug-07 ionCube Encoder 6.5 User Guide 2 Contents CONTENTS 1 INTRODUCTION ........................................................................................................................ 7 1.1 Encoder Outline .............................................................................................................................. 8 1.2 User Guide Notation ....................................................................................................................... 9 1.2.1 Command Examples............................................................................................................ 9 1.2.2 PHP 4 and 5 Encoders ........................................................................................................ 9 1.2.3 Hints and Tips ...................................................................................................................... 9 2 GETTING STARTED................................................................................................................10 2.1 Licensing the Encoder ................................................................................................................. 10 2.1.1 Generating a License Request .......................................................................................... 10 2.1.2 Submitting your License Request ...................................................................................... 11 2.1.3 Specifying the License File ................................................................................................ 11 2.1.4 Transferring a License or Reinstalling a Machine.............................................................. 11 2.2 Running the Encoder.................................................................................................................... 12 2.2.1 Command Line Format ...................................................................................................... 12 2.2.2 Passing Command Line Options ....................................................................................... 12 2.2.3 Filename, Directory and Wildcard Pattern Matching ......................................................... 12 2.2.4 Using Wildcard Characters on UNIX ................................................................................. 14 2.3 Quick-Start Encoding Examples ................................................................................................. 15 2.3.1 Encoding Single Files ........................................................................................................ 15 2.3.2 Encoding Directories.......................................................................................................... 15 2.3.3 Encoding Files with non-default File Extensions ............................................................... 16 2.3.4 Encoding Shell Scripts....................................................................................................... 16 2.3.5 Encrypting Templates and other Files ............................................................................... 16 2.3.6 Leaving Files Unencoded .................................................................................................. 17 2.3.7 Omitting Files from the Encoding Target ........................................................................... 17 2.3.8 Adding Copyright and License Details to Encoded Files................................................... 17 3 ENCODER COMMAND LINE OPTIONS ................................................................................. 18 3.1 Specifying the Source and Target............................................................................................... 18 3.1.1 Source Items...................................................................................................................... 18 3.1.2 The Encoder Target [-o, --into].................................................................................... 18 3.2 Encoded File Format .................................................................................................................... 19 3.2.1 ASCII Format [--ascii] ................................................................................................... 19 3.2.2 Binary Format [--binary] ................................................................................................ 19 3.3 Encoding to an Existing Directory Target.................................................................................. 20 3.3.1 Replacing the Target [--replace-target].................................................................... 20 3.3.2 Merging into the Target [--merge-target] .................................................................... 20 3.3.3 Renaming the Target [--rename-target]...................................................................... 20 3.3.4 Updating the Target [--update-target]........................................................................ 20 17-Aug-07 ionCube Encoder 6.5 User Guide 3 Contents 3.4 Selecting Files to be Encoded, Encrypted, Copied or Ignored................................................ 21 3.4.1 Encoding Specific PHP Files [--encode]......................................................................... 21 3.4.2 Encrypting Files [--encrypt]........................................................................................... 21 3.4.3 Excluding Files from being Encoded or Encrypted [--copy]............................................ 22 3.4.4 Excluding Files from Target [--ignore]........................................................................... 22 3.4.5 Including Ignored Files [--keep]....................................................................................... 22 3.4.6 Including only Encoded Files into the Target [--only-include-encoded-files]..... 22 3.5 Bytecode Obfuscation.................................................................................................................. 23 3.5.1 Obfuscating Compiled Bytecodes [--obfuscate]........................................................... 23 3.5.2 Specifying an Obfuscation Key [--obfuscation-key].................................................. 23 3.5.3 Specifying Obfuscation Exclusions [--obfuscation-exclusion-file].................... 23 3.6 File Based Server Restrictions (Pro and Cerberus Editions)................................................... 24 3.6.1 Expiring Files after a Period [--expire-in].................................................................... 24 3.6.2 Expiring Files from a Date [--expire-on]....................................................................... 24 3.6.3 Locking Files to Specific Domains and Servers [--allowed-server]........................... 24 3.7 License Based Server Restrictions (Pro and Cerberus Editions) ........................................... 27 3.7.1 Specifying a License File [--with-license].................................................................. 27 3.7.2 Specifying a Passphrase [--passphrase] ...................................................................... 27 3.7.3 License Check Mode [--license-check]...................................................................... 27 3.8 Target File Attributes.................................................................................................................... 29 3.8.1 Copying with Hard Links [--use-hard-links] .............................................................. 29 3.8.2 Using Default File Permissions [--without-keeping-file-perms] .......................... 29 3.8.3 Updating File Times [--without-keeping-file-times] ........................................... 29 3.8.4 File Ownership [--without-keeping-file-owner] ................................................... 29 3.8.5 Setting File Ownership [--apply-file-user, --apply-file-group] ................... 29 3.9 Language Options ........................................................................................................................ 30 3.9.1 Ignoring Short Open Tags [--no-short-open-tags] ................................................... 30 3.9.2 Strict Language Usage [--strict-php] ......................................................................... 30 3.9.3 Register Custom Auto Globals [--register-autoglobal].......................................... 30 3.10 Encoded File Header Customisation .......................................................................................... 31 3.10.1 Removing Run-Time Loader Support [--without-runtime-loader-support] ....... 31 3.10.2 Generating Files with no PHP Header [--without-loader-check]............................ 31 3.10.3 Customising the ‘no Loader installed’ Message [--message-if-no-loader].............. 31 3.10.4 Customising the ‘no Loader installed’ Action [--action-if-no-loader] .................... 31 3.10.5 Setting the Run-Time Loader Path [--loader-path]..................................................... 32 3.10.6 Setting the Header Code [--preamble-file]................................................................ 32 3.10.7 Header Comments [--add-comment, --add-comments]........................................... 32 3.11 Customising Loader Behaviour .................................................................................................. 33 3.11.1 Loader Event Messages [--loader-event]................................................................... 33 3.11.2 Callback Files [--callback-file] ................................................................................. 34 3.11.3 Loader Event Constants .................................................................................................... 35 3.12 Encoded Files and Untrusted/Open Source Extensions .......................................................... 36 3.12.1 Blocking Untrusted Extensions [--disallow-untrusted-extensions].................... 36 17-Aug-07 ionCube Encoder 6.5 User Guide 4 Contents 3.13 File Properties and Include Attack Prevention .......................................................................... 37 3.13.1 Setting Properties [--property, --properties] ....................................................... 37 3.13.2 Include Attack Prevention [--include-if-property].................................................. 38 3.13.3 Preventing Prepend and Append File Usage [--disable-auto-prepend-append] .. 38 3.14 Project Handling ........................................................................................................................... 39 3.14.1 Specifying the Project File [--project-file]................................................................ 39 3.14.2 Creating the Project File [--create-project]............................................................... 39 3.14.3 Update a Project File [--update-project].................................................................... 39 3.15 Miscellany...................................................................................................................................... 40 3.15.1 Encoding and Bytecode Optimisation [--optimise, --optimize]............................. 40 3.15.2 Allowing Encoding into the Source Tree [--allow-encoding-into-source]............ 40 3.15.3 Documentation Comments [--no-doc-comments] ........................................................ 41 3.15.4 Enforce Minimum Loader Version [--min-loader-version]....................................... 41 3.15.5 Program Version [-V, --version]................................................................................. 41 3.15.6 Verbose Mode [-v, --verbose] .................................................................................... 41 3.15.7 File Verify [--verify]....................................................................................................... 41 3.15.8 Help [--help].................................................................................................................... 41 4 LICENSE FILE GENERATION (PRO AND CERBERUS EDITIONS) ..................................... 42 4.1 Introduction to License Files....................................................................................................... 42 4.2 Creating License Files.................................................................................................................. 43 4.2.1 Command Line Usage ....................................................................................................... 43 4.2.2 Using Passphrases to Differentiate Products [--passphrase] ....................................... 43 4.2.3 Setting License Restrictions Explicitly [--allowed-server].......................................... 43 4.2.4 Setting License Restrictions from Server Data [--use-server-file].......................... 43 4.2.5 Selecting Adapters [--select-server-adapter, --select-adapters]............... 43 4.2.6 License Expiry [--expire-in, --expire-on, --expose-expiry]........................ 44 4.2.7 License Properties [--property, --expose-property] ........................................... 44 4.2.8 License Property Checking [--enforce-property]...................................................... 44 4.2.9 Customising the Header Block [--header-line] ........................................................... 45 4.2.10 Viewing Server Data Files [--decode-server-file] ................................................... 45 4.2.11 Troubleshooting License Problems ................................................................................... 45 5 LOADER API............................................................................................................................ 46 5.1 File Information and Execution ................................................................................................... 46 5.1.1 Checking for an Encoded File [ioncube_file_is_encoded]...................................... 46 5.1.2 General Encoded File Information [ioncube_file_info]............................................ 46 5.1.3 Retrieving Properties Stored in an Encoded File [ioncube_file_properties]......... 46 5.1.4 Retrieving the Loader String Version [ioncube_loader_version]............................. 46 5.1.5 Retrieving the Loader Integer Version [ioncube_loader_iversion]......................... 46 5.2 License and Server Information.................................................................................................. 47 5.2.1 Retrieving Properties Stored in a License [ioncube_license_properties]............. 47 5.2.2 Retrieving the List of Permissioned Servers [ioncube_licensed_servers] ............. 47 5.2.3 Creating a Server Data Block [ioncube_server_data]............................................... 47 17-Aug-07 ionCube Encoder 6.5 User Guide 5 Contents 5.3 License Validation ........................................................................................................................ 48 5.3.1 Validating License Properties [ioncube_check_license_properties]................... 48 5.3.2 Validating Licensed Servers [ioncube_license_matches_server]......................... 48 5.3.3 Validating License Expiry [ioncube_license_has_expired].................................... 48 5.4 Encrypted File Support ................................................................................................................ 49 5.4.1 Reading Encrypted Files [ioncube_read_file]............................................................ 49 5.4.2 Writing Encrypted Files [ioncube_write_file]........................................................... 49 5.5 Error codes.................................................................................................................................... 50 6 ERROR REPORTING .............................................................................................................. 51 7 TROUBLESHOOTING ............................................................................................................. 52 7.1 Unable to Start the Encoder ........................................................................................................ 52 7.1.1 On UNIX............................................................................................................................. 52 7.1.2 On Windows....................................................................................................................... 52 17-Aug-07 ionCube Encoder 6.5 User Guide 6 Introduction 1 INTRODUCTION The ionCube PHP Encoder is a powerful, high performance solution for encoding and licensing PHP scripts and encrypting files of any type. Encoding and Encryption Total Solution The Encoder protects PHP /HTML scripts with obfuscated bytecode protection and a custom execution engine. In addition, any other project files can be automatically encrypted if required, which is ideal for protecting files such as templates or XML documents. This is complemented by Loader API functions for reading and writing encrypted files. For most existing template engines, a small change is all that would be required to add the ability to read encrypted templates, and for Smarty users, we have a ready made patch to enhance Smarty at www.ioncube.com/resources/encrypted_smarty_patch.phps Bytecode Compilation and Obfuscation The Encoder achieves script protection by first compiling and then optimising PHP scripts to highly efficient binary data. This compilation process replaces source with virtual-machine instructions and applies several layers of encoding and transformations to produce the final platform independent files. Optional function name and local variable binary obfuscation adds extra protection, with further internal obfuscations applied at compile and runtime. This approach has the advantage that files are never restored to PHP source, compiled code is changed and hidden from the Open Source PHP engine, and gives excellent run-time performance due to parsing and compilation taking place at encoding time. Other Encoder features allow for the easy addition of plain text to the start of files, which is ideal for including custom copyright or license details, and is protected against tampering. License File Creation Create license files for your projects with the Pro and Cerberus Encoders to lock your projects to particular machines with optional time expiry. Applications can also have custom behaviour based on license file properties if required. ionCube Loader The ionCube Loader supports execution of encoded PHP files, encrypting or decrypting general files, validating licenses, and so on. This component can be easily installed into the php.ini file, or on many servers, automatically installed when required by the scripts themselves. This is ideal for shared servers where users often do not have access to the php.ini file. The Loader is also compatible with other popular extensions, and tools are provided to assist installation. Windows GUI For Windows users, a powerful GUI, described online and in the package, makes setting up projects a breeze. As well as the expected encoding features, integration with Explorer adds usability features such as dynamic icons to distinguish between uploads/S4/ user-guide 59 .pdf
Documents similaires






-
25
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Apv 09, 2021
- Catégorie Law / Droit
- Langue French
- Taille du fichier 0.4589MB