ZendGuard Loader

Enable SSH/Shell Access
The easiest way to get this installed is via SSH/Shell, so first, you will need to make sure to change your user to a 'Shell Account' user:

https://panel.dreamhost.com/index.cgi?tree=users.users&

SSH

Enabling_Shell_Access

Upgrade from PHP 5.2 to PHP 5.3
There can be some inherent issues with changing from PHP 5.2 to PHP 5.3 since there are deprecated function calls which may require updating.

You'll usually get an error along the lines of 'function xxxxx_xx is deprecated' and there's more information about that here:

http://php.net/manual/en/migration53.deprecated.php

To change to PHP 5.3, go to the 'Manage Domains' section and click the 'Edit' button next to the domain name, under the 'Web Hosting' column.

https://panel.dreamhost.com/?tree=domain.manage

There will be a dropdown there that you can change to PHP 5.3 FastCGI.

PHP

At this point, the site will probably break because it requires Zend Optimizer and Zend Optimizer is not compatible with PHP 5.3.

Download and install Zend Guard Loader
We're basically following the steps in this tutorial, with some modifications:

http://forums.eukhost.com/f30/how-install-compile-zend-guard-loader-15744/#.UHtd1mKuNBk


 * Please note the difference: the link in the tutorial is for the 32-bit version and not 64-bit.

You need to run these two commands to download the proper 64-bit version of ZendGuard Loader and unzip it.

For PHP5.3 use this: wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

For PHP5.4 use this: wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz tar -zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz Instead of copying it to /usr/local/lib/php we need to put it in your user's home directory /home/username/.php/lib/

mkdir -p /home/username/.php/lib cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so /home/username/.php/lib/

Configure PHP.ini settings
Lastly, we'll need to modify the "PHP.ini" settings to use the new extension.

Create the folders /home/username/.php/5.3

mkdir -p /home/username/.php/5.3

Then inside the 5.3 folder create a new text file named 'phprc' with the following contents:

zend_optimizer.optimization_level=15 zend_extension=/home/username/.php/lib/ZendGuardLoader.so

To do this via Shell/SSH:

nano /home/username/.php/5.3/phprc

Copy those two lines above, then press Shift+Insert and it should paste that into the terminal.

Do a Ctrl+O, then Ctrl+X

Once that's done you'll need to restart PHP by running this command:

killall php53.cgi

PHP.ini

Verifying Setup
Once the ZendGuard Loader is properly installed, you should see it in your PHP info:

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