Results 1 to 7 of 7

Thread: FreeTDS: Could not connect to server

  1. #1
    ashamshi is offline Member
    Join Date
    Jul 2008
    Posts
    6

    Default FreeTDS: Could not connect to server

    Hi All!
    My question is addressed for those familiar with FreeTDS and its usage with SugarCRM (Windows XP).
    I've installed sugarcrm-5.0.0f with bundled SQL Server 2005 Express Edition, PHP 5.2, Apache 2.0.59 on a Windows XP box. I'm trying to configure FreeTDS driver as described in Sugar Community Edition Installation and Administration
    Guide. I've done this:
    1. Downloaded sugarcrm-MB-mssql.zip
    2. Unpacked msvcr71.dll and ntdwblib.dll to windows/system32, apache2/bin directories
    3. Copied freetds.conf to c:\ directory.
    4. Edited c:\freetds.conf so it looks like this:

    [global]
    tds version = 7.0
    initial block size = 512
    swap broken dates = no
    swap broken money = no

    [host_name]
    host = localhost,1433
    instance = BITROCKMSSQL
    port = 1433
    client_charset = UTF-8
    tds version = 7.0
    dump file = c:\FreeTDS.log
    debug flags = 0x4fff

    5. Unpacked freedts\Drivers\5.2.x\php_dblib.dll from sugarcrm-MB-mssql.zip to php\ext directory
    6. Launched php -f upgrade_mssql.php from command line, it worked ok (dropped and recreated tables)
    7. Edited php.ini so it looks like this (excerpt)

    ....
    ;extension=php_mssql.dll
    extension=php_dblib.dll
    ....
    ; Specify client character set.
    ; If empty or not set the client charset from freetds.comf is used
    ; This is only used when compiled with FreeTDS
    mssql.charset = "utf-8"
    ...
    8. Started Apache
    9. When I try to open http://127.0.0.1/sugarcrm/index.php, I get message "Could not connect to server MYHOSTNAME as sa."

    So, when I make this changes to php.ini:
    ....
    extension=php_mssql.dll
    ; extension=php_dblib.dll
    ....

    SugarCRM loads ok, but, I guess, FreeTDS doesn't work this time.

    Tried also to make changes to c:\freetds.conf:
    ...
    host = localhost
    ...
    but that didin't help.

    What have | done wrong?

  2. #2
    ashamshi is offline Member
    Join Date
    Jul 2008
    Posts
    6

    Default Re: FreeTDS: Could not connect to server

    I turned php error logging on, and what does it say about the error:

    "[09-Jul-2008 17:22:30] PHP Warning: mssql_connect() [<a href='function.mssql-connect'>function.mssql-connect</a>]: Unable to connect to server: MYHOSTNAME\BITROCKMSSQL in C:\sugarcrm-5.0.0f\htdocs\sugarcrm\include\database\MssqlManag er.php on line 137

    [09-Jul-2008 17:22:30] PHP Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in C:\sugarcrm-5.0.0f\htdocs\sugarcrm\include\database\MssqlManag er.php on line 102"

    Any ideas?

  3. #3
    ashamshi is offline Member
    Join Date
    Jul 2008
    Posts
    6

    Default Re: FreeTDS: Could not connect to server

    It seems like i resolved this problem.

    This lines in php.ini helped:

    ...
    ; FreeTDS defaults to 4096
    mssql.max_procs = 4096
    ...

  4. #4
    vdhyani is offline Junior Member
    Join Date
    Dec 2006
    Posts
    143

    Default Re: FreeTDS: Could not connect to server

    Good job ashamshi

    Right that in php.ini as the default mssql.max_proc is set to -1

    ; Specify max number of processes. -1 = library default
    ; msdlib defaults to 25
    ; FreeTDS defaults to 4096
    ;mssql.max_procs = -1

    You figured out correctly by setting mssql.max_proc to 4096.

  5. #5
    erop is offline Sugar Community Member
    Join Date
    Jan 2005
    Location
    Moscow, Russia
    Posts
    107

    Default Re: FreeTDS: Could not connect to server

    This sounds rather strange but even after setting mssql.max_procs = 4096 I still have the same "Could not connect to server EGOR as sa" issue.

    P.S. FastStack for Windows with MS SQL server, SugarCE 5.2.0c

  6. #6
    erop is offline Sugar Community Member
    Join Date
    Jan 2005
    Location
    Moscow, Russia
    Posts
    107

    Default Re: FreeTDS: Could not connect to server

    Another strange thing is that andopes here told me FreeTDS is only for Sugar-on-Linux + MS SQL Server combination. How do you managed to properly enable FreeTDS driver (and what is the most interesting, why?) into WAMP environment as FastStack bundle gives? Idid exactly the same as ashamshi and had no positive results.

  7. #7
    sumanpasupula is offline Junior Member
    Join Date
    Mar 2011
    Posts
    1

    Default Re: FreeTDS: Could not connect to server

    Can anybody tell the DB Driver used in sugarcrm? for all the DB options i.e. mysql, mssql, oracle....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 2008-04-23, 12:38 PM
  2. Replies: 3
    Last Post: 2008-04-21, 11:09 PM
  3. Replies: 2
    Last Post: 2007-07-01, 09:55 PM
  4. Replies: 0
    Last Post: 2007-06-26, 11:38 AM
  5. Replies: 6
    Last Post: 2006-09-20, 04:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •