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'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. Previous Comments: ------------------------------------------------------------------------ [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> ------------------------------------------------------------------------ [2001-05-25 10:03:06] [EMAIL PROTECTED] this really doesn't sound like a PHP problem to me. you said it yourself when "using normal ODBC_functions everything is alright" (grammer corrected). regardless of that, if you're still convinced this is a PHP ODBC error, give me a SIMPLE sample script that i can use to reproduce this (about 10 lines or so), and what database you're using. ------------------------------------------------------------------------ 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