Forum

Thread tagged as: Question

Can you define RESPATH more than once in a config.php file?

e.g.

<?php
define('PERCH_LICENSE_KEY','');
define('PERCH_DB_SERVER','localhost');

$http_host = getenv('HTTP_HOST');
switch($http_host)
{
default:
define('PERCH_DB_DATABASE','');
define('PERCH_DB_USERNAME','');
define('PERCH_DB_PASSWORD','');
define('PERCH_DB_PREFIX','perch2_');
define('PERCH_RESFILEPATH','/home/public_html/images/');
break;

case('example.com'):
define('PERCH_DB_DATABASE','');
define('PERCH_DB_USERNAME','');
define('PERCH_DB_PASSWORD','');
define('PERCH_DB_PREFIX','perch2_');
define('PERCH_RESFILEPATH','/work/public_html/images/');
break;

case('localhost'):
define('PERCH_DB_DATABASE','');
define('PERCH_DB_USERNAME','');
define('PERCH_DB_PASSWORD','');
define('PERCH_DB_PREFIX','perch2_');
define('PERCH_RESFILEPATH','C:/Program Files (x86)/Ampps/www/images/');
break;
}

define('PERCH_RESPATH','/images');

define('PERCH_TZ','Australia/Sydney');

define('PERCH_EMAIL_FROM','');
define('PERCH_EMAIL_FROM_NAME','');

define('PERCH_LOGINPATH','/perch');
define('PERCH_PATH',str_replace(DIRECTORY_SEPARATOR.'config','', __DIR__));
define('PERCH_CORE',PERCH_PATH.DIRECTORY_SEPARATOR.'core');

define('PERCH_HTML5',true);
define('PERCH_DEBUG',false);

define('PERCH_PRODUCTION_MODE','PERCH_DEVELOPMENT');
?>

Thank you

Garth Holmes

Garth Holmes 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

No, you would use resource buckets in that scenario.

Also, you do realise you posted your license key into a public forum?

Actually, it works funnily enough, I tested it and as for the second point, while it may be foolish I have found Perch technology actually knows which domains and when I am using them but yes it can't/won't happen again.

Thanks Rachel