Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: 1and1 MySQL installation.

1and1 MySQL installation: Difference between revisions

From MoodleDocs
No edit summary
(Check Your PHP Version In 1and1 control panel.)
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
There are eamples of Moodle beign successfully installed on 1and1 Apache hosted sites. There are some formalities that you must follow. In the config.php file, yuo must use the following format for the listed database variables:
There are examples of Moodle being successfully installed on 1and1 Apache hosted sites. There are some formalities that you must follow. In the config.php file, you must use the following format for the listed database variables:
 
<code php>
$CFG->dbtype = 'mysql';                // mysql or postgres7 (for now)
$CFG->dbhost = ''; // eg localhost or db.isp.com
$CFG->dbname = 'moodle';          // database name, eg moodle
$CFG->dbuser = '';        // your database username
$CFG->dbpass = '';        // your database password
$CFG->prefix = 'mdl_';                // Prefix to use for all table names
</code>
 
Other variables must be defined as follows:
 
<code php>
$CFG->wwwroot  = 'http://www.';
$CFG->dirroot  = '/homepages/12/d123456789/htdocs/yourdirectory';
$CFG->dataroot = '/homepages/12/d123456789/htdocs/moodledata';
</code>
 
So far, this gets me into the Moodle setup program on the server, but I get errors when trying to install Moodle. It can't seem to correctly set up the database. Please edit this page to provide more information to the many users of 1and1. Thank you.
 
----
In my experience you need to add .htaccess file which contains this line
'''AddType x-mapp-php5 .php'''
to your moodle folder 
as described in [https://docs.moodle.org/en/Installation_FAQ#Installation_hangs_when_setting-up_database_tables Installation hangs when setting-up database tables]FAQ.
<p>You also need to use a MySQL 5.0 database for moodle 1.8.</p>
 
----
I can confirm the above. I struggled with a fresh installation of Version 1.9 with a MySQL 5.0 db set up. The addition of
'''AddType x-mapp-php5 .php'''
as a single entry in the .htaccess file of the moodle directory solved the problem - the unattended installation worked well without error.
 
----
 
I also can confirm the above - mostly.  I had trouble to start with because I didn't understand how the 1and1 MySql setup worked and because I took the above instructions literally, thinking that I shouldn't fill in the dbhost, dbuser and dbpass. 
 
 
Here are my settings in config.php - munged a bit for security, but you get  the idea:
 
 
<config.php>
 


$CFG->dbtype    = 'mysql';      // mysql or postgres7 (for now)
$CFG->dbtype    = 'mysql';      // mysql or postgres7 (for now)


$CFG->dbhost    = 'db123.perfora.net';  // eg localhost or db.isp.com
$CFG->dbhost    = 'db8954.perfora.net';  // eg localhost or db.isp.com


$CFG->dbname    = 'db123456789';      // database name, eg moodle
$CFG->dbname    = 'dbXXXXXXX78';      // database name, eg moodle


$CFG->dbuser    = 'dbo123456789';    // your database username
$CFG->dbuser    = 'dboXXXXXXX78';    // your database username


$CFG->dbpass    = 'Gvu8rrqs';    // your database password
$CFG->dbpass    = 'MyPassword';    // your database password


$CFG->prefix    = 'mdl_';        // Prefix to use for all table names
$CFG->prefix    = 'mdl_';        // Prefix to use for all table names


$CFG->wwwroot  = 'http://basener.org/moodle';      // real site - go take a look
$CFG->dirroot  = '/homepages/4/d3XXXXXXXX/htdocs/moodle';
$CFG->dataroot  = '/homepages/4/d3XXXXXXXX/htdocs/moodledata';
</config.php>
I can't speak to the necessity of the .htaccess file, I just used it and it worked fine.  I never tried without.
Just as a note.  After installing Moodle 1.9.11 I tried Moodle 2.0.2 without much success.  After messing around with the Unicode settings in the database I got the installation to run to a point where it apparently ran out of RAM (memory allocation error).  I just accessed the site after that and it seemed to work, I was able to set up the admin account.  But after that I kept trying things that would result in blank pages.  So I reverted to 1.9.  2.0 is pretty  slick and I run it at work, but I would rather have a working system than 'slick'.


other variables must be defined as follows:




$CFG->wwwroot  = 'http://www.yoururl.com';


$CFG->dirroot  = '/homepages/12/d123456789/htdocs/yourdirectory';
[[Category:Installation]]


$CFG->dataroot  = '/homepages/12/d123456789/htdocs/moodledata';
Apart from the above steps check in your 1and1 Control Panel (Web Space -> Global PHP Version) and select the from the drop down the right PHP version. After some research I found from various discussions that adding this to the root htaccess also worked for many people.


So far, this gets me into the Moodle setup program on theserver, but I get errors when trying to install Moodle. It can't seem to correctly set up the database. Please edit this page to provide more information to the many users of 1and1. Thanks you.
AddType x-mapp-php5 .php
AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php

Latest revision as of 01:58, 27 November 2013

There are examples of Moodle being successfully installed on 1and1 Apache hosted sites. There are some formalities that you must follow. In the config.php file, you must use the following format for the listed database variables:

$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now) $CFG->dbhost = ; // eg localhost or db.isp.com $CFG->dbname = 'moodle'; // database name, eg moodle $CFG->dbuser = ; // your database username $CFG->dbpass = ; // your database password $CFG->prefix = 'mdl_'; // Prefix to use for all table names

