eZ Community » Forums » Install & configuration » Undefined variable: 'SlaveServerPort'...
expandshrink

Undefined variable: 'SlaveServerPort' in group 'DatabaseSettings' in site.ini

Undefined variable: 'SlaveServerPort' in group 'DatabaseSettings' in site.ini

Thursday 12 December 2013 10:44:45 am - 1 reply

Hello,

When using a MySQL slave server, this error appear every second in the error.log.

The cluster Master/Slave is working correctly as I can see my MySQL server load getting higher.

I am under EzPublish 4.4.0

My site.ini looks like this (I have to comment out those lines or it seems the site.ini.append.php doesn't seems to fully overrides the values) :

#UseSlaveServer=disabled
<span style="font-size: 1.1em;">#SlaveServerArray[]=localhost
#SlaveServerPort[]=3306
#SlaveServerUser[]=nextgen
#SlaveServerPassword[]=nextgen
#SlaveServerDatabase[]=nextgen</span>

 

If I don't comment those lines but still have DB info in the site.ini.append.php error log show this :

 Connection error: Couldn't connect to database. Please try again later or inform 
the system administrator.Access denied for user 'apache'@'WebServer' 
(using password: NO)[ Dec 12 2013 10:33:11 ] Unexpected error, the message was : 
Unable to connect to the database server 'sql_server' in /var/www/site/ezpublish-4.4.0/lib/ezdb/classes/ezmysqlidb.php on line 144

 

If I fill in the settings to match my environment, I have the same error message 

 Undefined variable: 'SlaveServerPort' in group 'DatabaseSettings' in site.ini

 

Having this in my site.ini.append.php

UseSlaveServer=enabled
SlaveServerArray[]=mysql_server
SlaveServerPort[]=3306
SlaveServerUser[]=my_DBUser
SlaveServerPassword[]=my_PWD
SlaveServerDatabase[]=my_DB

 

Generate this :

Connection error: Couldn't connect to database. Please try again later or inform the system 
administrator.Access denied for user 'apache'@'WebServer' (using password: NO)
[ Dec 12 2013 10:22:26 ] Unexpected error, the message was : Unable to connect to the
 database server 'mysql_server' in /var/www/site/ezpublish-4.4.0/lib/ezdb/classes/ezmysqlidb.php on line 144

 

As the documentation said (http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/DatabaseSettings/UseSlaveServer), using this (note the "R"blunk.gif Emoticon:

Slave<strong>r</strong>ServerPort[]=3306
Slave<strong>r</strong>ServerUser[]=my_DBUser
Slave<strong>r</strong>ServerPassword[]=my_PWD
Slave<strong>r</strong>ServerDatabase[]=my_DB

"only" generate this, but still strange

 Undefined variable: 'SlaveServerPort' in group 'DatabaseSettings' in site.ini

 

Any ideas ?

Thank you

Monday 16 December 2013 2:59:38 pm

Hello Cyril,

You must set the settings in the group [DatabaseSettings] as below:

[DatabaseSettings]
UseSlaveServer=enabled
SlaveServerArray[]=localhost
SlaveServerPort[]=
SlaverServerUser[]=nextgen
SlaverServerPassword[]=nextgen
SlaverServerDatabase[]=nextgen

Look the default site.ini in settings/

I hope this helps.

Matthieu

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from