[vox-tech] PHP/MySQL very slow
Richard S. Crawford
rscrawford at mossroot.com
Wed Dec 15 13:37:01 PST 2004
Mitch Patenaude said:
> I can think of a couple of places where the computer's IP address is
> used in the PHP<->MySQL linkage.
>
> First, in the mysql_connect("<host>","<user>","<pass>") call... but
> that would tend to make it fail altogether rather than just become
> slow... and if the DB and webserver are on the same box, then the host
> is probably "localhost", but it's something to check.
It wasn't in the MySQL settings at all; in the same config file where the
mysql_connect parameters are set, there is a variable in this application
called wwwroot... which was set to the old IP address. I changed it to
the new IP address, and now the site works fine.
I'll go back under my hole now.
>
> Second.. in the MySQL permissions. If, for some reason the permissions
> are configured in terms of "user@<IP>", then the change in IP would
> cause them to no longer be found.. and it would fall back on default
> permissions. Again.. I would expect changes in behavior rather than
> just slowness.
>
> -- Mitch
>
> On Dec 15, 2004, at 1:16 PM, Richard S. Crawford wrote:
>
>> The site I'm working on, on a RH9 box, is presenting me with a strange
>> problem. It's running Apache 1.x, PHP 4.2, and MySQL 3.23. When I
>> hit plain old PHP pages, the site runs just fine and response time is
>> nice and
>> quick. However, when I go to a page where PHP connects to MySQL, the
>> response is incredibly slow. Apache responds fine, PHP responds fine,
>> and
>> MySQL responds fine from the command line. And everything was working
>> fine until yesterday.
>>
>> What happened yesterday? We changed this computer's IP address. I've
>> adjusted httpd.conf appropriately, but I can't think of where else I
>> might
>> have to make configuration changes in order to make this work.
>>
>> Any advice would be greatly appreciated.
>>
>>
>>
>> --
>> Sláinte,
>> Richard S. Crawford (AIM: Buffalo2K)
>> http://www.mossroot.com http://www.stonegoose.com/catseyeview
>> "We live as though the world were how it should be,
>> to show it what it can be."
>> --"Angel", Season 4 ep. 1
>>
>>
>> _______________________________________________
>> vox-tech mailing list
>> vox-tech at lists.lugod.org
>> http://lists.lugod.org/mailman/listinfo/vox-tech
More information about the vox-tech
mailing list