0

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";

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

Edited by uselessninja: n/a

3
Contributors
10
Replies
11
Views
5 Years
Discussion Span
Last Post by uselessninja
0

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.

Edited by Ichcha: n/a

0

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?

0

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.

Edited by Ichcha: n/a

0

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..

0

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

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.