500 Internal server error with ajax call

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I am trying to check system Requirements using php. So i am calling requirements.php page using ajax with the following code.

$.ajax({
     type: 'POST',
     url: 'request/requirements.php',
     beforeSend: function() {
      $("#terms").remove();
      $(".terms").removeClass("active");
     },
     success: function(response) {
        $(".right-wrap").html(response);
        $(".req").addClass("active");
        $(".comte").append("");
     }
});

The requirements.php inside code is here.

= 5.3) {
        return ''.$version.'';
    } else {
        return ''.$version.'';
    }
}
function checkMySQLi() {
    if(function_exists('mysqli_connect')) {
      return 'Yes';
  } else {
      return 'No';
  }
}
function checkModRewrite() {
    if(strpos(shell_exec('/usr/local/apache/bin/apachectl -l'), 'mod_rewrite') !== false) {
        return 'Yes';
    } else {
        return 'No';
    }
}
function checkShortTag() {
    if(ini_get('short_open_tag')) {
        return 'Yes';
    } else {
        return 'No';
    }
}
function checkHtaccess() {
    if(file_exists('../../.htaccess')) {
        return 'Yes';
    } else {
        return 'No';
    }
}
function checkIsWritable() {
    if(is_writable('../../uploads')) {
        return 'Yes';
    } else {
        return 'No';
    }
}

function CheckEveryThinkOk(){
    clearstatcache(true,$_SERVER['DOCUMENT_ROOT'].'/.htaccess');
    clearstatcache(true,$_SERVER['DOCUMENT_ROOT'].'/uploads');
    $version = phpversion();
    if(($version >= 5.3) and (function_exists('mysqli_connect')) and (in_array('mod_rewrite', apache_get_modules())) and (ini_get('short_open_tag')) and (file_exists($_SERVER['DOCUMENT_ROOT'].'/.htaccess')) and (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads'))){
          return '';
       } else {
           return '
Some requirements seem to be missing for the installation. Please contact your hosting provider.
'; } } ?>

But i am getting 500 Internal server error . What is the problem in requirements.php code ? Anyone can tell me what i am doing wrong here ?

asked 32 secs ago

نویسنده : استخدام کار بازدید : 64 تاريخ : پنجشنبه 28 ارديبهشت 1396 ساعت: 19:17

فهرست وبلاگ