|
Posted by ELINTPimp on 04/24/07 15:05
On Apr 23, 11:57 pm, spamgu...@gmail.com wrote:
> I have a server with Windows 2000, PHP 5, IIS and SQL Server 2000
> running. Individually, each works great. When trying to bring PHP and
> MSSQL together, though, I'm tearing my hair out...it just will not
> connect. Not even an error message.
>
> Consider the code:
>
> <?php
> $server = "localhost"; // have also tried "[servername]", "localhost:
> 1433" and "[servername]:1433"
> $username = "administrator"; // Windows username
> $password = "[password]";
> if (!mssql_connect($server, $username, $password))
> echo "Could not connect.<p>";
> ?>
>
> When thinking about all the things I've tried based on the wisdom of
> the Internet, I'm stunned it still doesn't work:
> * Upgraded the ntwdblib.dll file that PHP uses to 8.0.194, the latest
> version
> * Configured php.ini such that mssql.secure_connection = On [was Off
> for awhile]
> * Telnet-ed into the SQL server...telnet [servername].case.edu 1433'
> produces a positive response.
> * Confirmed a zillion times that the MSSQL extension is functional.
>
> Any ideas? If I don't fix this, I have to learn ASP in 24 hours.
>
> Thanks.
I highly suggest using the packaged ODBC functions instead. I use
MSSQL 05/Server2003/IIS6, mssql_* never worked for me but using ODBC
is flawless. Hope this helps!
Navigation:
[Reply to this message]
|