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 »
  • Your own database error page
  • Print
Pages: [1]   Go Down

Author Topic: Your own database error page  (Read 7083 times)

Offline hydronium

  • Posts: 3
Your own database error page
« on: July 15, 2009, 09:46:50 PM »
I did an annoucement to website baker - site when the database is disconnected for some reason..

Code: [Select]
<?php
/* Connecting to MySQL */
$link = mysql_connect("localhost", "yourdbuser", "pass") or die(include("/url/to/your/error.html"));?>


Insert the code to row 1 of your index.php in host root

If it's good i suggest it added to next version of WebsiteBaker CMS?

Greetings

Jonne

jonne@hydronium.ath.cx
Logged

doc

  • Guest
Re: Your own database error page
« Reply #1 on: July 15, 2009, 10:01:45 PM »
Hi,

like your idea.

Doc
Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: Your own database error page
« Reply #2 on: July 15, 2009, 10:05:01 PM »
I like the Idea too.
But maybe one can figure out how to use it without the need to manually write the database connection into the index.php?

Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline hydronium

  • Posts: 3
Re: Your own database error page
« Reply #3 on: July 15, 2009, 10:05:57 PM »
Should i make my website in english also at http://hydronium.ath.cx?
Logged

doc

  • Guest
Re: Your own database error page
« Reply #4 on: July 15, 2009, 10:15:50 PM »
@Stefek:
One could add the code line to the index.php file in the WB root folder after the check if the config.php file exists (around line 36). Then you can use the DB constants like DB_HOST, DB_PASSWORD (not tested).

Doc
« Last Edit: July 15, 2009, 10:19:05 PM by doc »
Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: Your own database error page
« Reply #5 on: July 15, 2009, 10:19:56 PM »
Interesting language, hydronium.
What language is this? Hungarian? No. Maybe Luthenian?

Your minimalistic design looks interesting.

Regards,
Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline hydronium

  • Posts: 3
Re: Your own database error page
« Reply #6 on: July 15, 2009, 10:25:19 PM »
Quote from: Stefek on July 15, 2009, 10:19:56 PM
Interesting language, hydronium.
What language is this? Hungarian? No. Maybe Luthenian?

Your minimalistic design looks interesting.

Regards,
Stefek

It's finnish! one of the hardest languages in world

i have also an group at facebook >> http://www.facebook.com/home.php#/group.php?gid=229250830192
« Last Edit: July 15, 2009, 10:34:52 PM by hydronium »
Logged

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: Your own database error page
« Reply #7 on: July 16, 2009, 12:34:30 AM »
I had this problem with chcounter, you have to test, is it always the same place, where the database is disconnected, then try this little script pls

Code: [Select]

// workaround to work WB correctly
require_once(WB_PATH. '/framework/class.database.php');
$database = new database();


Tell us, if now is ok or not

Dietmar
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Your own database error page
 

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