Forums | Mahara Community

Support /
Mahara: Site Unavailable


anonymous profile picture
Account deleted
Posts: 5

26 February 2013, 2:51

Cannot install on XAMPP, after doing the necessary alterations to the config.php I still get this damn site:

Mahara: Site Unavailable

Mahara could not connect to the application database.

* If you are using Mahara, please wait a minute and try again
* If you are the administrator, please check your database settings and make sure your database is available

The error received was:
mysql error: [1231: Variable 'sql_mode' can't be set to the value of 'POSTGRESQL'] in EXECUTE("SET SQL_MODE='POSTGRESQL'")
 
The config.php is this:

//
// MAHARA CONFIGURATION FILE
//
// Copy this file from config-dist.php to config.php, and change the values in
// it to suit your environment.
//
// Information about this file is available on the Mahara wiki:
// http://wiki.mahara.org/System_Administrator's_Guide/Installing_Mahara#Create_Mahara's_config.php
//

$cfg = new StdClass;


// database connection details
// valid values for dbtype are 'postgres8' and 'mysql5'
$cfg->dbtype = 'mysql5';
$cfg->dbhost = 'localhost';
$cfg->dbport = null;
$cfg->dbname = 'mahara';
$cfg->dbuser = 'mahara';
$cfg->dbpass = 'mahara';

// Note: database prefix is NOT required, you don't need to set one except if
// you're installing Mahara into a database being shared with other
// applications (this happens most often on shared hosting)
$cfg->dbprefix = '';

// wwwroot - the web-visible path to your Mahara installation
// Normally, this is automatically detected - if it doesn't work for you
// then try specifying it here.
// This value must end with a /
$cfg->wwwroot = 'http://localhost/ma/';
// If you want to serve all of your Mahara content via HTTPS, just set
// $cfg->wwwroot to use HTTPS.
//$cfg->wwwroot = 'https://myhost.com/mahara/';

// If you are using a proxy to force HTTPS connections, you will need to
// enable the next line. If you have set this to true, ensure your wwwroot
// is a HTTPS address.
//$cfg->sslproxy = true;

// dataroot - uploaded files are stored here
// This is a ABSOLUTE FILESYSTEM PATH. This is NOT a URL.
// For example, valid paths are:
// * /home/user/maharadata
// * /var/lib/mahara
// * c:\maharadata
// INVALID paths:
// * http://yoursite/files
// * ~/files
// * ../data
//
// This path must be writable by the webserver and outside document root (the
// place where the Mahara files like index.php have been installed).
// Mahara will NOT RUN if this is inside your document root, because
// this is a big security hole.
$cfg->dataroot = 'C:\\xampp\\upload';

// If set, this email address will be displayed in the error message if a form
// submission is suspected of being spam. This reduces the frustration for the
// user in the event of a false positive.
$cfg->emailcontact = '[email protected]';

// Set this to enable a secondary hash that is only present in the config file
// $cfg->passwordsaltmain = 'some long random string here with lots of characters';

// When changing the salt (or disabling it), you will need to set the current salt as an alternate salt
// There are up to 20 alternate salts
// $cfg->passwordsaltalt1 = 'old salt value';

// Uncomment the following line if this server is not a production system.
// This will put a line up the top of the page saying that it isn't a production
// site, and that files may not be present.
//$cfg->productionmode = false;

// closing php tag intentionally omitted to prevent whitespace issues

-----

 That's a reason why I can't warm up with OpenSource. You ALWAYS have problems at first. I works NEVER: download install run... sigh.

anonymous profile picture
Account deleted
Posts: 197

26 February 2013, 11:55

Hi Bastian,

What version of xampp are you using?

Thanks,
Melissa.

anonymous profile picture
Account deleted
Posts: 5

27 February 2013, 2:18

The newest one. XAMPP 1.8.1 downloaded yesterday. BTW I installed other programs on XAMPP like limesurvey for testing and they work. So it it is unlikely that it is a problem of XAMPP or the MYSQL setup.

Aaron Wells's profile picture
Posts: 896

28 February 2013, 17:15

Hm, so it doesn't seem to be a version problem. XAMPP 1.8.1 includes MySQL version 5.5.27, which is new enough.

The specific statement it's choking on is SET SQL_MODE='POSTGRESQL'; , which Mahara does after initiating a connection to a mysql database. See http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#sqlmode_postgresql for more specifics about what this does.

Can you try manually connecting to mysql, as the same user Mahara is using, and running the query SET SQL_MODE='POSTGRESQL'; ? Perhaps it's a user permissions issue or a mysql configuration issue.

Cheers,

Aaron

anonymous profile picture
Account deleted
Posts: 25

28 February 2013, 23:07

Then that basically means that the server is not being able to find data root maharadata. I would suggest you to create a another directory first, give permission then change the dataroot. I think this way it should perfectly work.

5 results