Installing Mahara from source on Debian SID.
Hi,
on my Debian GNU/Linux unstable (sid) Desktop machine I want to install
Mahara ( https://mahara.org/ ) from source:
https://launchpad.net/mahara/1.8/1.8.1/+download/mahara-1.8.1.tar.gz
I'm trying to follow this tutorial:
https://wiki.mahara.org/index.php/System_Administrator%27s_Guide/Installing_Mahara/How_to_install_Mahara_in_Ubuntu
but I want to do it in a little different way:
1.
I have installed all dependencies.
2.
I have unpacked mahara/htdocs/ directory that I did copy to:
/usr/share/mahara/htdocs/
The permissions of this directory and subdirectories, files are:
$ ls -l /usr/share/mahara/
total 84
-rw-rw-r-- 1 root root 35147 Dec 17 23:57 COPYING
-rw-rw-r-- 1 root root 32103 Dec 17 23:57 ChangeLog
-rw-rw-r-- 1 root root 2415 Dec 17 23:57 Makefile
-rw-rw-r-- 1 root root 3652 Dec 17 23:57 README
drwxrwxr-x 26 root root 4096 Jan 10 21:49 htdocs
-rw-rw-r-- 1 root root 561 Dec 17 23:57 phpunit.xml
3.
make the mahara directory here:
/var/lib/mahara/
sudo chown -R www-data:www-data /var/lib/mahara/
4.
Configure the Database:
sudo su - postgres
createuser -SRDP mahara
[password]
[confirm password]
createdb -O mahara -EUTF8 mahara
exit
5.
Configure Apache2:
This want I edit so so it should correspond to
/etc/apache2/sites-enabled/moodle.conf
because it doesn't uses Virtualhost, but Aliase and I want not to use
Virtualhost on my Apache2 server.
So, in
moodle.conf I have following:
<code>
Alias /moodle /usr/share/moodle/
<Directory /usr/share/moodle/>
Options +FollowSymLinks
AllowOverride None
order deny,allow
deny from all
allow from 127.0.0.0/8
allow from localhost
<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag file_uploads On
php_flag session.auto_start Off
php_flag session.bug_compat_warn Off
php_value upload_max_filesize 2M
php_value post_max_size 2M
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
</code>
So, I edited the mahara.conf like:
sudo nano /etc/apache2/sites-available/mahara.conf
<code>
Alias /mahara /usr/share/mahara/htdocs/
<Directory /usr/share/mahara/htdocs/>
Options +FollowSymLinks
AllowOverride None
order deny,allow
deny from all
allow from 127.0.0.0/8
allow from localhost
</Directory>
</code>
sudo a2ensite mahara.conf
6.
Mahara Configuration
cd /usr/share/mahara/htdocs/
sudo cp config-dist.php config.php
sudo nano config.php
<code>
$cfg = new stdClass();
$cfg->dbtype = 'postgres';
$cfg->dbhost = 'localhost';
$cfg->dbport = null;
$cfg->dbname = 'mahara';
$cfg->dbuser = 'mahara';
$cfg->dbpass = 'SecretPassword';
$cfg->dbprefix = '';
$cfg = new stdClass();
$cfg->wwwroot = 'http://localhost/mahara/';
$cfg->dataroot = '/var/lib/mahara';
$cfg->directorypermissions = 0750;
$cfg->emailcontact = '';
$cfg->passwordsaltalt1 = 'old salt value';
</code>
sudo /etc/init.d/apache2 restart
Now, when I open in my Internet Browser site:
http://localhost/mahara/
I get error messages:
[WAR] f0 Creating default object from empty value
Call stack (most recent first):
log_message("Creating default object from empty value", 8, true,
true, "/usr/share/mahara/htdocs/config.php", 32) at
/usr/share/mahara/htdocs/lib/errors.php:430
error(2, "Creating default object from empty value",
"/usr/share/mahara/htdocs/config.php", 32, array(size 11)) at
/usr/share/mahara/htdocs/config.php:32
require("/usr/share/mahara/htdocs/config.php") at
/usr/share/mahara/htdocs/init.php:69
require("/usr/share/mahara/htdocs/init.php") at
/usr/share/mahara/htdocs/index.php:16
Mahara: Site unavailable
Your server configuration references an unknown database type. Valid
values are "postgres" and "mysql". Please change the database type
setting in config.php.
As one can see, I have already "postgres" in the config.php file.
What could be the problem here?
--
Regards from Pal
Reply to: