3

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
Shi
  • 4,178
  • 1
  • 26
  • 31
martin
  • 83
  • 1
  • 6

1 Answers1

3

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.

SebiH
  • 669
  • 1
  • 8
  • 18
  • Hi, thanks for the quick response. I am using phpfarm to compile my php and i dont know how to compile without debug symbols. I add in options.sh --disable-debug but it did not work. how do I get php without debug symbols? – martin Apr 20 '15 at 13:01
  • 2
    @martin Looking through phpfarm's build scripts, you could try removing [line 116](https://github.com/cweiske/phpfarm/blob/master/src/compile.sh#L116): `--enable-debug` from the `compile.sh` script. I see no other references concerning the debug build of PHP. – SebiH Apr 20 '15 at 13:20
  • Great! is the solution. Thankss! – martin Apr 20 '15 at 14:45