[wplug] Semi OT: PHP mysql_connect() not returning resource link.

Chester R. Hosey chosey at nauticom.net
Wed Dec 14 16:58:06 EST 2005


Russ Schneider wrote:
> Solved.
> 
> The php script was actually failing on the mysql_connect() function, and 
> then going right ahead and selecting the database and going ahead with the 
> queries.  It would accept any connection that did NOT try to connect with 
> a password.
> 
> That's why it returned a false resource link, and that's why it wuoldn't 
> query using that link but would query without it.
> 
> To fix it, I basically had to reiterate the passwords (enter them again) 
> into the mysql.user table.  I have no idea why as the value in the table 
> was identical before and after, but it DID work.  (Perhaps the privileges 
> were not flushed during the system upgrade?)
> 
> Thanks for the brainstorming though!
> 
> 

I figured the implicit connect might be related somehow. It was
something I didn't know about until checking the PHP/mysql
documentation. I'm glad you tracked down the problem!

I do hope you've also made sure that unauthenticated access is no longer
allowed.

Chet



More information about the wplug mailing list