fix path problems 
replace $_SERVER['document_root'] with $config['site_path']