Changes

From SME Server
Jump to navigationJump to search
231 bytes added ,  02:29, 10 March 2009
Line 249: Line 249:  
===Application templates===
 
===Application templates===
   −
Include the original application config file in the templates directory, <br>
+
Preferably include the original application config file in the templates directory, <br>
 
then overwrite key values, some of which we keep in SME DB's
 
then overwrite key values, some of which we keep in SME DB's
    +
This is not always possible, eg your application modifies the config file <br>
 +
in this case leave the config file untemplated and advise the user how to configure manually.
    
eg . root\etc\template\opt\foo\config.php
 
eg . root\etc\template\opt\foo\config.php
Line 286: Line 288:  
  // SME Server Settings
 
  // SME Server Settings
 
  {
 
  {
    $OUT .= "\$CFG->dbname  = \'$foo{DbName}\'\; \n";
+
  $OUT .= "\$CFG->dbname  = ini_get\(\'mysql.default_host\'\)\; \n";
    $OUT .= "\$CFG->dbuser  = \'$foo{DbUser}\'\; \n";
+
  $OUT .= "\$CFG->dbuser  = ini_get\(\'mysql.default_user\'\)\; \n";
    $OUT .= "\$CFG->dbpass  = \'$foo{DbPassword}\'\; \n";
+
  $OUT .= "\$CFG->dbpass  = ini_get\(\'mysql.default_password\'\)\; \n";
    $OUT .= "\$CFG->dirroot  = \'/opt/foo'\; \n";
+
  $OUT .= "\$CFG->dirroot  = \'/opt/foo'\; \n";
  }
+
  {
    
===Spec file===
 
===Spec file===

Navigation menu