You are here: mssql_connect() Problems « PHP Programming Language « IT news, forums, messages
mssql_connect() Problems

Posted by spamguy21 on 04/24/07 03:57

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация