Your own database error page

Luisehahne

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



// 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!

hydronium

#7
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

Stefek

Interesting language, hydronium.
What language is this? Hungarian? No. Maybe Luthenian?

Your minimalistic design looks interesting.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

doc

#5
@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

hydronium


Stefek

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
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

doc


hydronium

I did an annoucement to website baker - site when the database is disconnected for some reason..

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