-4

I am getting an error in a PHP script after changing the PHP version from 5.3 to 5.5. The code looks like this:

<?php //003c3

if(!extension_loaded('ionCube Loader')){
    $__oc=strtolower(substr(php_uname(),0,3));
    $__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');
    @dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__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);
?>
4+oV594EY3tjgN0odFKT7b+obVYffEG8RdNnCO7CoGLb4NV4MfbokDwgKPKvV7xT71apE7Q3bEN/
lOCV4A/BL+3uuRIgCoD/iTvsrlUhVWpGmj9c6Bs6RLuL0DuwMHHSGvbnPtcMOvTw8kpEHxQ5+tlw...

The error is:

Call to undefined function dl()

Is there a way to get this in real code?

Thanks!

Arnie
  • 661
  • 9
  • 20
  • 1
    error is???????????? –  Sep 07 '15 at 06:37
  • You should list your code in a more readable format... Like using carriage return. – Amarnasan Sep 07 '15 at 06:39
  • I updated my post and thats the code how it appears in my PHP file. – Arnie Sep 07 '15 at 06:39
  • error is obvous. http://nz2.php.net/manual/en/function.dl.php –  Sep 07 '15 at 06:41
  • You should probably contact ionCube for support as the script has been encrypted using their product. – jeroen Sep 07 '15 at 06:41
  • As Harshit says below, dl() is gone. It was always a potential security risk, though great for having support for encoded files be installed on the fly with no php.ini edits. dl() is only called by the PHP script if the ionCube Loader is not already installed, so install it via the php.ini file and that should resolve. – Nick Sep 09 '15 at 10:08

1 Answers1

1

dl() has been disabled by default since 5.3:

as refered on the php documentation: http://php.net/manual/en/function.dl.php

as suggested there, use the Extension Loading Directives instead: http://www.php.net/manual/en/ini.core.php#ini.extension

https://stackoverflow.com/a/16163935/4725592

Community
  • 1
  • 1
Harshit
  • 5,147
  • 9
  • 46
  • 93