Author Topic: Your own database error page  (Read 3350 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

doc

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

like your idea.

Doc

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
"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?

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 »

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
"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 »
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 »

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4459
  • 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
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

 

postern-length