Skip to content

Instantly share code, notes, and snippets.

@jmikola
Created June 23, 2010 04:49
Show Gist options
  • Save jmikola/449515 to your computer and use it in GitHub Desktop.
Save jmikola/449515 to your computer and use it in GitHub Desktop.
Symfony 1.4 ProjectConfiguration for ServerGrove with local vendor/symfony fallback
<?php
/**
* ServerGrove's shared Symfony libraries are not accessible within chrooted
* sessions on shared hosting, which means the symfony console command is
* unusable. The following conditional will allow you to fall back to a
* local copy of Symfony in your project's vendor directory and still make
* use of ServerGrove's up-to-date libraries elsewhere.
*
* Note: you likely won't have access to Doctrine or Propel commands, since
* database connectivity is restricted from the shell.
*
* @link http://secure.servergrove.com/clients/knowledgebase.php?action=displayarticle&id=101
*/
if (is_readable('/usr/local/php/symfony14/lib/autoload/sfCoreAutoload.class.php')) {
require_once '/usr/local/php/symfony14/lib/autoload/sfCoreAutoload.class.php';
} else {
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
}
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration {
public function setup() {
// Enable plugins
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment