Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:102:\"Declaration of views_plugin_style_default::options() should be compatible with views_object::options()\";s:5:\"%file\";s:102:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/views/plugins/views_plugin_style_default.inc\";s:5:\"%line\";i:24;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:151:\"Declaration of calendar_plugin_display_page::options_submit() should be compatible with views_plugin_display_page::options_submit(&$form, &$form_state)\";s:5:\"%file\";s:108:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_plugin_display_page.inc\";s:5:\"%line\";i:297;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:104:\"Declaration of calendar_plugin_display_page::options() should be compatible with views_object::options()\";s:5:\"%file\";s:108:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_plugin_display_page.inc\";s:5:\"%line\";i:297;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:105:\"Declaration of calendar_plugin_display_block::options() should be compatible with views_object::options()\";s:5:\"%file\";s:109:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_plugin_display_block.inc\";s:5:\"%line\";i:78;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:163:\"Declaration of calendar_plugin_display_attachment::options_submit() should be compatible with views_plugin_display_attachment::options_submit(&$form, &$form_state)\";s:5:\"%file\";s:114:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc\";s:5:\"%line\";i:242;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:110:\"Declaration of calendar_plugin_display_attachment::options() should be compatible with views_object::options()\";s:5:\"%file\";s:114:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc\";s:5:\"%line\";i:242;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:151:\"Declaration of calendar_plugin_display_ical::options_submit() should be compatible with views_plugin_display_page::options_submit(&$form, &$form_state)\";s:5:\"%file\";s:113:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/calendar_ical/calendar_plugin_display_ical.inc\";s:5:\"%line\";i:217;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:134:\"Declaration of date_handler_field_multiple::pre_render() should be compatible with content_handler_field_multiple::pre_render($values)\";s:5:\"%file\";s:99:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/date/date/date_handler_field_multiple.inc\";s:5:\"%line\";i:185;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:102:\"Declaration of calendar_view_plugin_style::options() should be compatible with views_object::options()\";s:5:\"%file\";s:106:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/includes/calendar_view_plugin_style.inc\";s:5:\"%line\";i:173;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:136:\"Declaration of calendar_plugin_style_ical::init() should be compatible with views_plugin_style::init(&$view, &$display, $options = NULL)\";s:5:\"%file\";s:111:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc\";s:5:\"%line\";i:254;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'o4077762'@'infong892.perfora.net' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:14:\"strict warning\";s:8:\"%message\";s:102:\"Declaration of calendar_plugin_style_ical::options() should be compatible with views_object::options()\";s:5:\"%file\";s:111:\"/homepages/27/d313962189/htdocs/poon.co/sites/all/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc\";s:5:\"%line\";i:254;}', 3, '', 'http://poon.co/node?page=2', '', '18.208.126.232', 1660309135) in /homepages/27/d313962189/htdocs/poon.co/includes/database.mysql.inc on line 135
Lawrence Poon | a knowledge worker and lifelong learner

Quick and Dirty Single Sign On for Moodle and Drupal

The following procedures are only a temporary solution to solve the Single Sign On challenge for Moodle and Drupal. It is not a proper way to solve the problems, I am sure it is not secure in anyway. I will stop using this method once the proper way was found. You had been warned.

Drupal and Moodle are on the same domain mydomain.com and they can be accessed
from http://www.mydomain.com and http://www.mydomain.com/moodle.

Install Moodle 2.2 with Postgresql on Red Hat Linux 6.4 x86_64

I had installed Moodle with MySQL many times on Red Hat Linux, it is my first time to use Postgresql. I wanted to install Moodle 2.2 on a DEV server, I am not concerned about the security. I thought it is as easy as with MySQL, I was wrong. Moodle failed to connect to Postgresql server, the following steps solved the problem.

1. Add Optional Channel, otherwise some of modules such as php-mbstring cannot be installed.

rhn-channel --add --channel=rhel-x86_64-server-optional-6
yum install php-mbstring

2. Disable SELinux
vi /etc/selinux/config
SELINUX = disabled

@ASK 7" Android 4.1.1 Tablet

