Quantcast
Channel: DeveloperSide.NET » WAMP Developer Server
Viewing all articles
Browse latest Browse all 108

Enabling Zend Guard Loader for PHP 5.3, or Zend Optimizer for PHP 5.2

$
0
0

Some PHP scripts and apps require the Zend Guard Loader or Zend Optimizer to be able to run, as their code has been encoded either to obfuscate reverse-engineering or to be licensed.

Normally, to install and use Zend Guard Loader or Zend Optimizer (to decode obfuscated PHP code, or run licensed scripts) you would need to: locate and download the proper package, match it to your PHP version and build type, and configure php.ini to set up and load the extension. Otherwise, an error message similar to “Zend Optimizer not loaded or installed” will be shown, such as this one:

PHP extension “Zend Optimizer | Zend Guard Loader” is not loaded.

Please verify your server configuration. Make sure that extension “Zend Optimizer | Zend Guard Loader” is enabled.

Installing and enabling Zend Guard Loader and Zend Optimizer is made easy with WampDeveloper Pro, which includes the last good version of each Loader, their full configuration, and their matching PHP versions and types:

  1. Zend Guard Loader for PHP 5.3 FCGI.
  2. Zend Optimizer (Loader) for PHP 5.2 Regular.

Zend Guard Loader for PHP 5.3 FCGI

The last version of Zend Guard Loader is v3.3, and it was released for PHP 5.3 FCGI only (e.g., there is no “Thread Safe” build for regular PHP).

1. In WampDeveloper’s Components Tab, click the link to download the latest PHP 5.3 FCGI version, and extract the ZIP into folder:
C:\WamDeveloper\Versions\Php\

2. Open and edit (via notepad) PHP 5.3′s php.ini file:
C:\WampDeveloper\Config\Php\php-53.ini

Near the bottom, find section “[ZendGuardLoader]“, un-comment it as such:

[ZendGaurdLoader]
; ONLY PROVIDED UNDER PHP-FCGI
; MUST BE LOADED AFTER Ioncube, AND BEFORE XDebug
zend_extension="C:\WampDeveloper\Components\Php\ext\ZendLoader.dll"
zend_loader.enable=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=

Save file.

3. In WampDeveloper's Components Tab, select PHP's 5.3 Subscription Channel:

Channel:  Stable
Bits:     32
PHP Type: FCGI

Then check-mark to use the proper Apache, PHP (FCGI), and MySQL versions. And click: "Switch To Selected Versions".

4. After starting Apache, check the http://serverhost/phpinfo.php page:
with-zend-guard-loader-php-53-fcgi

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

zend-guard-loader-php-53-fcgi

Zend Guard Loader

Zend Guard Loader    enabled
License Path         no value
Obfuscation level    3

Zend Optimizer (Loader) for PHP 5.2

The last version of Zend Optimizer (Loader) is v3.3.3, and it was released for PHP 5.2 only (e.g., there is no "Not Thread Safe" extension for FCGI PHP).

1. In WampDeveloper's Components Tab, click the link to download the latest PHP 5.2 Regular version, and extract the ZIP into folder:
C:\WamDeveloper\Versions\Php\

2. Open and edit (via notepad) PHP 5.2's php.ini file:
C:\WampDeveloper\Config\Php\php-52.ini

Near the bottom, find section "[Zend Optimizer]", it should already be un-commented as such:

[Zend Optimizer]
; this will make Apache crash/unstable if used with APC
zend_extension_ts="C:\WampDeveloper\Components\Php\ext\ZendOptimizer.dll"
zend_optimizer.optimization_level=0
zend_optimizer.enable_loader=1

Save file (if you made any changes).

3. In WampDeveloper's Components Tab, select PHP 5.2's Subscription Channel:

Channel:  Legacy-PHP52
Bits:     32
PHP Type: Regular

Then check-mark to use the proper Apache, PHP (FCGI), and MySQL versions. And click: "Switch To Selected Versions".

4. After starting Apache, check the http://serverhost/phpinfo.php page:
with-zend-optimizer-loader-php-52

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

zend-optimizer-loader-php-52

Zend Optimizer

Optimization Pass 1     disabled
Optimization Pass 2     disabled
Optimization Pass 3     disabled
Optimization Pass 4     disabled
Optimization Pass 9     disabled
Zend Loader             enabled
License Path            no value
Obfuscation level       3

Zend Optimizer's "optimization" has been disabled, as we only want it's "decoding" (loader) part.


Viewing all articles
Browse latest Browse all 108

Trending Articles