Fix DOCUMENT_ROOT using same method as Yii