Welcome, Guest
Please Login or Register.    Lost Password?

Cant conect with ms sql
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Cant conect with ms sql
#601
Re:Cant conect with ms sql 2 Months, 2 Weeks ago Karma: 0
Just bought it and unfortunately I have the same problem.

Have SBS2003 with SQLServer2005.
Ended up installing PHP5.3 with FastCLI. All apps work except I can not get to the DB.
Unable to connect to the database:The MSSQL adapter "mssql" is not available.
The modules you are refering here are no longer supported, I tried in all ways imaginable and it would not work - this is the current version: SQL Server Driver for PHP

Q: The PHP module is actually called php_sqlsrv.dll - it the Database type still mssql?

If I do a PHP test I can reach the server as well, reporting back the version:
"DriverDllName: sqlncli10.dll DriverODBCVer: 03.52 DriverVer: 10.00.2531 ExtensionVer: 1.1.428.1"
The PHP module is:
Code:


<?php
/*Connect to the local server using Windows Authentication and 
specify the AdventureWorks database as the database in use. */
$serverName = "(local)";
$conn = sqlsrv_connect( $iciserver);

if( $conn === false )
{
     echo "Could not connect.\n";
     die( print_r( sqlsrv_errors(), true));
}

if( $client_info = sqlsrv_client_info( $conn))
{
       foreach( $client_info as $key => $value)
      {
              echo $key.": ".$value."\n";
      }
}
else
{
       echo "Client info error.\n";
}

/* Close connection resources. */
sqlsrv_close( $conn);
?>



phpinfo also reports it is loaded: sqlsrv
sqlsrv support enabled
Directive Local Value Master Value
sqlsrv.LogSeverity 0 0
sqlsrv.LogSubsystems 0 0
sqlsrv.WarningsReturnAsErrors On On

Thanks for any help to get this working.
on a sidenote: your pictures at the bottom are not working on the documentation
peter
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/06/25 13:37 By viljem.
The administrator has disabled public write access.
 
#602
Re:Cant conect with ms sql 2 Months, 2 Weeks ago Karma: 1
Hi Peter,

You should connect with SQL Server Authentication. So you should have prepared a DB user (standard user: sa, db name: master)

My settings are as folows:

Select connection: Other
Database type: SI_VI\VILJEMSQL2008
Database host: localhost
Database user: sa
Password: *********
Databasename: master

Before connection be sure you have enabled as follows:
1. copy ntwdblib.dll to folder where php is installed (e.g. \xampp\php) and also to apache\bin
2. out comment extension=php_mssql.dll in php.ini (delete ; before). Please, restart apache.
3. try to connect (also try with e.g. SQL server Management Studio if connection is ok)

please see documentation:
si2.php.net/manual/en/mssql.requirements.php
www.helpspot.com/helpdesk/index.php?pg=kb.page&id=13

I am sending you mine dll via email.


Best regards,
Viljem
viljem
Admin
Posts: 152
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting