Thursday, 10 October 2013



There are two primary types of coffee that are widely known, Robusta and Arabica and in the specialty industry Arabica rocks than Robusta!. So what is this Arabica coffee? Who’s the brilliant person behind this magic beans? 

Well hold your breath guys..the brilliant guy that I’m talking about  is none other than a goat herder named Kalbi..yup! you have read correctly..a  goat herder..

Anyways, this person, Kalbi, one day he went herding in the mountain forests of what is now known as Ethiopia. He took a nap and when he woke up he realized that some of his goats disappear and went to look for them. When he finally found them the goats were quite unusually active, dancing on their hind legs and then he found out that his goats ate some berries from a weird tree.

 The next day when he went out herding again he realized that his goats went to eat the same berries that they ate the last time. Then he thought to himself ...”hey they ate the berries quite a number of times..and they seem ok ..even looked energized...wonder how those berries tasted like” (well ..the dialog I added myself..just for entertainment). Anyways, Kaldi did ate those berries and boy he felt the result immediately. He felt energetic and very awake!

Then he brought the seeds home and showed them to his parents who then gave some of the berries to monks in a nearby monastery.
The monks were reaaaaallllyyy into the beans as the beans kept them awake during long praying session. 

Then monks came up with an even brilliant idea, they started drying the berries so that they can transport them to nearby monasteries. Where the monks then started to add water the dried berries, ate the fruit and drank the liquid.

The words about the magic beans started to spread out. The beans started to be cultivated in the Arabian peninsula (now is Yemen). People in Yemen they started to use the skin from the beans to make some sort of tea, by the time it reaches Turkey, the Turkish found another way to enjoy the beans..they started to roast the beans....genius!

Those beans then spread to England and Europe, but the thing was the Englishmen and the Europeans have never seen live coffee beans they only saw them after they were roasted. 

Story cut short, some Dutch in early 1700 eventually managed to smuggle (the live beans were prohibited by the Arabs to be exported) the coffee tree and introduced it to Java, Indonesia and from there it spread to the whole wide world and Helllooooooo  Coffeeeeee....



Source : COFFEE HANDBOOK, Michiel Kuit; EDE Consulting for Coffee – Asia-Pacific
Don M. Jansen; Plant Research International
Nguyen Van Thiet; Tan Lam Agricultural Product Joint Stock Company 


Thursday, 3 October 2013

PHP screen blank and heterogeneous query



Here’s what happened today, I tried to modify our internal system for a new report and the report created keep showing blank page (our reporting system is in PHP). Before the modification, this system already has 2 other types of connection, 1 to mySQL server of course since it uses PHP and the other one is Oracle.
What I was trying to do was, to connect to another database, this time MSSQL  server.
This first thing to do was to create a proper connection in the config file where all the other 2 connection were successfully created. This is what I set (only for MSSQL connection) in the config file
<?php
/* config for adodb */
include ("dir/adodb/adodb.inc.php");
require_once('dir/adodb/adodb-active-record.inc.php');
include_once('dir/adodb/toexport.inc.php');
define('ADODB_ASSOC_CASE', 2);
$myDBCon = NewADOConnection('mssql');
$myDBCon->Connect("yourserver", "userid","password", "DB Name");
ADOdb_Active_Record::SetDatabaseAdapter($myDBCon);
?>

But the screen keep showing this :
 
Found out that what happened actually was, the dll for the mssql was not loaded to the server, so after I uncommented the line in the php.ini, restarted the Apache .





The program started to work…but another error was prompted "Heteregeneous queries require the....."




Since my SQL actually is using a linked server (Oracle) from the mssql sever  (heterogeneous) there are 2 things need to be done first to allow the query to be pass.


So this is what I added to the previous setting in the config file.


<?php
/* config for adodb */
include ("dir/adodb/adodb.inc.php");
require_once('dir/adodb/adodb-active-record.inc.php');
include_once('dir/adodb/toexport.inc.php');
define('ADODB_ASSOC_CASE', 2);
$myDBCon = NewADOConnection('mssql');
$myDBCon->Connect("yourserver", "userid","password", "DB Name");
ADOdb_Active_Record::SetDatabaseAdapter($myDBCon);
/* add for heterogenous SQL */
$myDBCon->Execute("SET ANSI_NULLS ON ");
$myDBCon->Execute("SET ANSI_WARNINGS ON");
?>
 
And after that waalllaa….my precious data…finally.