|
Posted by Ron on 02/25/07 16:41
On Sun, 25 Feb 2007 13:18:48 +0100, "J.O. Aho" <user@example.net>
wrote:
>Todd Michels wrote:
>> Hi All,
>>
>> I am trying to collect info from a MSSQL DB and I am not even able to
>> get passed the connection. I don't get any errors I just get a blank
>> page when I go to the site.
>>
>> PHP is working, see attached phpinfo(). Any help is appreciated.
>>
>> Windows XP SP2, IIS 5.1, PHP 5.2.1, MSSQL Server Express Edition
>>
>>
>>
>>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml">
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
>>
>> <?php
>> $con=mssql_connect("serverName\sqlexpress","username","password");
>>
>> if ($con)
>> $conStatus="It connnected";
>> else
>> $conStatus "didn't work";
>>
>> mssql_close($con);
>> ?>
>>
>> <title>Test PHP MSSQL</title>
>>
>> </head>
>>
>> <body>
>>
>> <?php echo $conStatus; ?>
>>
>> </body>
>>
>> </html>
>
>I suggest you look a little bit at the user comments at
>http://www.php.net/manual/en/function.mssql-connect.php
>it seems like there are differences depending on the version of mssql.
>
>You could try to use
>$con=mssql_connect("localhost,1433","username","password");
Mine is localhost for what it's worth. I struggled with this too :)
[Back to original message]
|