While Trying to fetch more than One column from the table displaying Http 500 error

Hi all i am trying to fetch more than one column from the table, but if i launch the page IE is displaying http 500 error. I have set up PHP on IIS 6. the code goes like this, pls somebody tell me where am i wrong. The excerpt is

$request= 'select col1,col2 from mytable';
$data= mysqli_query($link, $request);
while($output= mysqli_fetch_array($data))
{
   $store=array('c1' =>$data['col1'], 'c2' =>$data['col2']);
}

If i comment while loop no error and also if i select only one column ie either col1 or col2 then also there is no error. Pls help.:confused:

Is this on a local server running on windows? If so, then a common solution is to upgrade a windows dll file to the more recent one that comes with the installation.

Yes i am hosting the web pages on local server server is windows 2003 standard edition iis 6. could u pls tell me which windows dll precisely.

Regards,
Shree

it might be libmysql.dll, but what could help more-so is for us to understand how you got to where you are in the first place.

Have you been following instructions from a book, or are you winging it as you go?

Ya i have been following a couple of books, and also referring on internet. I am new to php and mysql. Do u see any thing wrong in the code…?

The code looks fine to me, and anyway coding errors shouldn’t lead to a 500 internal server error page, but to php errors showing.

Yes, it will be a server setup issue that is at hand here.

I would suggest starting afresh with some clear instructions from one of Kevin Yank’s books about PHP and MySQL, not forgetting to heed the advice in the online Errata for the book.

And also when i load any pahe that connects to mysql server i get a warning “Warning: mysqli_connect() [function.mysqli-connect]: Headers and client library minor version mismatch. Headers:50051 Library:50145 in F:\ToOthers\For_Shreeshail\Webroot\Connect\index.php on line 2”. The mysql sever version is 5.1.45 community server

Yes i am strictly following the instructions as given in the book you referred to me but the only exception is i am trying to host php on IIS rather on Apache should it be a problem doin so…?

Yes, it would be a problem, one that this PHP Forum is mostly unsuited to helping with.

I have asked if this thread can be moved to the Server Management forum so that the knowledgeable people over there can put their brains to great use regarding your situation.

Thank you, i hope and pray i will be able to resolve this issue as soon as possible with the humble help of sitepoint users

This thread is been relocated from PHP forum, i hav still not got the solution for the problem can anyone help me out.