try it now

SourceGuardian 11.1 change log

Home / SourceGuardian 11.1 change log

SourceGuardian 11.1 launched! 

Version 11.1 introduces encoding for PHP 7.1, updated GUI and other new options. Although it look s like a minor update, in fact it's bigger than usual. We did serious work on refining GUI and adding some new and useful options to the command line version. As usual this update is partly based on comments and suggestions of our users. We were glad to receive comments and suggestions and want to thank you very much for sharing your ideas! We are looking forward to hearing about other suggestions for improving SourceGuardian. Here is a list of all the version 11.1 changes.
· Full support of PHP 7.1 encoding including all the latest language options: nullable types, void functions, class constants visibility, iterable, multi-catch and more.
Encoding for PHP 7.1 is fully supporting in version 11.1 of SourceGuardian. PHP 7.1 introduced new language features and updated bytecode format to support them. Files encoded with SourceGuardian 11.0, 10.x or older need to be re-encoded with SourceGuardian 11.1 in order to run protected files under PHP 7.1
· New loaders for PHP 7.1, updated loaders for older versions of PHP
We updated loaders and created new ones for PHP 7.1. Loaders for the following operating systems are
Windows 64-bit (VC9 PHP 5.3,5.4; VC11 PHP 5.5,5.6; VC14 PHP7.x) 
MacOSX (universal binaries, include i386, x86_64) 
Linux (i386, x86_64)
We update the following loaders on request. Please check our blog and the loaders page for new versions.
FreeBSD (i386, x86_64)
OpenBSD (i386, x86_64)
Linux ARM (armel)
Linux ARM (armhf) Raspberry Pi (including Pi version 3) and other boards
We are happy to work with our customers if they need bespoke loaders for other custom operating system. Please contact if you are interested.
We do not include loaders for all supported operating systems to the GUI package. Please visit out loaders page if you can't find the loader for your OS in the Copy Loaders dialog.
· We fixed some issues with string concatenation in PHP 5.6 and 7.0 and some other problems. If you experienced issues like that with your code, please re-encode with the latest version 11.1 of SourceGuardian and install the recent loader.

GUI updates

· We fully reworked the files and folders selection dialog which is used when you add files or folder to the project. This new dialog also uses predefined file filters which are based on your filter settings in File/Preferences.
· We fully reworked files and folders highlighting in the project tree. Folders - bold, virtual folders - green, files/folders changed or added since last encoding - blue.
· Newly added folders and files will be encoded at least once if the "encode only modified" option is selected in advanced settings.
· The option to encode only changed files (in Advanced Settings) always checks modification date for all the files in the project before encoding.
· The project is automatically checked for new and deleted files every time you open the project. This may be turned off/on in Preferences.
· We added samples for code sections in Advanced Options - code for loader not installed, custom PHP header and custom license text. Try the "Want sample" buttons after clicking "Edit" for the code you want to change.
· We added a new "Copy unencoded" filter section to Preferences. These filters are checked before any further processing but after the exclusion filters. So, files that match any of "copy unencoded" file masks will be copied to the target folder as-is without encoding. E.g. you may now easily encode *. php files but keep *.tpl.php unencoded without manually selecting encoding mode in the project tree.
· If you are locking to a license file, now it's possible to select the folder where the license will be created when you click "Generate License" on the "Lock" screen. Also SourceGuardian will remind you to generate a license file after encoding, this option may be turned off/on in Preferences.
· We added tooltips to the main project window, advanced settings and some features on the lock screen to help our new users.
· You may automatically release the current SourceGuardian license directly from the application. Please find the "Release License" 
button added to Help/Registration Information. You will be asked for confirmation. Releasing the license lets you reinstall the encoder to another machine or to the same machine after upgrading hardware or OS. If you are going to upgrade the machine or OS, please firstly release the license and then you may transparently re-install your copy of SourceGuardian when the upgrade is complete.
You get 3 free license resets with the initial purchase. If you purchase an additional license or a new copy for another OS, each license also gets 3 resets. If you need to release the license after using all the 3 free resets, please contact us in support.
· Note to Mac users. In this update we are launching the universal GUI also for Mac. It shares the code with Linux and Windows versions and it means it's easier to maintain and it sooner gets the new features and fixes. We will keep the native version of GUI for Mac for some time but it must be considered as discontinued. Both universal and native versions of GUI for Mac will be available for some time and some versions of SourceGuardian. We added support for PHP 7.1 for native GUI for Mac in this release.

Command line encoder updates

