Re: MySQL Client/Server PHP problem

From: Date: Thu, 28 Dec 2000 17:28:19 +0000
Subject: Re: MySQL Client/Server PHP problem
Groups: php.general 
Request: Send a blank email to php-general+get-32099@lists.php.net to get a copy of this message
Well that's because define() declares a constant and hence the value can't be changed, you should put it into a variable. --- Hardy Merrill <merrill@missioncriticallinux.com> wrote: > mysql 3.23.28 gamma > PHP 4.0b4pl1 > Apache 1.3.12 > > I have a PHP script that "include"s > 1. a file that defines MySQL database constants, > one of which > is the HOST that the MySQL database is on, and > 2. a file that contains a MySQL connection > function. > > The main script "include"s both of these. In the > database > constants "include" file, after changing the > DB_SERVER constant > > From: define("DB_SERVER","host_a"); > > To: define("DB_SERVER","host_b"); > > > The "include"ed connection function still gets > "host_a" as > the value of the DB_SERVER constant. I can connect > at the > command line using "mysql" to "host_b" with no > problem, and I can > get my PHP script to connect to "host_b" if I > hardcode > host_b in the connect. > > I've tried bringing MySQL up on the client > system(where the > script runs) and issuing the "mysqladmin > flush-hosts" command, > which seems to work(comes back to the prompt), but > every time > DB_SERVER gets the value "host_a". > > Any ideas? > > TIA. > > -- > Hardy Merrill > Mission Critical Linux, Inc. > http://www.missioncriticallinux.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribe@lists.php.net > For additional commands, e-mail: > php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== To Find Out More About Me : http://mukul.tsx.org/ __________________________________________________ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/

« previous php.general (#32099) next »