Welcome, Guest. Please Login or Register.
August 26, 2025, 11:16:40 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  DB check! « previous next »
Pages: [1] Reply Ignore Print
Author Topic: DB check!  (Read 392 times)
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
DB check!
« on: March 18, 2002, 06:04:45 PM »
Reply with quote

if you have problems with your database, first check if your settings are correct! you can do this with this little script:
<?php$DBName = "";$DBUser = "";$DBPass = "";$DBHost = "";$prefix = "";$testconnect = @mysql_connect ( $DBHost, $DBUser, $DBPass )or die ( "1.<font color=red> Can´t found any DB-Server on (<font color=blue>$DBHost</font> or DBPass/DBUser may be wrong!</font><br><br>" );print ( "1.<font color=green> DB-Server found and connected!</font><br><br>" );$testdb = @mysql_select_db ( $DBName )or die ( "2.<font color=red> Database not found! (is the DBName <font color=blue>$DBName</font> correct? (have you yet a database created with this name?</font><br><br>" );print ( "2.<font color=green> Database <font color=blue>$DBName</font> found and connected!</font><br><br>" );$testtabl = @mysql_query ("select * from {$prefix}members")or die ( "3.<font color=red> Prefix <font color=blue>$prefix</font> is wrong or no tables in DB created!</font><br><br>" );print ( "3.<font color=green> Prefix <font color=blue>$prefix</font> is correct and tables found!</font><br>" );mysql_close ( $testconnect );?>
« Last Edit: March 19, 2002, 01:50:26 PM by mediman » Logged

mainComm Dev Team
Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.

ICQ - 69234983clickopedia@hotmail.com WWW
Re:DB check!
« Reply #1 on: March 19, 2002, 12:48:12 AM »
Reply with quote

hehe - should help some of our users but yabb se already has thi sin the installr partially with the "couldn't connect to database, connection succeeded by the way" message thing ;)
but nice script :)
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:DB check!
« Reply #2 on: March 19, 2002, 09:43:01 AM »
Reply with quote

jip, you´re right, but many users (at least in the spanish support board) have problems with this kind of errors or think that install.php will create the database). so only for newbies in mysql is this script, of course not for you ;)!

i will change it a little bit, so the error messages are little bit more helpfull...

thx mediman
Logged

mainComm Dev Team
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:DB check!
« Reply #3 on: March 19, 2002, 01:22:44 PM »
Reply with quote

so i changed the script this way that now only my errors appear, and not the errors produced by php or mysql!

hope now the appearence is a little bit clearer!

mediman
Logged

mainComm Dev Team
Xplorador
Full Member
***
Posts: 110


Expandiendo Posibilidades!

ICQ - 38423957xplorador@hotmail.com WWW
Re:DB check!
« Reply #4 on: March 19, 2002, 06:35:15 PM »
Reply with quote

If, very good work!
Logged

Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.

ICQ - 69234983clickopedia@hotmail.com WWW
Re:DB check!
« Reply #5 on: March 20, 2002, 02:29:45 AM »
Reply with quote

see - now thats more useful :P ;)

goodjob :)
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  DB check! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.140 seconds with 20 queries.