ionCube PHP Encoder 7.0 User Guide ionCube Ltd. www.ioncube.com ionCube and the

ionCube PHP Encoder 7.0 User Guide ionCube Ltd. www.ioncube.com ionCube and the ionCube logo are registered trademarks of ionCube Ltd. Contacts and Links CONTACTS AND LINKS Contacting ionCube Please see our contact details at http://www.ioncube.com/contact.php FAQ Find answers to common questions in our FAQ at http://www.ioncube.com/faq.php Support For online support please visit http://support.ioncube.com Purchasing Products To purchase ionCube products please visit http://www.ioncube.com/purchase.php Latest Loaders To obtain the latest Loaders or the Loader Wizard please visit http://loaders.ioncube.com 20-Sep-11 ionCube Encoder 7.0 User Guide 2 Contents CONTENTS 1 INTRODUCTION ........................................................................................................................ 7 1.1 Encoder Outline .............................................................................................................................. 8 1.2 Using Encoded Files / the ionCube Loader.................................................................................. 9 1.3 User Guide Notation ....................................................................................................................... 9 1.3.1 Command Examples............................................................................................................ 9 1.3.2 PHP 4, PHP 5 and PHP 5.3+ Encoders .............................................................................. 9 1.3.3 Hints and Tips .................................................................................................................... 10 1.3.4 Unix Platforms.................................................................................................................... 10 2 GETTING STARTED................................................................................................................11 2.1 Running the Encoder.................................................................................................................... 11 2.2 Licensing the Encoder ................................................................................................................. 12 2.2.1 Licensing via the Command Line....................................................................................... 12 2.2.2 Licensing using the Windows GUI ..................................................................................... 12 2.2.3 Transferring a License or Reinstalling a Machine.............................................................. 13 2.3 Running the Encoder.................................................................................................................... 14 2.3.1 Command Line Format ...................................................................................................... 14 2.3.2 Passing Command Line Options ....................................................................................... 14 2.3.3 Filename, Directory and Wildcard Pattern Matching ......................................................... 14 2.3.4 Using Wildcard Characters on UNIX ................................................................................. 16 2.3.5 Source directory substitution using @ ............................................................................... 16 2.4 Quick-Start Encoding Examples ................................................................................................. 17 2.4.1 Encoding Single Files ........................................................................................................ 17 2.4.2 Encoding Directories.......................................................................................................... 17 2.4.3 Encoding Files with non-default File Extensions ............................................................... 18 2.4.4 Encoding PHP Shell Scripts............................................................................................... 18 2.4.5 Encrypting Templates and other Files ............................................................................... 18 2.4.6 Leaving Files non-encoded................................................................................................ 19 2.4.7 Omitting Files from the Encoding Target ........................................................................... 19 2.4.8 Adding Copyright and License Details to Encoded Files................................................... 19 3 ENCODER COMMAND LINE OPTIONS ................................................................................. 20 3.1 Specifying the Source and Target............................................................................................... 20 3.1.1 Source Items...................................................................................................................... 20 3.1.2 The Encoder Target [-o, --into].................................................................................... 20 3.2 Encoded File Format .................................................................................................................... 21 3.2.1 ASCII Format [--ascii] ................................................................................................... 21 3.2.2 Binary Format [--binary] ................................................................................................ 21 20-Sep-11 ionCube Encoder 7.0 User Guide 3 Contents 3.3 Encoding to an Existing Directory Target.................................................................................. 22 3.3.1 Replacing the Target [--replace-target].................................................................... 22 3.3.2 Merging into the Target [--merge-target] .................................................................... 22 3.3.3 Renaming the Target [--rename-target]...................................................................... 22 3.3.4 Updating the Target [--update-target]........................................................................ 22 3.4 Selecting Files to be Encoded, Encrypted, Copied or Ignored................................................ 23 3.4.1 Encoding Specific PHP Files [--encode]......................................................................... 23 3.4.2 Encrypting Files [--encrypt]........................................................................................... 23 3.4.3 Excluding Files from being Encoded or Encrypted [--copy]............................................ 24 3.4.4 Excluding Files from the Target [--ignore]..................................................................... 24 3.4.5 Including Ignored Files [--keep]....................................................................................... 24 3.4.6 Including only Encoded Files into the Target [--only-include-encoded-files]..... 24 3.5 Bytecode Obfuscation.................................................................................................................. 25 3.5.1 Obfuscating Compiled Bytecodes [--obfuscate]........................................................... 25 3.5.2 Specifying an Obfuscation Key [--obfuscation-key].................................................. 25 3.5.3 Specifying Obfuscation Exclusions [--obfuscation-exclusion-file].................... 25 3.6 File Based Server Restrictions (Pro and Cerberus Editions)................................................... 26 3.6.1 Expiring Files after a Period [--expire-in].................................................................... 26 3.6.2 Expiring Files from a Date [--expire-on]....................................................................... 26 3.6.3 Locking Files to Specific Domains and Servers [--allowed-server]........................... 26 3.7 License Based Server Restrictions (Pro and Cerberus Editions) ........................................... 29 3.7.1 Specifying a License File [--with-license].................................................................. 29 3.7.2 Specifying a Passphrase [--passphrase] ...................................................................... 29 3.7.3 License Check Mode [--license-check]...................................................................... 30 3.8 Target File Attributes.................................................................................................................... 31 3.8.1 Copying with Hard Links [--use-hard-links] .............................................................. 31 3.8.2 Using Default File Permissions [--without-keeping-file-perms] .......................... 31 3.8.3 Updating File Times [--without-keeping-file-times] ........................................... 31 3.8.4 File Ownership [--without-keeping-file-owner] ................................................... 31 3.8.5 Setting File Ownership [--apply-file-user, --apply-file-group] ................... 31 3.9 Language Options ........................................................................................................................ 32 3.9.1 Ignoring Short Open Tags [--no-short-open-tags] ................................................... 32 3.9.2 Ignoring Strict Language Warnings [--ignore-strict-warnings] ............................ 32 3.9.3 Ignoring Deprecated Feature Warnings [--ignore-deprecated-warnings]............. 32 3.9.4 Register Custom Auto Globals [--register-autoglobal].......................................... 32 3.10 Encoded File Header Customisation .......................................................................................... 33 3.10.1 Removing Run-Time Loader Support [--without-runtime-loader-support] ....... 33 3.10.2 Generating Files with no PHP Header [--without-loader-check]............................ 33 3.10.3 Customising the ‘no Loader installed’ Message [--message-if-no-loader].............. 33 3.10.4 Customising the ‘no Loader installed’ Action [--action-if-no-loader] .................... 33 3.10.5 Setting the Run-Time Loader Path [--loader-path]..................................................... 34 3.10.6 Setting the Header Code [--preamble-file]................................................................ 34 3.10.7 Header Comments [--add-comment, --add-comments]........................................... 34 20-Sep-11 ionCube Encoder 7.0 User Guide 4 Contents 3.11 Customising Loader Behaviour .................................................................................................. 35 3.11.1 Loader Event Messages [--loader-event]................................................................... 35 3.11.2 Callback Files [--callback-file] ................................................................................. 36 3.11.3 Loader Event Constants .................................................................................................... 37 3.12 Encoded Files and Untrusted/Open Source Extensions .......................................................... 38 3.12.1 Blocking Untrusted Extensions [--disallow-untrusted-extensions].................... 38 3.13 File Properties and Include Attack Prevention .......................................................................... 39 3.13.1 Setting Properties [--property, --properties] ....................................................... 39 3.13.2 Include Attack Prevention [--include-if-property].................................................. 40 3.13.3 Preventing Prepend and Append File Usage [--disable-auto-prepend-append] .. 40 3.14 Project Handling ........................................................................................................................... 41 3.14.1 Specifying the Project File [--project-file]................................................................ 41 3.14.2 Creating the Project File [--create-project]............................................................... 41 3.14.3 Update a Project File [--update-project].................................................................... 41 3.15 Miscellany...................................................................................................................................... 42 3.15.1 Encoding and Bytecode Optimisation [--optimise, --optimize]............................. 42 3.15.2 Allowing Encoding into the Source Tree [--allow-encoding-into-source]............ 42 3.15.3 Omitting Documentation Comments [--no-doc-comments].......................................... 43 3.15.4 Setting an alternate Shell Script Line [--shell-script-line].................................. 43 3.15.5 Enforce Minimum Loader Version [--min-loader-version]....................................... 43 3.15.6 Program Version [-V, --version]................................................................................. 43 3.15.7 Verbose Mode [-v, --verbose] .................................................................................... 43 3.15.8 File Verify [--verify]....................................................................................................... 43 3.15.9 Help [--help].................................................................................................................... 43 4 LICENSE FILE GENERATION (PRO AND CERBERUS EDITIONS) ..................................... 44 4.1 Introduction to License Files....................................................................................................... 44 4.2 Creating License Files.................................................................................................................. 46 4.2.1 Command Line Usage ....................................................................................................... 46 4.2.2 Using Passphrases to Differentiate Products [--passphrase] ....................................... 46 4.2.3 Setting License Restrictions [--allowed-server, --expose-server- restrictions] ............................................................................................................................. 46 4.2.4 Setting License Restrictions from Server Data [--use-server-file].......................... 46 4.2.5 Selecting Adapters [--select-server-adapter, --select-adapters]............... 46 4.2.6 License Expiry [--expire-in, --expire-on, --expose-expiry]........................ 47 4.2.7 License Properties [--property, --expose-property] ........................................... 47 4.2.8 License Property Checking [--enforce-property]...................................................... 47 4.2.9 Customising the Header Block [--header-line] ........................................................... 48 4.2.10 Viewing Server Data Files [--decode-server-file] ................................................... 48 4.2.11 Troubleshooting License Problems ................................................................................... 48 20-Sep-11 ionCube Encoder 7.0 User Guide 5 Contents 20-Sep-11 ionCube Encoder 7.0 User Guide 6 5 LOADER API............................................................................................................................ 49 5.1 File Information and Execution ................................................................................................... 49 5.1.1 Checking for an Encoded File [ioncube_file_is_encoded]...................................... 49 5.1.2 General Encoded File Information [ioncube_file_info]............................................ 49 5.1.3 Retrieving Properties Stored in an Encoded File [ioncube_file_properties]......... 49 5.1.4 Retrieving the Loader String Version [ioncube_loader_version]............................. 49 5.1.5 Retrieving the Loader Integer Version [ioncube_loader_iversion]......................... 49 5.2 License and Server Information.................................................................................................. 50 5.2.1 Retrieving Properties Stored in a License [ioncube_license_properties]............. 50 5.2.2 Retrieving the List of Permissioned Servers [ioncube_licensed_servers] ............. 50 5.2.3 Creating a Server Data Block [ioncube_server_data]............................................... 50 5.3 License Validation ........................................................................................................................ 51 5.3.1 Validating License Properties [ioncube_check_license_properties]................... 51 5.3.2 Validating Licensed Servers [ioncube_license_matches_server]......................... 51 5.3.3 Validating License Expiry [ioncube_license_has_expired].................................... 51 5.4 Encrypted File Support ................................................................................................................ 52 5.4.1 Reading Encrypted Files [ioncube_read_file]............................................................ 52 5.4.2 Writing Encrypted Files [ioncube_write_file]........................................................... 52 5.5 Error codes.................................................................................................................................... 53 6 ERROR REPORTING .............................................................................................................. 54 7 TROUBLESHOOTING ............................................................................................................. 55 7.1 Unable to Start the Encoder ........................................................................................................ 55 7.1.1 On UNIX (Linux, FreeBSD, OS X) ..................................................................................... 55 7.1.2 Using a 64 bit system......................................................................................................... 55 7.1.3 On Windows....................................................................................................................... 55 8 LOADER INSTALLATION ....................................................................................................... 56 8.1 Loader Naming.............................................................................................................................. 56 8.2 Installation in a php.ini File.......................................................................................................... 57 8.3 Run-time Installation .................................................................................................................... 57 Introduction 1 INTRODUCTION The ionCube PHP Encoder is a powerful, high performance solution for encoding and licensing PHP scripts, plus 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 http://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 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 code, and compiled code is changed and hidden from the Open Source PHP engine, giving excellent run-time performance due to parsing and compilation taking place at encoding time. Other Encoder features include the easy addition of plain text to the start of files, which is ideal for including custom copyright or license details, and this is protected against tampering. License File Creation License files can be created for your projects with the Pro and Cerberus Encoders that lock your projects to particular machines. License files can also have an optional time expiry, and can store arbitrary key/value data that can be read at runtime by the licensed application. ionCube Loader The ionCube Loader supports execution of encoded PHP files, encrypting or decrypting arbitrary files, validating licenses, and so on. This component can be easily installed into a php.ini file, or on some servers, automatically installed when required by the scripts themselves. The Loader is also compatible with other popular extensions, and a tool called the Loader Wizard is also provided to assist installation by end-users. Windows GUI For Windows uploads/S4/ user-guide - 2023-05-30T130640.668.pdf

  • 22
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager
  • Détails
  • Publié le Apv 02, 2021
  • Catégorie Law / Droit
  • Langue French
  • Taille du fichier 0.2694MB