IIS内部服务器错误(FastCGI关闭)

时间:2018-09-25 08:10:41

标签: php iis

我向您解释我的问题。我已经在apache服务器(和php(7.0.23))上开发了一个appli,然后将其切换到Windows服务器。

在apache上,应用程序运行正常。但是在IIS上,执行此请求时出现错误500:

      $sql = "INSERT INTO gracethd.t_error_table (et_rg_avct_id, et_uid, et_date, et_error_pourc, et_err_sum_per_id, et_table_name) "; 

  foreach ($availbleTable as $key => $value) {
    $sql .= " SELECT  " . $rg_avct_id . "  as et_avct , '" . $rg_last_uid . "' as rg_last_uid , '". $rg_date . "'::timestamp as et_date, " . 
      " ROUND(COALESCE(NULLIF(B.nb_id_concerne,0)::numeric/ (SELECT COUNT(*) FROM ". $key ."),0)::numeric  *100, 2)  as et_error_pourc, "; 
    if( trim($key) !== 't_cond_chem' && trim($key) !== 't_cab_cond') {
    $sql .= " B.total_erreur as et_err_sum_per_id , '" . $key ."'::varchar  as et_table_name  FROM  " .
    " (SELECT count(DISTINCT " .  $arrayOfTable[$key][1] .")::numeric as nb_id_concerne, count(*) as total_erreur from gracethdcheckpub.". $arrayOfTable[$key][0] .
    ") AS B " .
    " UNION "; 
    } else {
    $sql .= 
    " (SELECT count(*) as total_erreur from gracethdcheckpub.". $arrayOfTable[$key][0] . ") as et_err_sum_per_id, '" . $key ."'::varchar  as et_table_name FROM  " .
    " (SELECT count(*) as nb_id_concerne FROM  (SELECT  DISTINCT  " .  $arrayOfTable[$key][1] . " FROM gracethdcheckpub." . $arrayOfTable[$key][0] . ") c ) AS B " .
    " UNION "; 
    }
  } 
  $sql = substr($sql, 0, strlen($sql) -6); 
  $sql .= ';';

  return $sql; 

有时我要在数据库中插入大量数据,因此我将php_ini中的最大内存大小更改为256M(7.0.21)。使用apache(相同的数据集)就可以了。 在IIS上,我收到FastCGI错误。

我已经检查了IIS日志和PHP日志,没有任何意义。当然,我已将错误日志设置为“开”。

我可能错过了一些东西。 谢谢你们。

0 个答案:

没有答案