WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Please add custom message, when mysql server isn't working or not evalible
  • Print
Pages: [1]   Go Down

Author Topic: Please add custom message, when mysql server isn't working or not evalible  (Read 6017 times)

Offline Eugine

  • Posts: 7
  • Gender: Male
  • Eugine
    • My page
Please add custom message, when mysql server isn't working or not evalible
« on: November 04, 2010, 04:29:52 PM »
Hi
Please add custom message incliude
WB-PATH\framework\class.database.php

Code: [Select]

// Connect to the database
function connect() {
$status = $this->db_handle = @mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
if(mysql_error()) {
$this->connected = false;
$this->error = mysql_error();
} else {
if(!mysql_select_db(DB_NAME)) {
$this->connected = false;
$this->error = mysql_error();
} else {
$this->connected = true;
}
}
return $this->connected;
}



, when mysql server isn't working or not evalible
Logged
- http://www.eugine.info

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Please add custom message, when mysql server isn't working or not evalible
« Reply #1 on: November 04, 2010, 11:45:06 PM »
Quote from: Eugine on November 04, 2010, 04:29:52 PM
Hi
Please add custom message incliude WB-PATH\framework\class.database.php
, when mysql server isn't working or not evalible

Could you explain a bit more what you mean?

What message and where should it be placed?
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Eugine

  • Posts: 7
  • Gender: Male
  • Eugine
    • My page
Re: Please add custom message, when mysql server isn't working or not evalible
« Reply #2 on: November 05, 2010, 04:57:34 AM »
Let's say the script works correctly, but it does happen to malfunction hosting and stuff.
The request was implemented to issue an error message connecting to the database.
Watch as done in Wordpress

Code: [Select]

$ This-> $ dbhname = @ mysql_connect ($ details ['db_host'], $ details ['db_user'], $ details ['db_password']);
if (! $ this-> $ dbhname) {
$ This-> bail (sprintf (/ * WP_I18N_DB_CONN_ERROR * / '
<h1> Failed to connect to the database </ h1>
<p> This means that either your username and password in a file <code> wp-config.php </ code> is incorrect or we can not contact the database server at <code>% s </ code>. Perhaps the server is unavailable. </ P>
<ul>
<li> you sure you have the correct username and password? </ li>
<li> Are you sure you entered the correct server name? </ li>
<li> Are you sure that the database server is running? </ li>
</ Ul>
<p> If you do not know what these terms mean - you may want to contact your hosting provider. If after this you need some help - you can always visit the <a href=\'http://ru.forums.wordpress.org/\'> forum support WordPress </ a>. </ P>
'/ * / WP_I18N_DB_CONN_ERROR * /, $ details [' db_host ']),' db_connect_fail ');
}
Logged
- http://www.eugine.info

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Please add custom message, when mysql server isn't working or not evalible
« Reply #3 on: November 05, 2010, 01:14:50 PM »
it's not necessary(and dangerous)  to show such a message to each visitor of a site.
This kind of message appears in setup/install only.
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Please add custom message, when mysql server isn't working or not evalible
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2