php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9049 mysqlconnect works, but mysql_query says invalid resource - with 4.0.3pl1 okay
Submitted: 2001-02-01 09:59 UTC Modified: 2001-06-02 21:53 UTC
From: administrator at rtl dot lu Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.4pl1 OS: Linux 2.2.x
Private report: No CVE-ID: None
 [2001-02-01 09:59 UTC] administrator at rtl dot lu
I have a script which is connecting to mysql using
$authdb=mysql_connect ......
mysql_error does not report an error, neither using
the select_db function.

Later in the same script, I use a mysql_query, which
is reporting invalid mysql_resource (where i do an 
echo of the $authdb, which reports a correct handle).
If I move the mysql_connect & mysql_select_db jhust in
the lines before the mysql_query, it is working fine
also mysql_close($authdb) does not report an error
anymore.

This only occurs under 4.0.4pl1, where under 4.0.3pl1
the same script is working fine, without any problems.

I use exactly the same configure line as 4.0.3pl1 (
built-in mysql support).

Now I downgraded again, scripts are running okay now.
I tried also with/without optimizer on both versions,
same results.

---------------------------------------------
Tom Weber
 Responsable Technique Internet
 Internet Technical Manager
 RTL Radio & T?l? L?tzebuerg / RTL Group
 Mail : administrator@rtl.lu 
 URL  : http://www.rtl.lu

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-02 21:53 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

-Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 17:01:30 2024 UTC