HOWTO: Encrypting PHP Scripts

Maybe you want to distribute a web-based program on CD but doesn't want everyone to dig around your sourcecodes. A solution for this problem is encrypting your scripts, so that they can't be read anymore. There are some programs called PHP encoders that do this. Three of them are known of working stable and fast with Server2Go.

* ioncube encoder (commercial): http://www.ioncube.com/
* Sourceguardian (commercial): http://sourceguardian.com/
* PHTML Encoder (Free or commercial): http://www.rssoftlab.com/phpenc.php

If you know other encoders that will work with Apache / Server2Go please leave me a message (Timo.Haberkern@fantastic-bits.de)

The following text describes the usage of ioncube encoder. It is pretty much the same for SourceGuardian or PHTML Encoder, so you should not have problems to install one of them.

1.) Install the loader menus

In the installation directory of the ioncube encoder exists a folder in that all available loaders are saved. The loaders depending on the PHP version you are using.

If you are not knowing which PHP version you are using, just copy the complete loaders directory to the php extension directory of server2go. You can find this under server/php/ext

Most of the times Server2Go is using the most current PHP-version. So in some cases you will need to update your loaders after an update of server2go. You can find the most current loader-versions on the ioncube homepage

2.) Configure the php.ini

This part is easy. Just open your php.ini from the server/config_tpl directory. There you have to add the following line:

zend_extension_ts = %CDPMS:SRVDIR%php\ext\loaders\ioncube_loader_win_5.2.dll

Thats it! After a restart of Server2Go you can now use scripts that are encrypted with the ioncube encoder.

phpencrypt.txt · Last modified: 2008/02/03 21:21 by habi
www.chimeric.de Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0