I brought an 7" Android 4.1.1 tablet when I was travelling to Hong Kong and Beijing last year. I brought it from a store inside Golden Computer Centre at Shamshuipo, Hong Kong. The model is @ASK 780SP 3G Smart Pad. I paid HK$980 for it. You may be able to pay less if you bargain. According to the manufacturer website http://www.uthk.com/, the tablet was designed in Japan.

Features:
Dual Cortex 1.8GHz CPU w/ 1G DDR3 RAM
High Definition display
MicroSD slot up to 32GB Storage
MicroHDMI output

Writing Excel file with PHP

Tagged:  

I need to export data from MySQL and import them to Oracle. CSV is the first format came out from my mind. After a couple of trials, I still have problems importing them to Oracle. The data seems not aligned properly. I had tried to remove all tab (\t), new line(\n or \r\n) or carriage return (\r) characters from the data, I am still out of luck.
<?php
function clean_data($str){

//$str = preg_replace("/\t/", "\\t", $str);
$str = preg_replace("/\t/", "", $str);
//$str = preg_replace("/\r?\n/", "\\n", $str);
$str = preg_replace("/\r?\n/", "", $str);

Install 4Store on Ubuntu 12.04

4store is a database storage and query engine that holds RDF data.
I am experimenting using 4store as a backend for my Semantic Mediawiki 1.8. I am excited to find installation of 4store is such a simple procedure on Ubuntu 12.04.

1. Installation
sudo apt-get install 4store

2. Create a adatabase
4s-backend-setup test

3. Start database
4s-backend test

4. Start SPARQL HTTP server
4s-httpd test

5. Open a browser and enter the URL
http://localhost:8080/test

Mass SSL Virtual Hosts with Apache

Years ago I needed to host a couple of SSL virtual hosts with only 1 IP address.
I found this configuration works for me.
The virtual hosts are running under the same domain name, for example, dom1.example.com, dom2.exmple.com and the certificate is for all the sites with the same domain *.example.com.

##Turn on SSEngine
SSLEngine on

### Mass SSL Vhosts ###
RewriteEngine on

# define two maps: one for fixing the URL and one which defines
# the available virtual hosts with their corresponding
# DocumentRoot.
RewriteMap lowercase int:tolower

Turn an Old Computer into a Media Centre Powerhouse with Ubuntu 12.04 and XMBC

I found an old HP Pavilion Media Center a1430n Desktop PC (http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00607960&lc=en&cc=u...) from a local online buy and sell service two weeks ago, it seems it is a good deal. The computer costs me $60 dollar and it comes with AMD Athlon 64x2 Dual Core processors 3800+, 3 GB RAM and a 250 GB SATA hard drive. It surprised me when I found the computer come with a dual head ATI Radeon HD 2600 PRO video card with 512MB memory.

Apache 2.4.2, PHP 5.4.4 and Drupal 7.14

PHP 5.4.4 was released on June 14,2012 and I want to experiment Drupal 7.14 with PHP 5.4.4 and Apache 2.4.2

Download Apache 2.4.2 from http://apache.mirror.iweb.ca/httpd/
Download APR 1.4.6 and APR-Util 1.4.1 from http://apache.mirror.iweb.ca/apr/
Download PHP 5.4.4 from http://www.php.net/

untar httpd-2.4.2.tar.gz, apr-1.4.6.tar.gz, apr-util-1.4.1.tar.gz and php-5.4.4.tar.gz to /usr/src

1. Compile APR
cd /usr/src/apr-1.4.6
./configure
make
make test
make install

2. Compile APR-Util
cd /usr/src/apr-util-1.4.1
./congiure --with-apr=../apr-1.4.6
make
make test

Linksys WRT310N and DD-WRT

Months ago my wife picked up a used Linksys WRT310N from her office garbage bin and she told me her boss said it was not working. I tried it and it seemed to me it was working. I had no use of it as I was using a PC-based floppy firewall, I had used floppy firewall for more than a decade and it was serving my purpose.

Mediawiki template problems when upgrading from 1.6 to 1.7/1.8

When I upgraded my Mediawiki from 1.6 to 1.7 then 1.8, I found the old template was not working properly, some of the stylesheets were not working.

Syndicate content