WebsiteBaker Community Forum

General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: hydronium on July 15, 2009, 09:46:50 PM

Title: Your own database error page
Post by: hydronium 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
Title: Re: Your own database error page
Post by: doc on July 15, 2009, 10:01:45 PM
Hi,

like your idea.

Doc
Title: Re: Your own database error page
Post by: Stefek 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
Title: Re: Your own database error page
Post by: hydronium on July 15, 2009, 10:05:57 PM
Should i make my website in english also at http://hydronium.ath.cx?
Title: Re: Your own database error page
Post by: doc 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
Title: Re: Your own database error page
Post by: 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
Title: Re: Your own database error page
Post by: hydronium 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
Title: Re: Your own database error page
Post by: Luisehahne 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