Other variables must be defined as follows:

$CFG->wwwroot = 'http://www.'; $CFG->dirroot = '/homepages/12/d123456789/htdocs/yourdirectory'; $CFG->dataroot = '/homepages/12/d123456789/htdocs/moodledata';

So far, this gets me into the Moodle setup program on the server, but I get errors when trying to install Moodle. It can't seem to correctly set up the database. Please edit this page to provide more information to the many users of 1and1. Thank you.


In my experience you need to add .htaccess file which contains this line AddType x-mapp-php5 .php to your moodle folder as described in Installation hangs when setting-up database tablesFAQ.

You also need to use a MySQL 5.0 database for moodle 1.8.


I can confirm the above. I struggled with a fresh installation of Version 1.9 with a MySQL 5.0 db set up. The addition of AddType x-mapp-php5 .php as a single entry in the .htaccess file of the moodle directory solved the problem - the unattended installation worked well without error.


I also can confirm the above - mostly. I had trouble to start with because I didn't understand how the 1and1 MySql setup worked and because I took the above instructions literally, thinking that I shouldn't fill in the dbhost, dbuser and dbpass.


Here are my settings in config.php - munged a bit for security, but you get the idea:


<config.php>


$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)

$CFG->dbhost = 'db8954.perfora.net'; // eg localhost or db.isp.com

$CFG->dbname = 'dbXXXXXXX78'; // database name, eg moodle

$CFG->dbuser = 'dboXXXXXXX78'; // your database username

$CFG->dbpass = 'MyPassword'; // your database password

$CFG->prefix = 'mdl_'; // Prefix to use for all table names

$CFG->wwwroot = 'http://basener.org/moodle'; // real site - go take a look


$CFG->dirroot = '/homepages/4/d3XXXXXXXX/htdocs/moodle';

$CFG->dataroot = '/homepages/4/d3XXXXXXXX/htdocs/moodledata';


</config.php>


I can't speak to the necessity of the .htaccess file, I just used it and it worked fine. I never tried without.


Just as a note. After installing Moodle 1.9.11 I tried Moodle 2.0.2 without much success. After messing around with the Unicode settings in the database I got the installation to run to a point where it apparently ran out of RAM (memory allocation error). I just accessed the site after that and it seemed to work, I was able to set up the admin account. But after that I kept trying things that would result in blank pages. So I reverted to 1.9. 2.0 is pretty slick and I run it at work, but I would rather have a working system than 'slick'.

Apart from the above steps check in your 1and1 Control Panel (Web Space -> Global PHP Version) and select the from the drop down the right PHP version. After some research I found from various discussions that adding this to the root htaccess also worked for many people.

AddType x-mapp-php5 .php AddType x-mapp-php6 .php AddHandler x-mapp-php6 .php