No Database Connection?!?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Guest

No Database Connection?!?

Post by Guest »

I searched for equal topics...but no matches :( so hope you can help me!

I get this error with MS-SQL
Fatal error: Call to undefined function mssql_get_last_message() in C:\Programme\Apache Group\Apache2\htdocs\mantis\core\adodb\drivers\adodb-mssql.inc.php on line 470


And this with MySQL
Fatal error: Call to undefined function mysql_connect() in C:\Programme\Apache Group\Apache2\htdocs\mantis\core\adodb\drivers\adodb-mysql.inc.php on line 338



It must be a connection problem on verify the user...but i have given him Admin-privs...but no change.
The DB ist activ and the tables ar inserted!




This shows me the admin-check.
Version
Mantis requires at least PHP 4.0.6. If you are not running this version or above, you or your administrator will need to upgrade your build of PHP.

You are running PHP 5.0.4


Checking your installation
Opening connection to database [mantis] on host [localhost] with username [root]



Code: Select all

System: 400MHz Pentium, Windows 2k, Apache 2.0.54, MySQL 4.1. MSSQL 2000 newest Updates, PHP 5


# set these values to match your setup
$g_hostname      = "localhost";
$g_db_username   = "root";
$g_db_password   = "dbnikl";
$g_database_name = "mantis";
$g_db_type = 'mssql';
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

What version of Mantis are you using exactly?

The "Call to undefined function mysql_connect()" generally means that your version of PHP has not been built with MySQL support. You can confirm this through the use of a call to phpinfo().

Note that older versions of Mantis will have issues with PHP5, regardless of the database support...
Darkwinde

Post by Darkwinde »

The latest version: 1.0.0a2 .
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

OK. Can you use phpinfo() to determine whether or not your PHP installation has had database support built into it?

I daresay that it hasn't and that's why you are getting those errors...
Darkwinde

Post by Darkwinde »

THX for the good hint with phpinfo()!
First time I do not know what you meen by this, but after searching, I found, that I have to create a php file with this body:

Code: Select all

<?php 
phpinfo(); 
?> 
After calling phpinfo.php I found out, that no MySQL or MSSQL Extension have been installed.

This Link helps me very much to get the extensions started!
http://forums.winforums.org/showthread. ... ge=1&pp=10

Now Mantis runs perfect!
Guest

Post by Guest »

Now I have another Problem?!?

First: Which is the standard user for the first login?

Second: two times the login screen appears, but now, I got this messge, and I have nothing changed?!?


SYSTEM WARNING: mssql_connect() [function.mssql-connect]: Unable to connect to server: localhost

Mantis

Code: Select all

APPLICATION ERROR #400 
Verbindung zur Datenbank fehlgeschlagen. Reportmeldung lautet #0: 
 
Bitte benutzen Sie die "Zurück"-Taste Ihres Browsers, um auf die vorhergehende Seite zurückzukehren. Dort können Sie das hier angezeigte Problem korrigieren oder eine andere Aktion ausführen. Über das Menü können Sie auch direkt in eine neue Abteilung wechseln
Narcissus
Developer
Posts: 338
Joined: 17 Feb 2005, 09:45

Post by Narcissus »

So I'm assuming you're using MSSQL then?

1) The default username and password is meant to be 'administrator' and 'root'. However, I'm not sure if these are populated with the current MSSQL file. In fact, I don't even know how up to date that file is, to be honest.

2) The system warning error: no idea. Obviously PHP is having problems communicating with the server. I can only suggest maybe trying it with MySQL and see if you end up having the same problems. If you don't, then maybe we can assume it's just MSSQL. If you do continue to get problems, then it's a problem somewhere between PHP and the database server...

So: if at all possible, I would recommend installing MySQL and trying again...
Darkwinde
Posts: 6
Joined: 30 May 2005, 10:03

Post by Darkwinde »

ok thx, i`ll try to install mysql...but the last time, after restarting system, i never can restart the win-process :( so i switched to MSSQL.

After restarting yesterday, the connection to th DB was stable, so no problems anymore, but still can not login into Mantis :( cause the Username/Passwort you have shown me does not work :(



Why is MSSQL precluded from evolution, in the moment?
Guest

Post by Guest »

I found out what the problem is, this last line is commented out in the MSSQL Script:

--INSERT INTO mantis_user_table VALUES (1,'administrator','admin','63a9f0ea7bb98050796b649e85481845','2003-02-16 02:03:48','2003-02-16 02:36:38',1,1,90,3,CONCAT(MD5(RAND()),MD5(NOW())));


So MSSQL has no MD5 Support on standard. I'll look for a solution, because the String is also inkorrekt.
If I found a solution, I will explain it hear, so the developers can take it into the MSSQL-Script and help-file.
Post Reply