hellO! i'm trying to connect to my ms sql server. i tried mssql_connect( "localhost", "", "" );
but i get an error saying:
Fatal error: Call to undefined function: mssql_connect() in c:\inetpub\wwwroot\db.php on line 6
i read something in your site about how to fix this but i can't seem to understand the instructions. I think it said that i should add something to the php.ini file and compile php...
i'm new to php. can you give me more detailed instructions in solving this. thanks!
php newbie: mssql problem
Moderator: General Moderators
Start from here:
http://pl.php.net/manual/en/ref.mssql.php
and read the user notes. There's one you will find very interesting :]
http://pl.php.net/manual/en/ref.mssql.php
and read the user notes. There's one you will find very interesting :]
Do you have the client libraries on the machine where your are running PHP ?
If not, you will need to read the man page "delorian" posted before, it explains how to setup the client and implement the changes needed in the php.ini etc.
If not, you will need to read the man page "delorian" posted before, it explains how to setup the client and implement the changes needed in the php.ini etc.
Regards,Requirements for WIn32 platforms.
The extension requires the MS SQL Client Tools to be installed on the system where PHP is installed. The Client Tools can be installed from the MS SQL Server CD or by copying ntwdblib.dll from \winnt\system32 on the server to \winnt\system32 on the PHP box. Copying ntwdblib.dll will only provide access. Configuration of the client will require installation of all the tools.
i got the mssql functions working. now i just need to get the later version of the ntwdblib.dll. I can't connect to my mssql server. I found a link for the .dll file in the page debian gave me but i can't open it. I can't find any on the web. The one on my sql cd is only about 260kb. I believe that there's one greater than 300kb, right? could you give another link? thanks!
by the way, these are the errors i receive:
Warning: mssql_connect(): Unable to connect to server: 127.0.0.1:1433 in c:\inetpub\wwwroot\db.php on line 6
Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in c:\inetpub\wwwroot\db.php on line 7
this is my db.php file:
<html>
<body>
<?php
$link = mssql_connect( "127.0.0.1:1433", "Paul Rivera", "" );
mssql_close( $link );
?>
</body>
</html>
i'm using the local account. my windows username is Paul Rivera and i don't have any password. i tried using localhost instead of 127.0.0.1 but still nothing happened. I have also tried putting other ports/ even no ports specified... nothing.
Warning: mssql_connect(): Unable to connect to server: 127.0.0.1:1433 in c:\inetpub\wwwroot\db.php on line 6
Warning: mssql_close(): supplied argument is not a valid MS SQL-Link resource in c:\inetpub\wwwroot\db.php on line 7
this is my db.php file:
<html>
<body>
<?php
$link = mssql_connect( "127.0.0.1:1433", "Paul Rivera", "" );
mssql_close( $link );
?>
</body>
</html>
i'm using the local account. my windows username is Paul Rivera and i don't have any password. i tried using localhost instead of 127.0.0.1 but still nothing happened. I have also tried putting other ports/ even no ports specified... nothing.