Install phpBB3 with MS SQL 2005 Express

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Install phpBB3 with MS SQL 2005 Express

Post by Martin Truckenbrodt »

Hello,
IIS5.1, PHP and MS SQL 2005 Express are running well. I've created a database and a database user with dbwoner rights for this database.

When I'm submitting the data for the SQL 2000+ database connection (without ODBC) when the page only is refreshed and the entered values are empty again.

Does the database user need more rights at the database?

What's the syntax for the database hostname?
HOSTNAME\SQLEXPRESS (HOSTNAME is the DNS hostname of the computer)?

Thanks a lot!

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Install phpBB3 with MS SQL 2005 Express

Post by Martin Truckenbrodt »

Hello,
I know, not a lot of people are using MS SQL for their phpBB instalation, but perhaps somebody can look at his config.php to tell me the syntax for the entries.

Thanks a lot!

Update:
Today I have changed nothing but now I'm getting following message:
Could not connect to the database, see error message below.
No error message given.
Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Re: Install phpBB3 with MS SQL 2005 Express

Post by Acyd Burn »

If you use MSSQL (not ODBC) the syntax is the following:

Code: Select all

	$dbms = 'mssql';
	$dbhost = 'HOSTNAME\\SQLEXPRESS';
	$dbport = '';
	$dbname = 'your_db_name';
	$dbuser = '';
	$dbpasswd = '';
This is for the windows user authentication... the db host is the host you connect to using your mssql tools too. ;)

If you use ODBC you only need to enter the System DSN... that's enough, since you configure the DSN to hold all informations.
ms308680
Registered User
Posts: 11
Joined: Thu Aug 07, 2008 3:17 pm

Re: Install phpBB3 with MS SQL 2005 Express

Post by ms308680 »

Refering to the last post above, from experience with this as well, the instillation may not be giving them the option to use it without the ODBC (it didn't give me the option for a dirrect connect either.) and I think that might be this ones case.

From Personal experience, I would not choose to use MSSQL express again. I am still trying to move my database from there. if you must I will explain it below but it is close to impossible it seems to get it changed to a MySQL database in the future. If you want a all in one solution for web server, PHP and MySQL that work good on windows that comes with phpmyadmin to administer your SQL databases. Then check out http://www.wampserver.com/

In the long run it will be much more less agervation if you take this route. I kind of wish someone told this to me back then.

so If you do not have anything else running on IIS (even if you do, you can move it to the built in Apache server in wamp.) and uninstall PHP. then install the program you download from the site above. (if you still need IIS you will have to change the port used to run off of, and access what you want there via that port, but just about anything you want should work fine with the apache server)


But if you still insist on using MSSQL Express 2005 then I will explain what you need to do below.

in the PHPBB setup it is seeing MSSQL +ODBC you will need to set up that link. here is what you need to do.

go to your control Panel (if you are running a server OS then you can go to administration tools on the start menu) and open "Data Sources (ODBC)" then click on the System DSN tab and then Click on ADD choose Naitive SQL Client (near the bottom)
in the name field, type anything here you want, but remember it
description doesn't matter
now for your server, even if it doesn't show in the drop down list you can type this in and it will work

You mentioned SQL Express so this is for express

127.0.0.1\sqlexpress

I do not know how you set up your SQL Express instillation but if you choose Mixed mode and set an SA password then on the next screen choose "with SQL authentication", if you did not make sure you are running this instillation under the user name you installed SQL Express on. and leave the setting the way it is


***
By the slim chance you can not see the page above after you type in the server name and click on next. If you get an error message stating that the server does not exist then pause for a second and I will Walk you through this now. If you are not having this problem then you can skip the "***" area.

on the start menu click on Programs, then Microsoft SQL Server (or whatever it is listed under), and find the client configuration utility in the other subfolder under it.


updated
finnish when I have a moment
Last edited by ms308680 on Sat Oct 11, 2008 5:23 am, edited 1 time in total.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Install phpBB3 with MS SQL 2005 Express

Post by Martin Truckenbrodt »

Acyd Burn wrote:If you use MSSQL (not ODBC) the syntax is the following:

Code: Select all

	$dbms = 'mssql';
	$dbhost = 'HOSTNAME\\SQLEXPRESS';
	$dbport = '';
	$dbname = 'your_db_name';
	$dbuser = '';
	$dbpasswd = '';
Hello Acyd Burn,
I never thought that I can use or that I have to use the windows authentication! :shock: 8-)

I tried it now like above. But it is not running. :cry: I have tried it with one backslash and with two backslashes in the dbhost like you've posted it above. And I've tried it with LOCALHOST, too.

At the moment it is only a developement eviroment, so I have installed MySQL. But on the production system I want to use MS SQL 2005 Express.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Re: Install phpBB3 with MS SQL 2005 Express

Post by Acyd Burn »

Works fine here - let me re-think, iirc i also had some problems to get it working and got the error message. Let me have a look at my settings... i use SQL Server 2008 with the SQL Server Management Studio. If you open the studio, you should see the server name used (use this name) and the authentication type (Windows authentication - for a different authentication you have to enter the correct username/password of course). Now connect to the server, if this succeeds the connection is working.

Now... head up to your php.ini and set mssql.secure_connection to Off. ;)

If it now still doesn't work you have an old mssql extension within your php installation - microsoft recently changed the API.

SQL Server 2005 driver for PHP

Attached is also a new ntwdblib.dll file version 2000.80.194.0 (it is no longer shipped with MSSQL 2005, but PHP still needs the updated file). Copy it to the relevant locations (wamp/php, apache2/bin, system32)

Hope this helps.
Attachments
ntwdblib.zip
(118.21 KiB) Downloaded 191 times
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Install phpBB3 with MS SQL 2005 Express

Post by Martin Truckenbrodt »

Hello Acyd Burn,
thank you very, very much!

I've done both tipps in one step and now it's working! :) 8-)
But I had to use SQL authentication. I don't know why windows authentication was not working. IMO still it's better to use SQL authentication.

Perhaps it's a good idea to write an phpBB WIKI article about this.

Thanks a lot!!!

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
ms308680
Registered User
Posts: 11
Joined: Thu Aug 07, 2008 3:17 pm

Re: Install phpBB3 with MS SQL 2005 Express

Post by ms308680 »

Martin Truckenbrodt wrote:Hello Acyd Burn,

Perhaps it's a good idea to write an phpBB WIKI article about this.

Thanks a lot!!!

Bye Martin

I might when if I get around to it, but I am having enough fun trying to get off of MSSQL, so if you ever wanted to transfer from MSSQL to MySQL it is proving to be more than interisting. (as a note, I have tried just about every MSSQL to MySQL conversion utility out there, those utilitys do not seem to want to connect to the express database whatsoever. even the MySql migration toolkit doesn't want to. My way around that was to install the trial version of MSSQL 2005 and use that engine and moved my master database there. that is the main thing that helped alot to get the migration kit to even connect to the MSSQL database.

I did not get any comments on my post above, so I do not know if it seems important enought to make such a walkthrough or not at the moment once I finnish. I like to share solutions, but I would like to see comments on stuff. (good or bad, I don't care) I feel that my post above was utterly ignored.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: Install phpBB3 with MS SQL 2005 Express

Post by Martin Truckenbrodt »

Hello,
I'm not a database professional, but I would say: Export your database into a sql or text file, use an comfortable text or html editor to replace or delete some parts MySQL doesn't understand and then import the file to your new database.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
Locked

Return to “[3.0.x] Support Forum”