hi ...i have a problem connecting MSSQL 2005 express and php..

i've tried configuring the php.ini by removing the ; in extension=php_mssql.dll
but not working

i also place the php_mssql.dll on ext folder but not working again;

and also i tried downloading an old ntwdblib.dll and placing it in system32
but not working also :( can someone help me please...


heres my code btw;
----------------------
<?php

$uid = "";
$db = "";
$pwd = "";
$host = "XXX\SQLEXPRESS";

$conn = mssql_connect($host, $uid, $pwd) or die('Could not connect')
or die("Couldn't connect to SQL Server on $host");

$selected = mssql_select_db($db, $conn)
or die("Couldn't open database $db");

echo "MSSQL Connection successful";

?>
-----------------------------

hi i had same problem before and tried all the solution but not worked. finally i copied php folder from other pc (which its xampp works fine with php and mssql connection) and replaced it in current pc. its silly solution but i did as no other choice.

hi i had same problem before and tried all the solution but not worked. finally i copied php folder from other pc (which its xampp works fine with php and mssql connection) and replaced it in current pc. its silly solution but i did as no other choice.

what u mean bro..? u've copy a php folder from a xampp on other pc (other pc which have installed xampp) and replace the php folder from ur xampp (ur pc xampp) ... ITS THAT IT?

and i dont know if it is true that mssql_connect function is not working anymore and replace it with sqlsrv?

yaa thats it.. but u cant replace the folder.. copy all the files from other pc xampp/php folder and paste it into your pc xampp/php folder. it will replace and add missing files.

"i dont know if it is true that mssql_connect function is not working anymore and replace it with sqlsrv? "

am stil working with mssql_connect function.

yaa thats it.. but u cant replace the folder.. copy all the files from other pc xampp/php folder and paste it into your pc xampp/php folder. it will replace and add missing files.

"i dont know if it is true that mssql_connect function is not working anymore and replace it with sqlsrv? "

am stil working with mssql_connect function.

uhmm whats the difference between the php on the otherpc and my php ...i mean it was downloaded on the same source so it has same files from tip to toe .. and thankzzz btw but i cant apply it coz im the only here got pc ... :)


uhh so..mssql is still working today..

in my situation.. it wasn't from same source :D

in my situation.. it wasn't from same source :D

uhh ic... can i have that folder? :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.