Skip to content

Instantly share code, notes, and snippets.

@gladson
Created December 11, 2012 04:00
Show Gist options
  • Save gladson/4255794 to your computer and use it in GitHub Desktop.
Save gladson/4255794 to your computer and use it in GitHub Desktop.
example configuration file for running Joomla on AppFog
<?php
class JConfig {
/* Site Settings */
public $offline = '0';
public $offline_message = 'This site is down for maintenance.<br /> Please check back again soon.';
public $sitename = '';
public $editor = 'tinymce';
public $list_limit = '10';
public $legacy = '0';
/* Debug Settings */
public $debug = '0';
public $debug_lang = '0';
/* Server Settings */
public $live_site = '';
public $secret = '';
public $gzip = '1';
public $error_reporting = '-1';
public $helpurl = 'http://help.joomla.org';
public $xmlrpc_server = '0';
public $ftp_host = '127.0.0.1';
public $ftp_port = '21';
public $ftp_user = '';
public $ftp_pass = '';
public $ftp_root = '';
public $ftp_enable = '0';
public $force_ssl = '0';
/* Locale Settings */
public $offset = '10';
public $offset_user = '0';
/* Mail Settings */
public $mailer = '';
public $mailfrom = '';
public $fromname = '';
public $sendmail = '/usr/sbin/sendmail';
public $smtpauth = '';
public $smtpsecure = '';
public $smtpport = '';
public $smtpuser = '';
public $smtppass = '';
public $smtphost = '';
/* Cache Settings */
public $caching = '0';
public $cachetime = '1440';
public $cache_handler = 'file';
/* Meta Settings */
public $MetaDesc = '';
public $MetaKeys = '';
public $MetaTitle = '1';
public $MetaAuthor = '0';
/* SEO Settings */
public $sef = '1';
public $sef_rewrite = '1';
public $sef_suffix = '0';
/* Feed Settings */
public $feed_limit = 10;
public $feed_email = 'site';
/* Session Setting */
public $lifetime = '30';
public $session_handler = 'database';
/* Database Settings */
public $dbtype = 'mysql';
public $dbprefix = 'psz_';
/* AppFog stuff */
public function __construct() {
/* appfog variables */
$services = getenv("VCAP_SERVICES");
$services_json = json_decode($services,true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
$db = $mysql_config["name"];
$user = $mysql_config["user"];
$password = $mysql_config["password"];
$host = $mysql_config["hostname"];
/* DB settings */
$this->db = $db;
$this->host = $host;
$this->user = $user;
$this->password = $password;
/* path variables */
$log_path = $_SERVER['DOCUMENT_ROOT'] . "/logs";
$tmp_path = $_SERVER['DOCUMENT_ROOT'] . "/tmp";
/* Path Settings */
$this->log_path = $log_path;
$this->tmp_path = $tmp_path;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment