I dont know your system but you have to find where your php files are.
Do something like :
locate mysql.so |grep php
it should be a folder like : /usr/local/lib/php/20060613/mysql.so
copy in that directory (where mysql.so is) the ioncube_loader_xxx_yyy.so
you have to find the right loader though, for freebsd is _fre_5.2.so
look here :
http://www.ioncube.com/loaders.php
then find your php.ini and add at the bottom where [Zend] part is, to be like this :
[Zend]
zend_optimizer.optimization_level=15
zend_extension="/usr/local/lib/php/20060613/ioncube_loader_fre_5.2.so"
zend_extension_ts="/usr/local/lib/php/20060613/ioncube_loader_fre_5.2_ts.so"
zend_extension="/usr/local/lib/php/20060613/ZendExtensionManager.so"
zend_extension_ts="/usr/local/lib/php/20060613/ZendExtensionManager_TS.so"
this is from ioncube site :"Note that our Loader must be installed before Zend Optimizer in the php.ini file"