Advertisement:

Author Topic: Osclass database server is not available. Need more help  (Read 7512 times)

shahjishakil

  • Newbie
  • *
  • Posts: 1
Osclass database server is not available. Need more help
« on: January 02, 2014, 04:31:09 pm »
Hi friends


i am new to web designing
today tried to install osclass for my classified website http://www.searchkashmir.com but its showing me error 

Osclass database server is not available. Need more help

changed my config.php but its showing again and again


[REMOVED config.php file because it has important data]
« Last Edit: January 04, 2014, 02:23:23 pm by _CONEJO »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Osclass database server is not available. Need more help
« Reply #1 on: January 03, 2014, 10:46:22 am »
@shahjishakil
Error Osclass database server is not available means that provided credentials are not correct. You can also test connection while installing osclass.
You can also contact your hosting company if credentials are correct.  ;)

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: Osclass database server is not available. Need more help
« Reply #2 on: January 31, 2014, 11:49:25 am »
Hi friends


i am new to web designing
today tried to install osclass for my classified website http://www.searchkashmir.com but its showing me error 

Osclass database server is not available. Need more help

changed my config.php but its showing again and again


[REMOVED config.php file because it has important data]
If you are using shared hosting, its happening because your db not support InnoDb better to ask them to change your database from InnoDb to MyIsam, hope you can figure it out
best regards

burningman

  • Newbie
  • *
  • Posts: 3
Re: Osclass database server is not available. Need more help
« Reply #3 on: February 02, 2014, 03:50:34 pm »
I have the same problem, and I'm an experienced IT developer.
I inserted a little code in /www/sportboerse.ch/de/alle/kleinanzeigen/oc-includes/osclass/classes/database/DBConnectionClass.php in the  statement on Line 271. It now contains this:

$message  = 'Osclass database server ' . $this->dbHost . ' is not available. <a href="http://forums.osclass.org/">Need more help?</a></p>';

I've inserted  ' . $this->dbHost . ' in this statement. It now shows the DB-Host Name which is unavailable.

From my hoster I got two host-names. An internal one which is sportboe.mysql.db.internal, and an external one whcih is sportboe.mysql.db.hostpoint.ch.

Both do NOT work.
I was able to install osclass without any problems on a local server.

Next I've checked function _connectToDb within the file mentioned above already. I've seen, that you are using mysqli to connect to the DB. I wonder why this call contains only three parameters instead of the four the mysqli manual shows.

Have not invested more time so far to find out what's really wrong.

So it would be really helpful, if anyone could tell us about the required correct form of the HOST name entry in the installation form.

Thanx for any help, it is highly appreciated :-)).



s51

  • Sr. Member
  • ****
  • Posts: 309
Re: Osclass database server is not available. Need more help
« Reply #4 on: February 02, 2014, 05:02:22 pm »
.
Hi burningman . . . welcome to OSClass

1.)
>>I was able to install osclass without any problems on a local server.
Okay - it,s very well, - because then you ..know.. and have ..seen.. it works;)
Thats also why it also should be clear to you, = that the problems you have, is related to:
* you type in wrong information
* your server have some improper setup
-

2.)
Now FIRST:
click, see and read, my attached file.: aregreenmarksokay.jpg
-
Then SECOND:
click and study:
http://forums.osclass.org/installation-update-help/what-do-i-do-wrong/msg84751/#msg84751
-
Then THIRD:
Make your self a new  ..clean..  server root install of latest OSClass.
BEFORE you attempt to integrate OSClass in your existing website OKAY.
- -


Regards.:/ s51
.

burningman

  • Newbie
  • *
  • Posts: 3
Re: Osclass database server is not available. Need more help
« Reply #5 on: February 02, 2014, 09:01:10 pm »
Hi, thanx, it works now.
To find out the real reason for the installation error msg I've made a little php script.
It could probably be of use to someone else. I've put it on the server (filename e.g. checkdb.php) and runned it in my broser. It showed me that the db is accessible, but the authorization of the user is wrong.
After correcting the password for my db-user all runned well.
 
To be honest I find the error msg during the installation somehow misleading. It would be nice to see the error-code created by mysqli during its failed try to connect to the db (just to say).

file checkdb.php:

