Fixing PHP fatal errors due relative paths