Author Topic: Here is the answer for setting up RoundCube Mail and MSSQL Server  (Read 38729 times)

Offline funklet

  • Newbie
  • *
  • Posts: 1
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #15 on: August 02, 2009, 01:55:33 PM »
Hi,

If there's anyone out there still trying to get this working... like me...

In addition to the following:

1) Do NOT install the Microsoft PHP SQL Driver SQLSrv, make sure there are no references to it anywhere!
2) Ensure you have the extension=php_mssql.dll in php.ini
3) Verify that mssql is working properly by using the phpinfo() function in a php file in your mail root
4) Ensure you put the setCharSet blank function in the right place.
5) You will need to add the html_signature field and change some of the fields to allow NULLs.

I think all of the above is detailed in this post somewhere, or only a google away...

If you have the problem with SERVER\SQLEXPRESS then use the Sql Server Configuration Manager to set an Alias for the server e.g. SERVER01

This will mean instead of:

mssql://user:pass@SERVER\\SQLEXPRESS/roundcube
(which I could not get to work)

You can use:

mssql://user:pass@SERVER01/roundcube
(which is now working)

..If only I could get the plugins working properly...
« Last Edit: August 02, 2009, 02:07:58 PM by funklet »

Offline Joel

  • Newbie
  • *
  • Posts: 1
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #16 on: August 08, 2009, 03:07:12 PM »
Quote from: JabbaTek;15099
For all of those who have been having issues with MSSQL and RoundCube, I give to you the answer.

I have RoundCube (with HMail) running in the following environment.  It works great and is fast.

Windows Server 2008 Standard
IIS 7
PHP 5.x.x
Beta version on RoundCube (latest version)
Miscrosft SQL Server 2005

First you will need to have installed MSSQL.  Most will be running MSDE 2000 or SQL Express 2005.  Both are the free versions from Microsoft.

