ID: 11057 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: ODBC related Operating System: Windows 98 SE PHP Version: 4.0.4 New Comment:
I've got a simple script, which creates the error: <?PHP if(isset($_GET['question'])){ $sql="SELECT id FROM pollv WHERE id='".$_GET['question']."' AND site='".siteid()."'"; $result=mysql_query($sql); $id=0; while($row=mysql_fetch_object($result)){ $id=$row->id; } vraag($id); } ?> question=1, this one is in the database. In table pollv is one question with id=1. This script is to check the question belongs to the site used. Previous Comments: ------------------------------------------------------------------------ [2003-01-30 14:49:30] [EMAIL PROTECTED] I'm using WinME, and also have troubles with this problem. I use mysql and mysql_fetch_object, I think the problem is the code is getting into a loop which never ends, sometimes I get an error 500, sometimes a endless page of the same error. ------------------------------------------------------------------------ [2001-06-24 17:16:06] [EMAIL PROTECTED] Im sorry. It means, that i see windows error, that there is an error in php.exe. Web server is still working, but in the log file is written aboud premature ending of .... No HTML page is shown. ------------------------------------------------------------------------ [2001-06-21 11:23:49] [EMAIL PROTECTED] no user feedback. please reopen the bug if you're still having trouble. ------------------------------------------------------------------------ [2001-06-01 13:49:08] [EMAIL PROTECTED] when you say it crashes what exactly does that mean? do you still see the web server working and that message came up? or did you get a nice core dump to show up with that statement on the screen popup? ------------------------------------------------------------------------ [2001-05-26 03:55:18] [EMAIL PROTECTED] OK, here is the part of the script. Btw. i found, that this appears only if in query is agregate function count(*) (there are two types of query, one works good, other not) Im using MySQL 3.23.27-beta with MyODBC driver. There is table tab01 with information about clients. Script: <html> <head> <title>Welcome</title> <? function connect() { @$con = ODBC_connect("sample-MySQL","",""); if(!$con) echo "not connected"; return $con; } function close () { global $conn; ODBC_close($conn); } function Query ($query) { global $conn; return ODBC_exec($conn, $query); } function Fetch_row () { global $rslt; return ODBC_Fetch_Row($rslt); } function Result($field) { global $rslt; return ODBC_Result($rslt, $field); } if ($sent) { $conn = connect(); if ($conn) { $query = "select count(*) cnt from tab01 where login='".strtolower($login)."'"; //problematic // $query = "select * from tab01 where login='".strtolower($login)."'"; //works good $rslt = query($query); while(Fetch_row()) $logged = Result("cnt"); if ($logged) echo $login; else echo "not logged"; close(); } } ?> </head> <body> <form action="default.php"> <center> <table> <tr><td>Login: </td> <td><input value="<?echo $login?>" type="text" name="login"></td></tr> <tr><td colspan="2"><center><input type="submit" value="Submit"></center></td></tr> </table></center> <input type="hidden" name="sent" value="true"> </form> </body> </html> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/11057 -- Edit this bug report at http://bugs.php.net/?id=11057&edit=1