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

[solved] where to set relative path to loader dir?

Author Message
carsten888



Joined: 11 Mar 2008
Posts: 17
Location: Tilburg, Holland

PostPosted: Sat May 24, 2008 10:12 am    Post subject: [solved] where to set relative path to loader dir? Reply with quote

I just encrypted a bunch of files and found that the call-for-loader-script at the top of each file is exactly the same, even if the file is in a deeper directory. So each directory needs its own 'ioncube'-directory in which loaders can be put?

Code:
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));
$__ln='/ioncube/ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');
$__oid=$__id=realpath(ini_get('extension_dir'));
$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));
$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';
$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;
if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}
if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');
exit(199);


there must be a setting so as to set the directory-path to 'ioncube' so the program inserts the loader-script with paths relative to the 'root' so only one 'ioncube' loader directory is needed.

what am I overlooking here?

version 6.5
_________________
pages-and-items.com
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Sat May 24, 2008 5:07 pm    Post subject: Reply with quote

The preamble code searches for the Loader, starting in the same location as the first encoded file executed on a request, and then in parent directories. Look closely at the code and you'll see a loop in there. The usual thing is to put the Loader in the top directory of the encoded scripts, e.g. the root web folder.
_________________
Community Admin
Back to top
View user's profile Send private message
carsten888



Joined: 11 Mar 2008
Posts: 17
Location: Tilburg, Holland

PostPosted: Sun May 25, 2008 7:22 am    Post subject: Reply with quote

ok. sorted.

thanks
Smile
_________________
pages-and-items.com
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