2009. február 12., csütörtök

Symfony 1.0 bug - open_basedir restriction in effect

I have been using symfony for about 3 years, but never had the problem which is now made me thinking after uploading a site to a german shared host:

Warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/messages.xml) is not within the allowed path(s) ...


After a bit of search I found the forum post about it. This is not really a bug, so there is no solution for it but you can find a patch, that solved me the problem.

if (sfConfig::get('sf_i18n'))
{
$this->context->getI18N()->setMessageSourceDir(sfLoader::getI18NDir($moduleName), $this->context->getUser()->getCulture());
if (sfLoader::getI18NDir($moduleName))
{
$this->context->getI18N()->setMessageSourceDir(sfLoader::getI18NDir($moduleName), $this->context->getUser()->getCulture());
}
else
{
$this->context->getI18N()->setMessageSourceDir(sfConfig::get('sf_app_i18n_dir'), $this->context->getUser()->getCulture());
}

Hello

Hey to all symfony developer!

Some recent project made me to return to symfony, so I thougth to start a blog writing my findings about bugs, solutions, opportunities and everything about symfony.

I hope it will be helpful for a lots of people.

Eshton