PHP 4.0 Bug #8342 Updated: Invalid "MySQL: Unable to save result set..." error
| From: | cyberwolf at lunarden dot com | Date: | Fri, 29 Dec 2000 20:22:06 +0000 |
| Subject: | PHP 4.0 Bug #8342 Updated: Invalid "MySQL: Unable to save result set..." error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42512@lists.php.net to get a copy of this message | ||
ID: 8342
User Update by: cyberwolf@lunarden.com
Old-Status: Feedback
Status: Open
Bug Type: MySQL related
Description: Invalid "MySQL: Unable to save result set..." error
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
Previous Comments:
---------------------------------------------------------------------------
[2000-12-20 18:27:23] sniper@php.net
Do you have any short example script which produces this ??
Version of mysql?
--Jani
---------------------------------------------------------------------------
[2000-12-20 13:55:52] cyberwolf@lunarden.com
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