如何调试这个PHP代码?

时间:2015-09-07 06:35:01

标签: php debugging

将PHP版本从5.3更改为5.5后,我在PHP脚本中收到错误。代码如下所示:

else if ( ! Hash::check('password', $getPassword->password)) 

错误是:

<?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...

有没有办法在实际代码中获得这个?

谢谢!

1 个答案:

答案 0 :(得分:1)

默认情况下,

dl()已被禁用,因为5.3:

引用了php文档:http://php.net/manual/en/function.dl.php

正如那里建议的那样,使用扩展加载指令代替:http://www.php.net/manual/en/ini.core.php#ini.extension

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