ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

_iL_exec Doesnt Exist

Author Message
77vetter



Joined: 17 May 2021
Posts: 1

PostPosted: Mon May 17, 2021 5:56 pm    Post subject: _iL_exec Doesnt Exist Reply with quote

I inherited a website that uses ionCube for decoding some of its code. We migrated the site to a new server and new php version 5.6 and now the site doesnt run.

I downloaded the ioncube_loader_lin_5.6.so and added it to the php.ini and verified it is loaded by running:
php -r "print_f(get_loaded_extensions());"

ionCube Loader is listed in the results

The issue is the code is really wanting to load the extension at runtime :
if (!extension_loaded ('ioCube Loader')
{
... tries to load the extension
@dl($__ln); --- this line is not valid in php 5.6
}
else
{
die('The file '.__FILE__." is corrupted. \n");
}

So it hits the ELSE statement and reports the error and quits
I tried commenting that code out but then it hits the following line:

if (function_exists('_il_exec'))
{
return il_exec();
}
echo ('site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader to be installed by the site administrator.');
exit(199);

so it seems even though the ionCube Loaded extension is loaded by the php.ini it doesnt have the il_exec funtion included and i cant get the site to run.

It seems it needs to load the assembly dynamic via the @dl command, but that command is not available in PHP 5.6 so not sure how to get around this issue since adding the 5.6 version in the php.ini file isnt what the code is expecting.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2812

PostPosted: Sat Aug 21, 2021 7:58 pm    Post subject: Reply with quote

The il_exec function harks back to the days of runtime install of the Loader, where thanks to the dl() function, the Loader could be installed on demand. PHP files plus the Loaders for a given platform could be uploaded by a user as usual, and without have to do anything else, files would just run. Pretty neat.

The alternative, which once dl() was removed became the only way, is to install the Loader as an engine extension via a php.ini edit, and in that case the header code of files is never processed, so dl() / il_exec() are irrelevant. This also explains logic in the header that produces an error if the Loader is installed; as PHP code at the top is never executed if the Loader is installed, if it *is* executing and the Loader is installed this implies that the file wasn't recognised as being an ionCube file, so therefore is corrupt in some way.
_________________
Community Admin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum