php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11765 Warning: MySQL: Unable to save result set in
Submitted: 2001-06-27 22:58 UTC Modified: 2001-11-20 19:26 UTC
From: root at byone dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.6 OS: redhat-6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: root at byone dot com
New email:
PHP Version: OS:

 

 [2001-06-27 22:58 UTC] root at byone dot com
I'm getting the following error message when I execute a query (such as insert or delete or update but not select) that doesn't produce any results:

Warning: MySQL: Unable to save result set in /path/to/sql.php3
on line 33

MySQL said NOTHING and the query was successful executed.

I have set "display_errors = Off" in my php.ini, so no warnings should be shown , but php script can not go on at the line where the Warnning should display.



I configured php with the following command:

./configure  --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=../../gd/gd1.3 --with-ftp --with-imap=../../mail/imap/imap-4.7c --enable-memory-limit --with-pgsql=/usr/local/pgsql

MySQL is version 3.23.38 and PostgreSQL is version 7.1.2 

and compiled with th following command:

./configure  --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gb2312 --with-extra-charsets=all

./configure  --enable-multibyte --enable-unicode-conversion --with-perl --with-openssl=/usr/local/ssl --enable-odbc --with-CXX



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 23:06 UTC] sniper@php.net
Please include a shortest possible example script that
can be used to reproduce this problem.

 [2001-06-27 23:06 UTC] root at byone dot com
I'm getting the following error message when I execute a query (such as insert or delete
or update but not select) that doesn't produce any results:

Warning: MySQL: Unable to save result set in /path/to/sql.php3
on line 33

MySQL said NOTHING and the query was successful executed.

I have set "display_errors = Off" in my php.ini, so no warnings should be shown
, but php script can not go on at the line where the Warnning should display.



I configured php with the following command:

./configure  --with-mysql=/usr/local/mysql --enable-track-vars --with-gd=../../gd/gd1.3
--with-ftp --with-imap=../../mail/imap/imap-4.7c --enable-memory-limit
--with-pgsql=/usr/local/pgsql

MySQL is version 3.23.38 and PostgreSQL is version 7.1.2 

and compiled with th following command:

./configure  --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gb2312
--with-extra-charsets=all

./configure  --enable-multibyte --enable-unicode-conversion --with-perl
--with-openssl=/usr/local/ssl --enable-odbc --with-CXX


BTW : The script is perfect on mysql-php-4.0.3pl1 and postgreSQL-php-4.0.6 .
 [2001-06-27 23:37 UTC] root at byone dot com
The script(error.php) is :

<?
$db_acc_user = "root";
$db_acc_passwd = "password";
$db = "pacc";
$sql = "INSERT INTO type (name, quota, pc, cn, office) VALUES ('Howard', '10', '1', '0', '1')";
mysql_connect("localhost",$db_pacc_user,$db_pacc_passwd);
mysql_db_query($db,$sql);
mysql_close();
?>


The result in browser is:


Warning: MySQL: Unable to save result set in /home/0/admin/error.php on line 7


But I just found that NO error in command line

root@localhost # php ./error.php
X-Powered-By: PHP/4.0.6
Content-type: text/html



 [2001-06-28 13:16 UTC] sniper@php.net
Try adding this lines after each mysql function:

echo mysql_errno().": ".mysql_error()."<BR>";

This way you should get the reason why it doesn't work.

And FYI: Use mysql_query() / mysql_select_db()
instead of mysql_db_query().

--Jani

 [2001-06-28 21:21 UTC] root at byone dot com
Yes I use Use mysql_query() / mysql_select_db() instead of mysql_db_query().
Both mysql_errno() and mysql_error() return NOTHING.
The query was successful exectued by mysql.(I can find the query reselt in mysql database)
But why php generated an error?

 [2001-06-28 21:25 UTC] root at byone dot com
BTW : This error occur on ALL OF my scripts after I had upgraded my php from 4.0.3 to 4.0.6
 [2001-07-03 21:37 UTC] root at byone dot com
I upgraded to mysql-3.23.39 and recompiled php-4.0.6 but nothing changed.
 [2001-11-20 19:26 UTC] mfischer@php.net
Bogusified in favour of #12029.

Please only respond to #12029!

Bogus
 [2004-03-17 12:45 UTC] julien_riel at hotmail dot com
When you have message:
"Unable to save result set error 127"

May be your table is corrupt

Use the SQL command 
"CHECK TABLE table_name"
to see if everything is Ok on your table.

I got this error after I shutdown Windows unproprely (scandisk started).

Seems I lost all my data!
Make some backups!

Hope this help
 [2013-01-31 02:31 UTC] jorides at yahoo dot com
The LIMIT is ON, Try, LIMIT 0,10!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC