Sunday, May 11, 2008

PHP - Oracle How to(s)

setelah sekian lama kenalan dengan yg namanya PHP, baru kali ini ketemu bajing luncat setan alas muka gila: PHP to oracle db connection based.
im die trying to configure it out to work, at least 'say hi' to each other. googling sana sini pun tak banyak membantu malah nambah pikiran dan waktu.
but magically, a tools to sort out all oracle ability have called 'toad' which is Oracle client software yang membantu gw secara kebetulan.

i'll tell you what is the keys to get those couple happy: WINDOWS KEY REGISTER!!!!!!
after all they still use it even they had launch .net framework

i dont want bother to yell and scream to death slamming this windows antiquities.

alkisah, si toad ini saat setalah diinstal menanyakan where my new connection will going ahead?
i staring at those value and something cross my mind. those value are reside on registry, but my oracle registry is garbage. so i sweep them out and make registry key and value based on what this toad need. insect and mate!!!!!


this is key's-value's:
at oracle root: ORACLE_HOME, ORACLE_HOME_NAME, NLS_LANG, LOCAL dan CLIENT DLL
ORACLE_HOME supposed to pointing a directory where your oracle installed
ORACLE_HOME_NAME should valued as your oracle instance previously created
NLS_LANG load language globalization, im happy using AMERICAN_AMERICA.CL8MSWIN1251
LOCAL should point to your defined database at TNSNAME.ORA
CLIENT_DLL should carry oci.dll which reside in any of the system path.

then i run PHP-oracle configured and test a script of jesters tear querying a table.
HOLLLAAAAAA! a print screen result saying 'ARRAY'
this means query resulting object which should be traverse more, but at least I know the connection works.

time for beers!