Seite 1 von 1
Could not connect to the database
Verfasst: 11.08.2006 09:51
von iloveratte1
Ich suche einen Mod, oder eine Möglichkeit, das wenn das Forum sich gerade mal nicht mit der MySQL db verbinden kann, das nicht immer diese meldung erscheint:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) in /home/xx/public_html/forum/db/mysql4.php on line 48
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/xx/public_html/forum/db/mysql4.php on line 330
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/xx/public_html/forum/db/mysql4.php on line 331
phpBB : Kritischer Fehler
Could not connect to the database
sondern eine normale oder alternative PHP seite..
Danke.
Verfasst: 11.08.2006 11:01
von gloriosa
Hallo,
auch Du solltest schon die, viel zu selten benutzte, boardeigene Funktion
[ externes Bild ] Suchen kennen um Beiträge zu finden, welche die Lösung
>>> im unteren Abschnitt von >>> KB:131 <<<
beinhalten !

Verfasst: 11.08.2006 12:34
von iloveratte1
Hallo, danke für deinen Hinweis, jedoch habe ich zuvor schon gesucht, nur nichts opassendes gefunden.
gruss iloveratte1
Verfasst: 11.08.2006 21:07
von iloveratte1
So, hallo, also ich habe nun nochmals gesucht, allerdings nicht fündig geworden. ( aussr Probleme mit der DB, bei Neuinstallationen und Updates)
ich kann mir aber vorstellen, das ich mittels .htaccess das ereiche was ich eigentlich vorhabe oder?
gruss Iloveratte1
Verfasst: 14.08.2006 04:31
von iloveratte1
Hallo, ich bin es nochmals, ich habe diese funktion auch schon irgendwo mal gesehen. kann mir denn da niemand weiterhelfen? Für Andere Foren Betreiber wäre das ganze bestimmt auch interressant, oder nicht?
Iloveratte1
Verfasst: 14.08.2006 07:31
von biggfoot
hi,
"When your database is down: Instead of the familiar "Critical error, could not connect message", your users will get redirected to a custom error page. There they will have an option to send you an email, i.e. to notify you that something is wrong. It is easy to style the error page to suit your taste just mess about with the html code until your happy with the outcome."
http://belmaati.com/weblogs/oops_0.0.3.zip
funzt super

Verfasst: 14.08.2006 18:58
von iloveratte1
Besten Dank
ich habe allerdings die datei mysql4.php + mysql.php anstelle der DB.PHP, darin müsst Ihr einfach folgende stelle suchen
Code: Alles auswählen
function sql_error()
{
$result['message'] = mysql_error($this->db_connect_id);
$result['code'] = mysql_errno($this->db_connect_id);
return $result;
}
und durch diesen ersetzen:
Code: Alles auswählen
function sql_error()
{
// $result['message'] = mysql_error($this->db_connect_id);
// $result['code'] = mysql_errno($this->db_connect_id);
// return $result;
@include('./oops.php'); exit;
}
Gruss Iloveratte