constant already defined in php

Replace this:

define('constant', 'value');

with this:

if (!defined('constant')) define('constant', 'value');

define()

Example:

/* Note the use of quotes, this is important.  This example is checking
 * if the string 'TEST' is the name of a constant named TEST */
if (defined('TEST')) {
    echo TEST;
}