setting base dir based upon document_root