I have had so many issues installing Moodle and in searching the forums have found that many people had similar issues, though mine perssisted. So I figured I'd write a little guide with my experiences in it to help others in their search.
I'm running moodle with mediatemple.net on a dedicated virtual server. Specs are:
* CentOS release 5 (Final)
* Apache (version 2.2.3)
* Perl (version 5.8.8)
* PHP (version 5.2.5)
* MySQL (version 5.0.22)
This should help with pretty much any Linux/Unix OS on a Vhosts/Plesk setup.
First skip the install.php process and edited the config.php file directly. In order to do this you need to make the folder moodledata outside of your httpdocs directory.
Unfortunately you likely can't do that without root access. So SSH into the server with root and mkdir moodledata in your vhosts/domain.com/ directory.
chmod the directory to 777 (try different permissions once you get it to work). chown the directory with -apache -apache
Now you need to turn off php safe_mode in your php.ini file likely located in your /etc/ folder. Just change safe_mode on to safe_mode off. Then restart your appache server, but if you follow the rest of the instructions you'll need to do that later anyway.
Funny thing is - this will get you past the installation phase. Unfortunately, won't let you do anything inside Moodle. You won't be able to create courses or add users. If you follow your error log it will say open_basedir restrictions in effect, </../../moodledata> is outside the specified path(s). Or something similar.
There are many posts in the forum for ways to deal with open_basedir restrictions and only one of them worked for my vhosts setup...
in /var/www/vhosts/domain.com/conf create a file called vhost.conf
Inside put:
<Directory "/var/www/vhosts/domain.com/httpdocs">
php_admin_flag engine on
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs/:/var/www/vhosts/domain.com/moodledata:/tmp"
</Directory>
If you do this you'll be able add users and even upload users from a csv file with the right plugin. You'll need to enter this command in your SSH console:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com
And restart your server.
Unfortunately, if your setup is like mine, this will still leave you with one more problem. If you try to upload files to sitefiles or to courses it will say "the site administrator needs to fix file permissions". And if you check your server logs it will give you the same open_basedir restrictions error as before.
You also need to create another entry in your vhost.conf file:
<Directory "/var/www/vhosts/domain.com/moodledata">
php_admin_flag engine on
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs/moodledata/:/var/www/vhosts/domain.com:/tmp"
</Directory>
The first entry ensures that httpdocs can write to moodledata but this second one ensures moodledata can write back to httpdocs. Don't forget to:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com
and restart your apache server.
As an alternative, if you want, you MIGHT be able to turn off open_basedir restrictions inside your php.ini file. I didn't get to trying this but have a feeling that it won't work.
The reason it won't work on a vhost setup is that the open_basedir command is located in A LOT OF PLACES, not just php.ini. In some places it's turned on, in others it's turned off. You essentially need to specify whether it's on or off on a PER DOMAIN but also PER DIRECTORY basis.
Hope this helps someone,
-T