I need to install two different projects developed with Symfony 1.4. Each project is independent, with its own database and configuration. I need something like the following:
/project1/apps
/project1/config
/project1/lib
.
.
.
/project2/apps
/project2/config
/project2/lib
.
.
.
/htdocs/project1/index.php
/htdocs/project2/index.php
How should I set up index.php and ProjectConfiguration.class.php files, each project? I tried several options but none of them work. The last option I tried was:
index.php:
<?php
require_once('/../project1/config/ProjectConfiguration.class.php');
And ProjectConfiguration.class.php :
<?php
require_once '/../project1/lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins('sfDoctrinePlugin');
$this->setWebDir($this->getRootDir().'/htdocs/project1');
$this->setCacheDir('/tmp/symfony_cache');
$this->setLogDir('/tmp/symfony_logs');
But it does not work:
Warning: require_once(/../project1/config/ProjectConfiguration.class.php): failed to open stream: No such file or directory in /www/mydomain.com/htdocs/project1/index.php on line 2
Fatal error: require_once(): Failed opening required '/../project1/config/ProjectConfiguration.class.php' (include_path='./:/usr/local/php5.4/lib/php') in /www/mydomain.com/htdocs/project1/index.php on line 2