ID: 13738
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: MSSQL related
Operating System: Win 2000 server
PHP Version: 4.0.6
New Comment:

Are you sure that your DNS is configure properly?
Try to ping to labdb (just enter "ping labdb" (without the quotes) in a dos-prompt). 
It's likely to be a problem with your DNS-setup.

Previous Comments:
------------------------------------------------------------------------

[2001-10-18 10:56:13] [EMAIL PROTECTED]

I am running php 4.0.6 on IIS 5 on a windows 2000 server
My database runs ms sql 2000 on a windows 2000 server seperate machine from the web 
server.

my dns is set so that my database machine is named labdb and its ip address in 
192.168.0.63

when I execute
function ConnectToDatabase()
{
        $dbname   = "is5sql";
        $dbserver = "labdb";

        if(!mssql_connect($dbserver, "interscale", "")){
                return FALSE;
        }
        
        if(!mssql_select_db($dbname)){
                return FALSE;
        }

        return TRUE;
}
I get an error that I cannot connect to the database.

when i execute:
function ConnectToDatabase()
{
        $dbname   = "is5sql";
        $dbserver = "192.168.0.63";

        if(!mssql_connect($dbserver, "interscale", "")){
                return FALSE;
        }
        
        if(!mssql_select_db($dbname)){
                return FALSE;
        }

        return TRUE;
}
this connects to the database and returns true.
I can connect to the database server with the dns name if i use ADO, but not if i use 
the php_mssql.dll.

can this be fixed?

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13738&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to