Using MSSQL and Mantis 1.0.0a3

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
NicoleC
Posts: 2
Joined: 06 Jul 2005, 16:52

Using MSSQL and Mantis 1.0.0a3

Post by NicoleC »

I've inherited the task of getting a local Mantis install up, since our hosted solution has been horribly unreliable (not the FutureWare host, BTW). This poor server has been through numerous attempts at installing various version of MySQL, PHP and Mantis. Just when I though I had everything cleaned up and fresh copies installed...

The SQL Server database is created and Mantis installed. When I go to the /admin/check.php page. I get the error:
Checking your installation
Opening connection to database on host [localhost] with username [trackmyf]

However, my config_ini.php connection settings state:
$g_hostname = "Driver=SQL
# -- $g_db_username = "sa";
# -- $g_db_password = "xxxxx";
# -- $g_database_name = "mantis";
$g_db_type = "mssql";
(I have also tried using "odbc_mssql")

If I go to the home page, I get the error:
Fatal error: Call to undefined function mysql_connect() in C:\Mantis\core\adodb\drivers\adodb-mysql.inc.php on line 338

Are there references to the connection elsewhere that may have been missed that are maybe overriding the config settings? Or am I just missing something?

The server is a W2K3 Server with PHP v 5.0.4 and SQL Server 2000.
NicoleC
Posts: 2
Joined: 06 Jul 2005, 16:52

Post by NicoleC »

Found the issue -- IIS was looking at an old copy is config_inc.php that wasn't cleaned up. The connection is working great, now on to the import phase...
Ingrid

Post by Ingrid »

I'm just trying to get Mantis running with SQL Server 2000.
Can you tell me what you reference to when writing #222288>SQL? I got the same error as you've described, it just had been in another line of the script. I just couldn't figure out where the problem is.
Do you have any step by step guide how to get it implemented properly? I've inherited an installation where a couple of people have tried to get it running and I'd like to start from scratch.
In the actual version 1.0.0rc1 the sql folder is missing so there is even no script to get the database created. I'm glad for any useful tips.
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Ingrid, did you try doing the following steps:

1. Install Mantis 1.0.0rc1 into a new folder (assume the url is http://yoururl/mantis/).
2. Visit http://yoururl/mantis/ (the folder you just created, since it doesn't have a config_inc.php, you will be forwarded to installation).
3. Provide the installation with the details required to create a NEW database.
4. Copy the contents of config_inc.php from the installation webpage and use it to create a config_inc.php.
5. Now, go to http://yoururl/mantis/

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect/
Ingrid

Post by Ingrid »

Victor, I've tried as you've suggested on a new machine that never had Mantis installed.
I first installed PHP version 5.0.4, defined the PHP CGI web extension in IIS 6.0, copied Mantis into a folder under wwwroot, opened Internet Explorer 6.0 and started the index.php in the Mantis folder. The installation page showed up and I filled in all the required information. But whether I chose Microsoft SQL Server ODBC (experimental) or Microsoft SQL Server ADO (experimental), I always got the error "BAD database is not supported by PHP". And I always got the error at the end "BAD Does administrative user have access to the database?", no matter if I used the sa account of SQL server or created a new sql account with all necessary rights. When I tried opening the system utils page on the admin page, I got the error "Fatal error: Call to undefined function mysql_connect() in d:\inetpub\wwwroot\mantis\core\adodb\drivers\adodb-mysql.inc.php on line 338".
I'm using Windows Server 2003 SP1 and Microsoft SQL Server 2000 SP4. Any more ideas how to get it working? Do I have to define anything to be able to use either ODBC or ADO or to define PHP support in SQL? I couldn't find any information. Thanks.
Ingrid
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Ingrid, I would suggest you do the following:

- Apply the patch in the following URL:
http://cvs.sourceforge.net/viewcvs.py/m ... 14&r2=1.15

- Make sure that your PHP has the appropriate MS SQL extension enabled. Enable php_mssql.dll extension in php.ini.

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect
Ingrid

Post by Ingrid »

Victor, I made the changes as you've suggested and got a step forward. PHP now supports SQL.
But I still get the error
"BAD Does administrative user have access to the database?" What account do I have to insert there? I've tried the sa, used a new SQL user named mantis with all necessary rights, but no success. Do I need to use a Windows account or do I have to use a special syntax? Or does it use the logged on user to get the database created? I couldn't find anything in the manual.
It looks like where getting close to get it running soon. Thanks.

Ingrid
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

Does your MS SQL Server (or MSDE) support SQL authentication or only Windows authentication?

I would suggest that you create a UDL file with the same user name and password and test it to make sure you are supplying the right connection information.

Regards,
Victor
Checkout my blog
http://www.futureware.biz/
Ingrid

Post by Ingrid »

It does support SQl and Windows authentication. I'm the administrator of this test machine, so I'm free to change any settings. And be sure, the sa account does have every right that is possible within SQL Server.
I've done a couple more tries with changes in the install.php. It tells me:
SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect.
I haven't configured any ODBC data source, so what does the install routine searches for? I've seen in the install.php that it always tries an ADONewConnection. If I chose SQL Server ODBC, how does this install script know not to use ADO? Or how do I configure an ADO connection with SQL to be able to chose SQL Server ADO from the install menu?
So what else can I do? Any more configuration in php files? Thanks.

Ingrid
Post Reply