Page 1 of 1

MySQL PHP Error: mysql_query(): Unable to save result set.

Posted: Tue Sep 21, 2004 8:41 am
by jtp51
STATS:

PHP Version 4.3.3:

'./configure' '--with-zip' '--with-zlib' '--enable-ftp' '--with-mysql=/usr/local/mysql' '--with-oci8=shared,/opt/app/oracle/product/8.1.7/' '--enable-dbase' '--with-mssql=/usr/local' '--with-apxs=/usr/local/apache/bin/apxs'

MySQL:

Active Persistent Links 0
Active Links 0
Client API version 3.23.49
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql/include/mysql
MYSQL_LIBS -L/usr/local/mysql/lib/mysql -lmysqlclient

ISSUE:

Running the code below results in the following error:
Warning: mysql_query(): Unable to save result set in process_login.php on line 80
Unknown MySQL error
Line 80 is:

Code: Select all

<?php
$LoginRS = mysql_query($query, $connFDAuth) or die(mysql_error());
?>
The $query is:

Code: Select all

<?php
$query = "SELECT uid, name, password  FROM user WHERE active = '1' AND name='$username' AND password='$password'"; 
?>
The $connFDAuth is:

Code: Select all

<?php
$connFDAuth = mysql_connect(trim($hostname), trim($username), trim($password)) or trigger_error(mysql_error(),E_USER_ERROR); 
?>
I have googled this issue several times with no luck, any help or direction is greatly appreciated.

Thank you for reading this post.

select db

Posted: Tue Sep 21, 2004 8:53 am
by phpScott
maybe you just missed posting it but I don't see the

Code: Select all

<?php
mysql_select_db($dbname, $dbconnection);
?>
phpscott

Posted: Tue Sep 21, 2004 8:57 am
by jtp51
Good call, however I do have the block of code.

Code: Select all

<?php
mysql_select_db(trim($database), $connFDAuth);
?>
Thank you for taking a look.

echo query

Posted: Tue Sep 21, 2004 9:08 am
by phpScott
Have you tried to echo'ing out your query before you submit it and run it agianst the db using phpMyAdmin or command line or what ever you want to see if it is a really weird query error.
If it comes down to configuration one of the guru's around here will have to help.

Posted: Tue Sep 21, 2004 9:32 am
by jtp51
Yes, I have echo'ed the query results and then ran the line in MySQL without errors.

Interesting development. This will work on PHP Version 4.3.4!!! The entire tool works just fine on this PHP build, but not on PHP Version 4.3.3.

As you said, this has to be a configuration issue.

Thank you for taking a look.

Posted: Tue Sep 21, 2004 10:51 am
by feyd
tried it without the link id?