ID: 8342
User Update by: [EMAIL PROTECTED]
Old-Status: Open
Status: Duplicate
Bug Type: MySQL related
Description: Invalid "MySQL: Unable to save result set..." error

Update:

Aside from the request above to set up a test script and database, I never heard back 
from anyone on the PHP team.

I followed all of the suggestions I have been able to find in this bug base to no 
avail, and verified that there were no other copies of MySQL or PHP running on the 
server. Because the error occurred after I used PHP's instructions for doing an 
upgrade using apxs with Apache, I suspect there is a problem with that procedure, 
although at that point- recompiling and installing it from scratch didn't fix the 
problem.

About two weeks after I set up the above test, the server crashed due to a hard disk 
failure, so I had to re-build it from scratch (I have yet to find a tape drive that I 
can get to work with Linux). After doing fresh installs of the newest versions of PHP, 
MySQL, and Apache, the problem I reported went away.  

Since the error message is completely bogus, as a workaround while I was still having 
the problem- I added the following line to my production scripts: 

error_reporting(4);

This sets PHP up to only report parse errors. The down-side is it won't report any 
database errors, valid or not, but I already had my own logging/debug routines for 
doing that. You can set this in the PHP config file too if you want to do it globally.

Beyond that, the only real solution seems to be to install everything from scratch.

Sincerely,
Todd

Previous Comments:
---------------------------------------------------------------------------

[2000-12-29 15:22:06] [EMAIL PROTECTED]
Addl. information...
This morning, I recompiled and installed both PHP and MySQL. The versions are:

php-4.0.4
mysql-3.23.29a-gamma

For installation, I used:
For PHP: ./configure --with-apxs=/usr/local/apache/bin/apxs 
--with-mysql=/usr/local/mysql

For MySQL, I used:
./configure --prefix=/usr/local/mysql

I have a sample script active at: http://lexx.nbm.com/mysqltest.php

I will cut-and-past the code (minus database login info) below (not sure if it will be 
readable...):
<CODE>
                if($UserName)
                {
                        $mysql_link = mysql_connect("localhost","webdb","bongos");  
//Connect to database server.
                        mysql_select_db("webdata",$mysql_link);   //Select webdata 
database
                        $query = "INSERT INTO phptest VALUES ("$UserName","$Color")";
              $mysql_result = mysql_query($query,$mysql_link);
                        if(mysql_error())
                        {
                                Print("<H3>Submission failed. The error reported by 
mySQL was: ".mysql_error()."</H3>n");
                        }
                        else
                        {
                                Print("<H3>Submission successful! No error was 
reported by mySQL</H3>");
                        }
                }
                else
                {
                        print("<H2 ALIGN="CENTER">PHP/MySQL Test</H2>n");
                        print("<form method="post" action="$SCRIPT_NAME">n");
                        print("This script will simply try to add what you put in the 
next to fields into a simple database...<BR>n");
                        print("<p>Please enter your name: ");
                        print("<input type="text" name="UserName" size="30" 
maxlength="30"><br>n");
                        print("Plesae enter youf favorite color: ");
                        print("<input type="text" name="Color" size="30" 
maxlength="30"> n");
                        print("<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit to 
database"><BR>n");
                }

</CODE>

I went through my running processes, and through httpd.conf, and cannot find anything 
else using mySQL or other versions of PHP loaded. Any help would be appreciated. Also, 
I never received an email in reference to this, so something is not working right with 
the email portion of this bug database.

Sincerely,
Todd Butler


---------------------------------------------------------------------------

[2000-12-20 18:27:23] [EMAIL PROTECTED]
Do you have any short example script which produces this ??
Version of mysql?

--Jani

---------------------------------------------------------------------------

[2000-12-20 13:55:52] [EMAIL PROTECTED]
This problem has apparently been reported several times. The resolution in the FAQ and 
in previous bug reports is to recompile and install PHP with the path to MySQL. I used 
the "with-mysql=/usr/local/mysql" and reinstalled PHP to no avail. There are no other 
versions of PHP running on my system, nor are there any other systems accessing MySQL 
(two other points that were mentioned in the FAQs and some previous bug reports. This 
error message is happening with existing production scripts that worked fine with 
previous versions of both products.

---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=8342


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to