Bug #4223 Updated: PHP calls MySQL with apache user instead of connected user
| From: | jimw@php.net | Date: | Sat, 27 Apr 2002 17:26:55 +0000 |
| Subject: | Bug #4223 Updated: PHP calls MySQL with apache user instead of connected user | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6240@lists.php.net to get a copy of this message | ||
ID: 4223
Updated by: jimw@php.net
Reported By: louis@sitebysite.nl
Status: Analyzed
-Bug Type: Feature/Change Request
+Bug Type: MySQL related
Operating System: RedHat 6.1
-PHP Version: 4.0 Release Candidate 1
+PHP Version: 4.0 Release Cand
New Comment:
this isn't a feature request.
Previous Comments:
------------------------------------------------------------------------
[2000-08-08 22:30:25] waldschrott@php.net
I don´t kwno any way, moving to feature request
------------------------------------------------------------------------
[2000-07-30 17:07:23] zak@php.net
User response:
"As far as I can gather it has something to do with the
wait_timeout of MySQL. This was set pretty low. I think
the persistent connections outlived the connections on the
database side during quiet periods. The error doesn't
seem to appear if I up this timeout or bring down the
life span of the apache child processes. Is there a
way to set a timeout on the persistent connections
on the php side? That would enable one to match it
against the MySQL timeout and make sure it never happens."
------------------------------------------------------------------------
[2000-07-30 13:52:19] zak@php.net
** Warning - uneducated guess **
This seems like it might be a mysql configuration issue.
Please review the MySQL documentation on performance - try increasing
the max number of connections, etc...
Also, what user does you web server run as - www by chance?
------------------------------------------------------------------------
[2000-04-24 03:04:48] louis@sitebysite.nl
This is hard to reproduce, but every once in a while PHP tries to use
the
user running apache instead of the user specified in mysql_pconnect()
to
query MySQL. So after a pconnect with user X, you get a "access
denied
for user www" from the query. Our config is a dual-processor webserver
and dual-processor MySQL machine. With low traffic, it does not occur.
It also appears to occur only when using write locks on tables, but I
can't positively verify that - only that I haven't seen it happen on
sites
not using table locks, yet.
PHP configured with:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr
--enable-track-vars --with-gd=../gd1.4 --with-ttf --without-pcre-regex
--with-mm=../mm-1.0.12 --enable-inline-optimization --disable-debug
--with-recode --with-t1lib --with-dbase
Also running the Zend optimizer for RC1.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=4223&edit=1