|
Posted by ZeldorBlat on 04/19/07 15:24
On Apr 19, 9:32 am, sank.hate.s...@gmail.com wrote:
> I made all the necessary changes to my server (windows 2k3 r2) in
> order to get my php page to read from my MS SQL (v6.5) server (on
> another machine). I was able to pull data down last night with no
> problem. Today, however, I get nothing. The server I'm pulling from
> is up and has no errors. If I change the login/password for the
> connection string to something wrong, I don't get an error message.
> In fact, the page is blank as if there was an error within the code
> (this is regardless of whether I use a correct or incorrect login).
> Yesterday when it was working, if I used the wrong login, I got the
> usual error message back. If I comment out all the lines regarding
> the connection, it builds the table just fine.
>
> I've attached my code below (stripped out some table columns and data
> manipulation code).
>
> I have copied ntwlibd.dll to my windows\system32\ directory and
> enabled the "extension=php_mssql.dll" line in my php.ini file.
>
> If anyone has seen this before or has any suggestions, please let me
> know... this is quite frustrating.
>
> Thanks,
> Jason
>
> =====================================================
>
> <?php
>
> $con = mssql_connect('server', 'login', 'password');
> if (!$con)
> {
> die('Could not connect: ' . mssql_error());
> }
>
> mssql_select_db("CM", $con);
>
> $sql="SELECT *FROM Private_Build";
>
> $result = mssql_query($sql);
>
> echo "<table border='1'>
> <tr>
> <COL width='100'>
> <th bgcolor='black' style ='color:white'>Patch ID</th>
> </tr>";
>
> while($row = mysql_fetch_array($result))
> {
> echo "<tr>";
> echo "<td>" . $row['Packages'] . "</td>";
> echo "</tr>";
> }
> echo "</table>";
>
> mssql_close($con);
> ?>
Turn on display_errors so you can see why the page isn't coming up.
Navigation:
[Reply to this message]
|