· We added automatic registration for command line tools. So, if you install the no-GUI package (Linux) or get an additional license for using command line tools on another machine, server etc e.g. to generate custom licenses there, you may use automatic registration on the first run. Run sourceguardian command line executable or licgen tool, read and agree with the terms, enter your SourceGuardian online user account email and password when asked in the terminal. If automatic registration can't be used for any reason, e.g. if there is no Internet access, register software as usual. Copy the hex code from the screen, paste it to the user profile, download the encode.lic license file and copy it to the binary folder where the executable is located.
· The command line tools now may be started with GUI license. It's not necessary to specify a path to the GUI encode.lic license file anymore using the -L option. The GUI license will be automatically found if you are starting the command line tools included to GUI installation. However, if you are installing the command line tools separately or to another machine, please register your copy as usual and install the encode.lic license file to the same binary folder where the tools are located or use automatic registration for new copies.
· The license may be released automatically from for the command line tools as well. Please read above as we added the same option to the GUI version. In order to release the license from the command line, use --license-release option with sourceguardian command line tool or licgen and follow the instructions displayed on your terminal.
· We added a new -c (--copy) filter option in additon to -f (--file), -t (--template) and -x (--exclude). The new -c (--copy) option may be used to specify the files that will be copied as-is without encoding to the target folder. This option makes sense only if you specify the target folder with -o (--output) option. If -c is used without -o, then it works as -x and skips the specified files. The new option may take * and ? wildcards or a @filelist.
E.g. you may now encode *.php files but keep *.tpl.php unencoded and copy the latter ones as-is: /path/to/sourceguardian -o /path/to/target -f "*.php" -c "*.tpl.php" /path/to/source
· We updated recursive directory search. Source paths containing wildcards in directory names now work, e.g. /path/to/dir??/*.php This also works in @filelist and you may use it with -f, -t, -c, -x. If the @filelist is specified, recursion is automatically turned on, but it's still possible to change the directory trimming level with -r{n} if necessary.
· {SG_EXPIRY_DATE} tag was added and may be used in the custom text within the generated license files. Use this tag to embed your custom license expiry date into the readable part of the license. Changing of this text in the license file does not make sense and is NOT opening a back door, if you use the expiry date in your custom licenses. The expiry date is stored encrypted as well as other options within the license file. The readable text is only for information and you may put a name of your product, name of your customer and now the expiry date. For further details please see Advanced Options in GUI or --text option for the command line licgen tool.
· Optional directory trimming level may be specified with -r{n} The default is 0 and means no trimmig, this matches the mode used in previous versions of SourceGuardian. If n is specified, the encoder will remove n folder names from the beginning of target file paths when encoding or copying the files to the target folder. This is similar to -p option of patch utility on Unix. You may find some samples useful.

Optional directory trimming

Optional directory trimming level may be specified with -r{n} The default is 0 and means no trimming, this matches the mode used in previous versions of SourceGuardian. If n is specified, the encoder will remove n folder names from the beginning of file paths when encoding or copying the files to the target folder. This is similar to -p option of patch utility on Unix.
E.g. if you have the following directory structure in /source
and encoding to the /target with the following command
sgencoder -o /target -r /source
encoding with default -r or -r0 mode will create the following structure in the /target folder, i.e. the encoder recreates the full source path in the target
Now you may use -r{n} if you don't need to recreate a full source path structure in the target
sgencoder -o /target -r1 /source
and get the following file structure in the target
Now if you wonder why the default -r or -r0 option may be useful, consider the following example
Encoding with the following command in default mode works well
sgencoder -o /target -r /project1 /project2
While encoding with trimming will create a mess of files from both projects which is obviously not what one would expect
sgencoder -o /target -r1 /project1 /project2
So, you may use -r{n} when necessary, but the default mode with n=0 is still useful, safe and always produce an expected result.

Support Area

If you have any questions, please fill out our support form. Also, keep an eye out for our new instructional videos which are coming soon.
View Support Area


UK Office
Office S14
Tanfield Lea Business Centre
County Durham
United Kingdom
USA Office
2880 Zanker Road
San Jose, California 95134
United States

"Thanks for your support guys. Everything works just as you said - now I can launch my first product!"
Sam Granger,
Try our free php source code demo
Account Login:

login Forgotten Password?
Connect with us
facebook linkedin twitter rss
© Copyright 2002 - 2019 SourceGuardian Limited
Privacy Policy l Terms & Conditions l Company Info l Contact us l Sitemap l PHP Weekly News