Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Empty Database Password Workaround
While testing vanilla on my local test server, i found that database empty password may cause problems.
Thats why i am offering a workaround for this problem;
Framework.Class.MySQL.php
GetConnection() function:
Replace
$this->Connection = @mysql_connect($this->Context->Configuration['DATABASE_HOST'],
$this->Context->Configuration['DATABASE_USER'],
$this->Context->Configuration['DATABASE_PASSWORD']);
with
if(!isset($this->Context->Configuration['DATABASE_PASSWORD']) || ($this->Context->Configuration['DATABASE_PASSWORD'] == "your_vanilla_database_password"))
{
$this->Connection = @mysql_connect($this->Context->Configuration['DATABASE_HOST'],
$this->Context->Configuration['DATABASE_USER']);
}
else
{
$this->Connection = @mysql_connect($this->Context->Configuration['DATABASE_HOST'],
$this->Context->Configuration['DATABASE_USER'],
$this->Context->Configuration['DATABASE_PASSWORD']);
}
Also GetFarmConnection() function:
Replace
$this->FarmConnection = @mysql_connect($this->Context->Configuration['FARM_DATABASE_HOST'],
$this->Context->Configuration['FARM_DATABASE_USER'],
$this->Context->Configuration['FARM_DATABASE_PASSWORD']);
with
if(!isset($this->Context->Configuration['FARM_DATABASE_PASSWORD']) || ($this->Context->Configuration['FARM_DATABASE_PASSWORD'] == "your_vanilla_database_password"))
{
$this->FarmConnection = @mysql_connect($this->Context->Configuration['FARM_DATABASE_HOST'],
$this->Context->Configuration['FARM_DATABASE_USER']);
}
else
{
$this->FarmConnection = @mysql_connect($this->Context->Configuration['FARM_DATABASE_HOST'],
$this->Context->Configuration['FARM_DATABASE_USER'],
$this->Context->Configuration['FARM_DATABASE_PASSWORD']);
}
I think this will solve the empty database password.
Any feedback?
0
This discussion has been closed.
Comments
the easiest way to get vanilla work with a blank database password ist to put
$Configuration['DATABASE_PASSWORD'] = '';
in the conf/database.php which will overwrite the configuration files in appg/ directory. So you don't need to change Vanillas core files (which may change after an Vanilla update).
Also, see this discussion.