Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 07:17:08 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155523 Posts in 21712 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Your own database error page  (Read 845 times)
hydronium

Offline Offline

Posts: 3


« on: July 15, 2009, 08:46:50 PM »

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

Code:
<?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
« Reply #1 on: July 15, 2009, 09:01:45 PM »

Hi,

like your idea.

Doc
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #2 on: July 15, 2009, 09: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

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
hydronium

Offline Offline

Posts: 3


« Reply #3 on: July 15, 2009, 09:05:57 PM »

Should i make my website in english also at http://hydronium.ath.cx?
Logged
doc
Guest
« Reply #4 on: July 15, 2009, 09: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, 09:19:05 PM by doc » Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #5 on: July 15, 2009, 09:19:56 PM »

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

Your minimalistic design looks interesting.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
hydronium

Offline Offline

Posts: 3


« Reply #6 on: July 15, 2009, 09: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, 09:34:52 PM by hydronium » Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3146



WWW
« Reply #7 on: July 15, 2009, 11:34:30 PM »

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:

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

We are human beings - and nobody is perfect at all.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!