Search code examples
phpioncubephpfarm

Build PHP with PHPfarm errors with loaders (ioncube and source guardian)


I can't configure ioncube or source guardian loaders with phpfarm. I thinks that is for "(DEBUG)" in php -v but I do not know how to. I need help with this issue.

My php -v:

root@martin:/opt/phpfarm/src# /opt/phpfarm/inst/php-5.3.22/bin/php -v

Cannot load the ionCube PHP Loader - it was built with configuration API220090626,NTS, whereas running engine is **API220090626,NTS,debug**
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module

Module compiled with build ID=API20090626,NTS
PHP    compiled with build **ID=API20090626,NTS,debug**
These options need to match
 in Unknown on line 0

Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with build ID=API20090626,NTS
PHP    compiled with build ID=API20090626,NTS,debug
These options need to match
 in Unknown on line 0

PHP 5.3.22 (cli) (built: Apr 19 2015 17:43:14) **(DEBUG)**

Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

Solution

  • Although I can only answer for the ionCube Loaders, I presume the same applies to the Source Guardian Loaders.

    PHP extensions need to match the exact same version, including release/debug status, thread-safety and PHP version. You are therefore right in that the ionCube Loaders will not work on PHP compiled with debug symbols. ionCube does not provide Loaders for this scenario, so your only solution is to build PHP as release version.

    Do note that building PHP with debug symbols will most likely not help you debug your PHP scripts, if that is your goal.