<!DOCTYPE html>
<html>
<head>
<title>checkdb</title>
</head>
<body>
<?PHP
$host     = "mydomain.mysql.db.internal"
$user     = "mydomain_admin";
$password = "mypassword";
$link = mysql_connect($host, $user, $password);
if (!$link) {
    die('Verbindung schlug fehl: ' . mysql_error());
}
echo 'Connect succesful';
mysql_close($link);
?>
</body>
</html>

enjoy your installation and have fun!

Aficionado

  • Guest
Re: Osclass database server is not available. Need more help
« Reply #6 on: February 05, 2014, 06:15:31 am »
Guys,

Just find a PROPER Hosting company.

HONESTLY all those problems come from poorly configured servers and plans.


strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: Osclass database server is not available. Need more help
« Reply #7 on: February 05, 2014, 10:26:09 am »
You right @Aficionado :)

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: Osclass database server is not available. Need more help
« Reply #8 on: February 05, 2014, 11:23:14 pm »
Hi, thanx, it works now.
To find out the real reason for the installation error msg I've made a little php script.
It could probably be of use to someone else. I've put it on the server (filename e.g. checkdb.php) and runned it in my broser. It showed me that the db is accessible, but the authorization of the user is wrong.
After correcting the password for my db-user all runned well.
 
To be honest I find the error msg during the installation somehow misleading. It would be nice to see the error-code created by mysqli during its failed try to connect to the db (just to say).

file checkdb.php:

<!DOCTYPE html>
<html>
<head>
<title>checkdb</title>
</head>
<body>
<?PHP
$host     = "mydomain.mysql.db.internal"
$user     = "mydomain_admin";
$password = "mypassword";
$link = mysql_connect($host, $user, $password);
if (!$link) {
    die('Verbindung schlug fehl: ' . mysql_error());
}
echo 'Connect succesful';
mysql_close($link);
?>
</body>
</html>

enjoy your installation and have fun!
Tried your code and get
Quote
Parse error: syntax error, unexpected T_VARIABLE in /home/myusername/public_html/checkdb.php on line 9
line 9 is the password which is correct. I am using special characters like $@! along with numbers, uppercase and lowercase which is what I use for every password I use when uploading cms using mysql database.
Quote
HONESTLY all those problems come from poorly configured servers and plans.
This is not true as I am able to upload wordpress, joomla, drupal, modx, type03 and other cms with out any database problems.  I also have two other downloads of osclass on my server from last year that uploaded then with no problems.  I have tried deleting my database, creating a new one, deleting the osclass files and re-uploading them, adding my database info into config.php and everything I have tried doesn't work.  I don't even get to the install page.  All I ever get is the "Osclass database server is not available message".
I don't even seem to be able to find anything to provide a clue in my log files.  The only thing I haven't tried yet is to upload an older version before ver 3 which I will try next.
« Last Edit: February 05, 2014, 11:25:25 pm by nootkan »

Aficionado

  • Guest
Re: Osclass database server is not available. Need more help
« Reply #9 on: February 05, 2014, 11:28:07 pm »

Quote
HONESTLY all those problems come from poorly configured servers and plans.
This is not true as I am able to upload wordpress, joomla, drupal, modx, type03 and other cms with out any database problems.  I also have two other downloads of osclass on my server from last year that uploaded then with no problems.  I have tried deleting my database, creating a new one, deleting the osclass files and re-uploading them, adding my database info into config.php and everything I have tried doesn't work.  I don't even get to the install page.  All I ever get is the "Osclass database server is not available message".
I don't even seem to be able to find anything to provide a clue in my log files.  The only thing I haven't tried yet is to upload an older version before ver 3 which I will try next.

Well Osclass is working great and installed in 2 minutes IF a server is configured correctly.

Nothing wrong with Osclass, so it is the server configuration. Simple really.


nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: Osclass database server is not available. Need more help
« Reply #10 on: February 06, 2014, 01:56:55 am »
Aficionado, I stand corrected and my apologies.  It seems that the account was corrupted when it was created on my server using WHM.  Once I deleted the account and re-created it osclass installed in 2 minutes like you stated.  Sorry for doubting you.  I had just finished installing other cms on other accounts which is why I made the assumption (you know what they say about the word assume) that my server config was correct.  Back to my hole under the rock I go.   :-[