Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Unfortunately the only PHP settings I have with my host (Plesk 8.1.1) is choosing the PHP version (4.4.3 or 5.2.0).
    phpinfo() says “Server API: CGI/FastCGI”.

    But, adding isapi to my google search terms bought up this gem:

    https://forums.crystaltech.com/index.php/topic,32891.0.html

    I’ve just hit this with ASP.NET/IIS hosting. A google search turns up this unresolved thread! So, I started tracing it down…

    Basically during install, wordpress queries the db. This errors (because no tables have yet been created).

    The function print_error($str = ”) is then called to log the legitimate error, which in turn calls error_log(). This is the point where IIS decides it will log the error by spewing out 502 Bad Gateway.

    I imagine PHP/IIS can be configured to be slightly less melodramatic, but I’m no PHP expert so I just commented out the call to error_log in wp-db.php print_error function as below:.

    function print_error($str = '') {
    
      global $EZSQL_ERROR;
      if (!$str) $str = mysql_error($this->dbh);
        $EZSQL_ERROR[] =
        array ('query' => $this->last_query, 'error_str' => $str);
    
        $error_str = "WordPress database error $str for query $this->last_query";
    
        // Comment out error_log to workround 502 Bad Gateway reporting
        // error_log($error_str, 0);

    Hope that helps. If anyone knows how to make error_log behave on vitual hosting of IIS/PHP5 I’d love to hear…

    — Rich

Viewing 2 replies - 1 through 2 (of 2 total)