|
Posted by Erwin Moller on 04/26/06 13:59
janvdberg@gmail.com wrote:
> Hi Erwin,
Hi Jan,
>
> thanks for the reply. I have about 2500 user websites running with all
> kinds of scripts.
Ouch...
2500 websites, and mySQL is running on the same machine as the webserver?
I can see why you want to change that. :-)
> To migrate I really would need localhost to become something like
> mysql.host.com using a network socket: because changing the connection
> string (if even possible) would mean altering a user website which
> would cause it not to work anymore on the current server and this
> wouldnt allow for a seemless migration.
True.
You should contact all 2500 authors to discuss the changes.
Close to impossible I expect.
> I dont see a problem with changing the localhost meaning just for PHP.
> So Im guessing that this is probably something that I should hack into
> the source?
Well, I don't think you can change the meaning of localhost just for PHP.
But maybe I am mistaken.
I warned you about localhost because some processes use that (or 127.0.0.1)
to do some local loopback testing of the TCP/IP stack.
Some (all?) networkcards under Linux use it during startup.
But this matter is not my expertice, so I dare not to advise you.
Maybe follow Colin's advise and try in another newsgroup, one that is
dedicated to the OS you are using.
Or maybe you get lucky in here, you never know. :-)
Whatever solution you pick, be sure you try it a few times in a
testenvironment, to be sure your new strange value for localhost doesn't
screw up other systems, like mailing.
eg: If I want to send an email from PHP, I also use localhost for
sendmail...
That is just one example. I wouldn't be surprised if LOTS of packages have
localhost hardcoded in the source and compiled.
So whatever trick you come up with, ideally it only affects the connection
from PHP to mySQL, and leave the rest of the OS as it were.
I am mainly making your afraid of doing that localhost trick, I know.
(I would be afraid to do that.)
Maybe somebody else has a nice solution that only works on PHP connecting to
mySQL.
Best of luck!
Regards,
Erwin Moller
>
> Jan
Navigation:
[Reply to this message]
|