PhP Shield Loaders Howto

From Zoelife4U Wiki
Jump to: navigation, search

Synopsis

While Ioncube and to a lesser extent, Source Guardian are more popular, there are a few customers who will come along asking about PHP Shield. It's not incredibly difficult to achieve to get them working. First off, download the following two files and place them in the customer's $HOME/php directory.
Non-ZTS Zend Thread Safety:
phpshield.5.2.lin
ZTS Zend Thread Safety:
phpshield.5.2ts.lin

I should probably clue you in now, PHP Shield doesn't play nice with Zend Optimizer 3.3.3, so we'll need to disable that.. No biggy.

The Goods

Open php.ini, place the following lines below the ioncube loaders (Substituting the customers actual home directory instead of /home/username/):


zend_extension=/home/username/php/phpshield.5.2.lin
zend_extension_ts=/home/username/php/phpshield.5.2ts.lin

Next comment out the following three lines using the semi-colon (;):

;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_optimizer.version=3.3.3

So Lines 1119 through 1131 should look like (Substituting the customers actual home directory instead of /home/username/):

zend_extension=/home/username/ioncube/ioncube_loader_lin.so
zend_extension_ts=/home/username/ioncube/ioncube_loader_lin_ts.so
zend_extension=/home/username/php/phpshield.5.2.lin
zend_extension_ts=/home/username/php/phpshield.5.2ts.lin
 
[Zend]
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_optimizer.version=3.3.3
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so

Next, create a phpinfo.php in public_html/ and place:

<?php phpinfo();?>

You don't get a full block showing it loaded, just a small little mention of it in the Powered by Zend section (2nd tier):
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.34, Copyright (c) 2002-2009, by ionCube Ltd., and
with phpSHIELD v5.0.1, Copyright (c) 2000-2006, by phpSHIELD
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies

And, that's all she wrote. Note, there is no workaround to make PHPShield play nice with Zend 3.3.3, we'll just have to wait for the PHP Shield folks to update their garbage.

Personal tools
Online Users
Zoelife4U: