Hi i swtiched hosting companies And now i'm finding these things in error_log that i think its causing alot of things to go bad on the website, including not forcing the users to login anymore ebfore seeing content, some bases dont load here's the error [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 6 [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 7 [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 8 [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 9 [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 10 [23-Oct-2011 17:05:25] PHP Warning: define() expects at least 2 parameters, 1 given in /home/ffffsu/includes/init.php on line 11 Code (markup): here's init.php <?php /** define real path */ $path = str_replace('init.php','',realpath(__FILE__)); $root = str_replace('includes/','',$path); /** DOMAIN needs changing */ define('DOMAIN') ? null : define('DOMAIN', 'XXXXX.su'); define('DS') ? null : define('DS', DIRECTORY_SEPARATOR); define('ROOT') ? null : define('ROOT', $root); define('WEB_ROOT') ? null : define('WEB_ROOT', $root.'public_html'); define('LIB_PATH') ? null : define('LIB_PATH', $path); define('WEB_PATH') ? null : define('WEB_PATH', 'http:'.DS.DS.DOMAIN.DS); #special #main functions require_once(LIB_PATH."functions.php"); #database functions functions require_once(LIB_PATH."database.php"); #system functions require_once(LIB_PATH."session.php"); #extra functions require_once(LIB_PATH."user.php"); #custom functions require_once(LIB_PATH."tbl.php"); ?> Code (markup): anybody any help?
<?php /** define real path */ $path = str_replace('init.php','',realpath(__FILE__)); $root = str_replace('includes/','',$path); /** DOMAIN needs changing */ define('DOMAIN', 'XXXXX.su'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', $root); define('WEB_ROOT', $root.'public_html'); define('LIB_PATH', $path); define('WEB_PATH', 'http:'.DS.DS.DOMAIN.DS); #special #main functions require_once(LIB_PATH."functions.php"); #database functions functions require_once(LIB_PATH."database.php"); #system functions require_once(LIB_PATH."session.php"); #extra functions require_once(LIB_PATH."user.php"); #custom functions require_once(LIB_PATH."tbl.php"); ?> PHP: The ternary operator method isn't really needed.....