What i did: * get the php_mssql.dll * get the ntwdblib.dll * configure your php.ini
GET php_mssql.dll: This dll can be found in the binary zip of php 4.3 (not the self installing package) Put it in your extensions dir (extensions dir found in php.ini) In my case (default install with PHP installer) same dir as PHP.exe NOTE: I dont know what the php_mssql70.dll library is.. never found it in a distribution of PHP or on the net.
GET ntwdblib.dll This dll can also be found in the binary zip of php 4.3 in the dlls subdir. put it in the system32 dir. WATCH OUT... i used a copy found on a MSSQL server, used that.. couldn't get it to work.. My function calls seamed OK, could call the mssql routines but I got a connection error When I used the dll distributed with the binary zip of php 4.3 it worked.
configure your PHP.ini uncomment the php_mssql.dll in the extensions part of php.ini also check if the extensions dir is set correctly.. it should point to the dir where your extensions are located.
Jeg har IKKE afprøvet opskrifter, og ville nok prøve at checke php_mssql.dll i første omgang.
Og før du overskriver noget i system32 kataloget, så tag lige en kopi inden, så du kan kopiere den gamle .DLL tilbage hvis maskinen begynder at opføre sig underligt.
Warning: mssql_connect(): message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in c:\apache\htdocs\sql_test2.php on line 2
Warning: mssql_connect(): Unable to connect to server: CFDKDC03 in c:\apache\htdocs\sql_test2.php on line 2
Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in c:\apache\htdocs\sql_test2.php on line 3
Warning: mssql_query(): message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in c:\apache\htdocs\sql_test2.php on line 5
Warning: mssql_query(): Unable to connect to server: (null) in c:\apache\htdocs\sql_test2.php on line 5
Warning: mssql_query(): A link to the server could not be established in c:\apache\htdocs\sql_test2.php on line 5
Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in c:\apache\htdocs\sql_test2.php on line 6
men som sagt kunne jeg heller ikke skifte den on the fly..
Jeg har læst andre steder at man skal installerer SQL klienten på maskninen med PHP - men jeg går udfra at dette kun gælder i de tilfælde hvor man ikke har serveren lokalt...?
prøv at installere klienten. jeg mener at svagt at kunne huske, at klienten indeholder et API som andre programmer benytter for at snakke med MS SQL. hvilket også gør den brugbar på samme maskine som serveren ligger på.
du kan altid afinstallere den senere, hvis det ikke hjælper noget
I had problems connecting to an SQL 2000 database running on a W2K server from IIS6 on an Windows 2003 server. I got an error message saying "Unable to connect to server: <server name>" all the time.
The 2003 server didn't have the MDAC components installed, installing the latest version (2.8 as of writing) seems to solve that problem.
JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA nu virker det - tog også kun 7 timer....
Jeg fik skiftet .dll filen... jeg installerede klienten, jeg installerede sp3 til SQL samt alle de andre ting vi har haft oppe - så hvad der lige gjorde udslaget aner jeg ikke - men hælder til at det var dll filen...
Venligst smid et svar så jeg kan takke for ulejligheden og hjælpen...!!!!!
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.