Ok I think I have some information which may be of use to you. I was setting this up for a friend so they can play with Moodle, in the end I just rolled back to 2.4 and doubt I will spend too much time on it.
What I notced relates to installing moodle on a sub domain
- Clean 2.4 install works
- Clean 2.5 install fails as it cannot read / write data directory
- I can install Moodle 2.5 by manually creating config.php but then hit the same file upload error you report. Upgrade 2.4 > 2.5 "should" work (I have not tested this) on the same basis, that the config.php has already been created and copied over from your 2.4 installation
The difference between the two clean installs is that Moodle 2.4 and 2.5 auto detect different paths for the dataroot.
If you enable SSH / Shell access on your host and run (from the relevant point):
ls -l subdomains
You will see sub domains are added with a pointer:
moodle -> /var/sites/m/moodle.yourdomain.com/public_html
But the main directory for the site would be
Notice the /y/ and /m/ letters in the paths generated by the first letter of the domain AND the subsequent creation of the sub domain.
You can therefore resolve the moodle directory on TWO possible paths:
So, back to the three cases I gave earlier:
- When you run a clean install of Moodle 2.4 it picks up the correct paths
- When you run a clean install Moodle 2.5 it uses a the alternative subdomain.domain path which does not work
- You can get 2.5 to install by manually creating config.php, at which point you will see the file upload error. If you upgrade from 2.4 > 2.5 it should work as that config file was already correctly created by the 2.4 install and copied back over, but you will (are) hitting the same file upload issue after upgrade.
It does not matter whether you create the file manually or copy it over from 2.4 - 2.5, the point is it is pre-created and does NOT use Moodle 2.5 to build it.
This may be coincidental, but I doubt it.
It seems to me that somewhere else in the code Moodle 2.5 may be picking the alternative path again, possibly retrieving it from code (as it does during the installation process) as opposed to using the correct $CFG->dataroot the config dataroot setting.
At least that is my best guess at this time.
To test this further it would be good to know:
- whether you are also using subdomains
- what results you see when running clean installs of 2.4 and 2.5
Regards the second point, you do not need to actually install Moodle, just look at the first step of the installation where it asks you to confirm the directory paths.