Welcome Guest, Not a member yet? Register   Sign In
how to connect Codeigniter with oracle database on wamp server
(This post was last modified: 12-28-2014, 01:08 PM by ibraheem_ghazi.)

i have uploaded a video that explain how to
connect codeigniter with oracle database
on local wamp server
i hope it will help

Angel  Angel

this is direct link to video :

here is the text tutorial which i wrote it during the video
welcome to my channnel
in this video im going to show you how
to connect Codeigniter Framework with
Oracle 11g Database .
in general PHP use an OCI8 extention
whcih allow to connect to ORACLE DATABASE
before we start im going to show you phpinfo of my wamp server
to what section we need to check to ensure that oci8 extension
working or not .
the selected text here tell us that oci8 extension is working fine
lets see an example
if oci8 not working
then an exception will fire up telling you that oci_connect is
undefined function
so how we can install and setting it up in WAMP SERVER

-first we will enable extention in wamp
but note there are two type of extension
first extension works for 10g
the second one is for 11g and 10g (as mentioed in php document)

because we are going to connect with 11g i will use php_oci8_11g
i already enabled it but i will disable it to show you what will happen if ext. not work
not work and error happened as mentioed before

-second thing
the oci8 need the instace oracle for windows file to be installed
to install it you need to install it from here for x32
or for x64

now download  instantclient-basic-windows.x64-
i have already downloaded it so keep with me
now copy all content of this folder in two following pathes

hhhh i copied these files before

ok that it now all you need is to restart your wamp and you can connect to oracle DB

the next section of video is

=====================how to connect Codeigniter with Oracle===============
it so easy all you need is
to configure database like this

$db['default']['hostname'] = 'localhost';

$db['default']['username'] = 'hr';

$db['default']['password'] = 'hr';

$db['default']['database'] = '';//leave database name empty

$db['default']['dbdriver'] = 'oci8';//and make the driver oci8 instead of mysql

now in your controller

you can test it by this commands

$query = $this->db->query('SELECT * FROM employees');

that's all
i hope my explanation is clear
all link are in the description
thank you for watching

The community will thank you! Good job! Can you post also your tutorial text. Personal i dont like the music beause i thought about a speech tut vid Wink


i have modified my post and included the text tutorial.
I'll take your advice into consideration regarding speech tutorial video

Thank you again!


Theme © iAndrew 2016 - Forum software by © MyBB