Bueno en mi localhost tengo instalado PHP 5.4.7 y funciona bien el siguiente script, pero en mi Virtual Private Server con php 7.0.9 no funciona me dice Internal Server Error, a que se debe?
Código PHP:
Ver originalrequire_once './global.php';
class blog{
function mostrar(){
global $mybb,$db, $templates, $parser, $forum;
//Esto lo agarre del foro, para que me agarre los saltos de linea automaticamente.
$parser_options['allow_html'] = $forum['allowhtml'];
$parser_options['allow_mycode'] = $forum['allowmycode'];
$parser_options['allow_smilies'] = $forum['allowsmilies'];
$parser_options['allow_imgcode'] = $forum['allowimgcode'];
$parser_options['allow_videocode'] = $forum['allowvideocode'];
$parser_options['me_username'] = $post['username'];
$parser_options['filter_badwords'] = 1;
$sql="SELECT pid, tid, subject, message FROM mybb_posts WHERE fid = '14' ORDER BY pid ASC";
$resultado = $db->query($sql);
$g=1;
while ($res=$db->fetch_array($resultado)){
$query = $db->simple_select("attachments", "*", "pid=".$res['pid']);
$adjunto=$db->fetch_field($query, 'attachname');
$nombre_archivo=$mybb->settings['uploadspath']."/".$adjunto;
$texto=substr($res['message'],0,350); $texto=$parser->parse_message($texto, $parser_options);
$texto.="...";
eval('$blog_ciclo.= "'.$templates->get('EC_BLOG_CICLO').'";'); }
$cabecera=$this->cabecera();
eval('$html= "'.$templates->get('EC_BLOG_COMPLETO').'";');
return $html;
}
function cabecera(){
global $mybb, $templates;
$usuario=$mybb->user['username'];
if($mybb->user['uid']==0){
// $captcha=$this->mostrarcaptcha();
// eval('$registrofacil= "'.$templates->get('EC_registrofacil').'";');
eval('$manejousuario= "'.$templates->get('EC_sinlogear').'";'); }else{
$logout=md5($mybb->user['loginkey']); eval('$manejousuario= "'.$templates->get('EC_logeado').'";'); }
eval('$header = "'.$templates->get('header').'";'); return $header;
}
}
$blog=new blog;
$datos=$blog->mostrar();
//output_page($datos,1);
print($datos);