Navigation


RSS: articles / comments



April 2, 2007

Tutorial Koneksi PHP ke Oracle

Ada beberapa cara untuk koneksikan antara PHP ke Oracle




1. Pastikan Oracle sudah terinstal dalam komputer anda,penulis memakai Oralce 10g.

sebelumnya buatlah new user untuk koneksi dari PHP ke Oracle contoh :
:> query untuk create user indra dengan Password indra:
create user indra identified by indra;
:>query untuk grant priviliges minimun:
grant connect,resource to indra;

2. Sesudah Terinstall,buatlah SID untuk membuat alias nama database dalam Oracle

caranya :
a. Buka program Oracle dalam start menu->Configuration and Migration Tools->Net Configuration Assistant
b. lalu ada beberapa pilihan,pilih Local Net Service Name Configuration
c. Pilih Next lalu pilih add
d. Lalu isi nama Servicenya terserah anda klik Next
e. Lalu pilih TCP klik Next
f. isi nama Hostname kalau dalam komputer local berarti “localhost”,kalau memakai database dikomputer lain berarti localhostnya diganti IP dari komputer databasenya
g. pilih “yes perform a test” klik Next
h. lalu pilih “Change Login” Testinglah dengan Username dan Password yang sebelumnya dibuat,lalu pilih Next sampai Finish

3. Untuk berikutnya tinggal Coding untuk koneksi dari PHP ke Oracle



//| < ?

//| kita memakai ADODB untuk koneksi ke Oracle //
//| include (‘adodb.inc.php’); // memanggil class adodb

//| $db = NewADOConnection(‘oci8’);

//   hostname,username,password,SID name
//| $koneksi = $db->Connect(‘localhost’, ‘indra’, ‘indra’, ‘GIS’);
//| if ($koneksi)
//| echo “koneksi berhasil”;
//| else
//| echo “koneksi gagal”;
//| ?>

________________Semoga Bermanfaat___________________

2 Comments »

The URI to TrackBack this entry is: http://indrasela.blogsome.com/2007/04/02/tutorial-koneksi-php-ke-oracle/trackback/

  1. bang di google 297 pencarian ok

    Comment by bimoseptyop — May 3, 2007 @ 2:24 pm

  2. Kalau koneksi antara ASP dengan Oracle bagaimana??

    Comment by deddy — March 6, 2008 @ 1:11 am

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



About Me

Yeah, it´s me! Indra
Umur: 22
Selandaka-Sumpiuh
Banyumas 53195
email : indrasela@yahoo.com
ym:indrasela
Profile on MySpace


Categories:

Site Related:

Archives:


Most Recent Posts

Most Popular Posts

Links

Shout Box


Admin

Google Analytics

Visitor Counter