Changeset 546 for trunk/lib/DB.inc.php
- Timestamp:
- Aug 27, 2015 2:35:55 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r532 r546 227 227 { 228 228 if ($this->getParam('db_die_on_failure')) { 229 if (!defined('_CLI') ) {229 if (!defined('_CLI') && 'cli' !== php_sapi_name()) { 230 230 // For http requests, send a Service Unavailable header. 231 231 header(' ', true, 503); … … 312 312 // http://dev.mysql.com/doc/refman/5.0/en/gone-away.html 313 313 if (!mysql_ping($this->dbh)) { 314 $app->logMsg(sprintf('MySQL ping failed; reconnecting⊠("%s")', truncate(trim($debugqry), 150)), LOG_ NOTICE, __FILE__, __LINE__);314 $app->logMsg(sprintf('MySQL ping failed; reconnecting⊠("%s")', truncate(trim($debugqry), 150)), LOG_DEBUG, __FILE__, __LINE__); 315 315 $this->reconnect(); 316 316 } … … 323 323 $app->logMsg(sprintf('MySQL error %s: %s in query: %s', mysql_errno($this->dbh), mysql_error($this->dbh), $debugqry), LOG_EMERG, __FILE__, __LINE__); 324 324 if ($this->getParam('db_debug')) { 325 if (!defined('_CLI') ) {325 if (!defined('_CLI') && 'cli' !== php_sapi_name()) { 326 326 echo '<pre style="padding:2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>'; 327 327 }
Note: See TracChangeset
for help on using the changeset viewer.