Second, create a database such as RoundCube.  IF you have SQL Express 2005, then you will need to download (if you haven't already) SQL Management Studio Express.  

Third, open the mssql.initial file found in the \SQL folder where RoundCube Mail is installed.  Copy the contents of that file into a new query window in Management Studio.  Make sure you selected your new database before opening a new query window to set the contect to that database.  Execute the statements that you just copied in.

Fourth, you will need to edit the db.inc.php file in the Config folder.  Find the line that starts with $rcmail_config['db_dsnw'].  I will provide 2 examples of how to write the line.  The examples assume the following:

Machine name (of host) = MAILSERVER
Database name = RoundCube
Username = rcmail
Password = webmail

Example 1:
'mssql://rcmail:webmail@MAILSERVER/RoundCube'

Example 2 (assumes you have an instance of MSSQL called SQLEXPRESS):
'mssql://rcmail:webmail@MAILSERVER\\SQLEXPRESS/RoundCube'

if you installed SQL Express 2005, you will most likely have the instance.

Last but not least, there is a missing function in the \program\lib\MDB2\Driver\mssql.php file.  The function is SetCharSet.  If you do not add the missing function, you will receive an error message stating that the SetCharSet method is not implemented.  I have attached a copy of my mssql.php file for convenience, but here are the missing lines in that file.

    function setCharset($charset, $connection = null)
    {
       
      return true;

    }

Once this is all done, it should work just fine (at least the database portion).

If you have questions or run into trouble getting it to work please reply and I will be happy to try and help.
By any chance do you know how to set up the "outgoing server" on a Palm Pre so that I can reply to my company e-mail.  I have been able to get my mail pushed to the Palm, but I do not know the server that Round Cube uses so that I can reply directly to those e-mails.  Any help is greatly appreciated.

Joel

Jass

  • Guest
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #17 on: August 10, 2009, 08:08:21 AM »
Hey Guys,

I installed and configured RoundCube as you wrote and it's possible to open the login-page.
My problem now is that I cannot login with my email-adresses, set up in hmailserver. I tried the internal and the external adresses but I allways get a message that the login failed.
Any idea how to log in?

Ok, got it myself.
Autocreate was set to TRUE but the mssql.initial.sql script sets the table users to NULL for most of the fields. Changed this values and now it works.
« Last Edit: August 12, 2009, 08:52:14 AM by Jass »

Offline cmillens

  • Newbie
  • *
  • Posts: 4
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #18 on: October 11, 2009, 12:06:40 AM »
wel I've managed to get the login screen following these directions. What a PAIN PHP is on IIS 6.0

Some notes on what I've discovered.

DO NOT use the thread safe php implementation. It only makes you go bald. Appears to work but fast requests will shut down FastCGI in a heartbeat.

Now to my problem ...

The login page comes up and then, after entering credentials I get this noise:

The page cannot be displayed
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.
--------------------------------------------------------------------------------

Please try the following:

•Contact the Web site administrator if you believe this directory should allow execute access.
HTTP Error 403.1 - Forbidden: Execute access is denied.
Internet Information Services (IIS)

SAY WHAT? Why would the login page work but subsequent pages NOT work?

Anyone else seen this?

Installation details:
Windows Server 2003 Enterprise Build 3790
FastCGI 6.1.36.1
PHP 5.2.11
« Last Edit: October 11, 2009, 12:10:16 AM by cmillens »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #19 on: October 11, 2009, 05:11:22 AM »
Have you checked the folder privileges?

Offline paulinabalk

  • Newbie
  • *
  • Posts: 1
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #20 on: October 11, 2009, 08:14:28 AM »
Quote from: skaero;22038
Have you checked the folder privileges?


Whoa!

Am able to set up my RoundCube Mail and MSSQL Server  Reply to Thread.

Actually, folder privileges was the issue.

Thanks again.

Offline cmillens

  • Newbie
  • *
  • Posts: 4
Folder priv's
« Reply #21 on: October 11, 2009, 11:07:51 AM »
Yes I have. Both in IIS's snap-in and on the drive. NETWORK SERVICE has full control on the folder in the file system and the folder in the IIS snap-in is set to Scripts and Executables. :(

What I don't understand is why the login page comes up just fine but I get that nonsense as soon as I try to login!
« Last Edit: October 11, 2009, 11:10:39 AM by cmillens »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #22 on: October 11, 2009, 12:49:09 PM »
Is there anything in your error log?

Offline cmillens

  • Newbie
  • *
  • Posts: 4
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #23 on: October 11, 2009, 05:56:53 PM »
IIS Logs show the request for /index.php.
PHP Logs are empty
Windows Event Log shows nothing from IIS.
Roundcube logs are empty.

I'm completely STUMPED.

I can run phpBB on this server but not RoundCube :(

Offline cmillens

  • Newbie
  • *
  • Posts: 4
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #24 on: October 13, 2009, 11:14:37 PM »
Well, I was sure hoping that someone here could help. Looks like I'm going to have to find some other alternative.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #25 on: October 14, 2009, 05:53:40 AM »
I don't know IIS very well so I can't be to much help, but I was wondering if it could be a .htaccess problem. You could try removing it and see if it helps.

Offline MKNDK

  • Newbie
  • *
  • Posts: 3
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #26 on: November 05, 2011, 03:41:36 PM »
Last but not least, there is a missing function in the \program\lib\MDB2\Driver\mssql.php file. The function is SetCharSet. If you do not add the missing function, you will receive an error message stating that the SetCharSet method is not implemented. I have attached a copy of my mssql.php file for convenience, but here are the missing lines in that file.
 
function setCharset($charset, $connection = null)
 {

 return true;
 
}
 


could you please advice where i can find the mssql.php file as you mentioned that you have attached.

Thank you

Offline MKNDK

  • Newbie
  • *
  • Posts: 3
Here is the answer for setting up RoundCube Mail and MSSQL Server
« Reply #27 on: November 06, 2011, 02:03:28 AM »
i tried al the above still

Check DB config
 DSN (write):  NOT OK(MDB2 Error: not found)

Please help!