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

hi
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 :
http://www.youtube.com/watch?v=rtRFP01upvE

here is the text tutorial which i wrote it during the video
Code:
Hi
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
php_oci8
and
php_oci8_11g
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
http://www.oracle.com/technetwork/topics/winsoft-085727.html
or for x64
http://www.oracle.com/technetwork/topics/winx64soft-089540.html

now download  instantclient-basic-windows.x64-11.2.0.4.0.zip
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

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

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

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

Reply
#3

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

Thank you again!

Reply




Theme © iAndrew 2016 - Forum software by © MyBB