[HyperDB] Invalid argument supplied for foreach() in db.php on line 638

Oren oren at triond.com
Wed Sep 16 13:02:02 UTC 2009


Tony,

Could it be that on production servers your wp-config.php is missing 
require('db-settings.php'); ?

Oren



hyperdb-request at lists.automattic.com wrote:
> Hello everybody,
>
> I've run into a problem installing HyperDB in our production environment.
>  The configuration is the same as on our development environment, so I'm
> struggling to work out what's going wrong.
>
> This is my "db-settings.php" config for the moment.  I've reduced it down to
> bare minimum of one RW server for the moment while debugging.  Of course the
> appropriate RW_DB_HOST variable has been defined.
>
> *add_db_server('global', 0,    '', 1, 1,  RW_DB_HOST,    RW_DB_HOST,
>     DB_NAME,     DB_USER,     DB_PASSWORD);*
>
> As soon as I drop "db.php" into the wp-content folder the site stops working
> with the following error appearing in the error logs.
>
> *PHP Warning:  Invalid argument supplied for foreach() in
> /var/www/vhosts/site/wordpress/wp-content/db.php on line 638*
> *
> *
> At first glance this appears to indicate that there are no servers added for
> the loop to enumerate, but that's about all I can tell.
>
> Can anybody help?
>
> Many thanks,
> Tony
>
>   


More information about the HyperDB mailing list