Thursday, 20 March 2014

roundcubemail customisation and installation

SETUP

setting up roundcube mail

1. Install the RPM and dependencies.

2.

      mysql -u root -p' .... ' < '

 

      create database roundcubemail;

 

      create user roundcube@localhost identified by 'somepass';

 

      grant all on roundcubemail.* to roundcube@localhost;

 

    flush privileges;'

3. then

mysql -u root -p roundcubemail < /usr/share/doc/roundcubemail-0.9.5/SQL/mysql.initial.sql

4. then
edit

/etc/roundcubemail/db.inc.php

edit line to say

$rcmail_config['db_dsnw'] = 'mysql://roundcube:somepass@localhost/roundcubemail';

5. then
edit

/etc/httpd/conf/httpd.conf

and add the following directive

      Alias /roundcube/ "/usr/share/roundcubemail/"

 

      <Directory "/usr/share/roundcubemail/">

 

      AllowOverride All

 

      Options Indexes All

 

      Order allow,deny

 

      Allow from all

 

    </Directory>


Done.

6. Go to <your host domain name (not FQDN) > /roundcube/

CUSTOMISATION and ERRORS

1. ensure that /usr/share/roundcubemail/logs exists and is owned by apache. Create a file 'error' in there with the same ownership.

mkdir -p  /usr/share/roundcubemail/logs

touch /usr/share/roundcubemail/logs/error

chown -R apache:apache  /usr/share/roundcubemail/logs

chmod -R 775  /usr/share/roundcubemail/logs

2. set the same ownership on /etc/roundcubemail

the symptom is a white screen and this error in apache log:

DB Error: Configuration error. Unsupported database driver: in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db. php on line 75 (GET /roundcubemail/)

              chown -R apache:apache    /etc/roundcubemail

edit 

               db.inc.php and put in the database password and username

3. Moaning about the timezone:

you have to edit the offending files and insert your timezone, e.g.

date_default_timezone_set('Africa/Johannesburg');

line 436 or thereabouts of file rcube_config.php is particularly different:

$timezone='Africa/Johannesburg';

return $timezone; #; date_default_timezone_get();  /*jmo */

all other files you can just put

date_default_timezone_set('Africa/Johannesburg');

the file rcube.php (line 1023) needs this too. 

4. Moaning about missing tables:


login to mysql and create a database roundcubemail

create database roundcubemail character set utf8;

grant all on roundcubemail.* to 'roundcube'@'localhost' identified by 'somepass'; 

then on the commandline (bash):

             mysql roundcubemail -u root -p < /usr/share/doc/roundcubemail-0.9.5/SQL/mysql.initial.sql

 

5. Setting it to use Gmail:

edit  

               main.inc.php

and tell it

$rcmail_config['default_host'] = 'ssl://imap.gmail.com';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 993;

6. To customise it

             Edit /usr/share/roundcubemail/skins/larry or classic

Wednesday, 19 March 2014

php complaining about dates

If you get this error

date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.

then just manually put the following code (With appropriate changes) into your code, just before any call to date() or anything related.

date_default_timezone_set('Africa/Johannesburg');

That fixes it.

Friday, 7 March 2014

the "hobbit" homo floresiensis

@katewong @sciam big diff betw. florensiensis and sediba. Face angle to start with. Age also differs by well over 2my

@johnostrowick Interested b/c both species show surprising combos of Australopithecus & Homo traits, & b/c flores ancestor is a big mystery

@katewong @sciam I "scarequoted" "new" as Jungers dates to 2009 - Vol 459|7 May 2009|doi:10.1038/nature07989 The foot of Homo floresiensis

List of useful mac apps

This is mostly a note to self so that I can share with others when they ask which apps I recommend. Android File Transfer.app (*) get file...