My instant reaction is that your config.php file has errors in it. What is the value of $CONFIG->dataroot?
Installing and upgrading help
writes to a non-existent directory called moodle
This discussion has been locked so you can no longer reply to it.