hi
i m new at this forum. i am using wampserver 2c on xp sp2. i wanna connect my pc with oracle datadase server 8i using php. when i try to connect my oracle server using oci_connect(), it gives error "Fatal error: Call to undefined function oci_connect() in C:\wamp\www\New Folder\oracle.php on line 5".....
my oracle.php file is as give below
<html>
<title>sonu</title>
<body>
<?php
$c1 = oci_connect("scott", "tiger", SID_name);
function create_table($conn)
{
$stmt = oci_parse($conn, "create table scott.hallo (test varchar2(64))"
;
oci_execute($stmt);
echo $conn . " created table\n\n";
}
function insert_data($conn)
{
$stmt = oci_parse($conn, "insert into scott.hallo
values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI
S'))"
;
oci_execute($stmt, OCI_DEFAULT);
echo $conn . " inserted hallo\n\n";
}
function commit($conn)
{
oci_commit($conn);
echo $conn . " committed\n\n";
}
function select_data($conn)
{
$stmt = oci_parse($conn, "select * from scott.hallo"
;
oci_execute($stmt, OCI_DEFAULT);
echo $conn."----selecting\n\n";
while (oci_fetch($stmt)) {
echo $conn . " [" . oci_result($stmt, "TEST"
. "]\n\n";
}
echo $conn . "----done\n\n";
}
create_table($c1);
insert_data($c1); // Insert a row using c1
select_data($c1); // Results of both inserts are returned
commit($c1);
?>
</body>
</html>
i have taken many steps to remove this.......
i have removed ";" from the start of the lines extension=php_oci.dll
=php_oracle.dll
in the both php.ini file (one in php/php 5.2.6 and 2nd in apache/bin folder) to make these extension loaded at the startup....
i have make the extension_dir 's path to point to the my ext dir where all dll resides
i.e. extension_dir = "c:/wamp/bin/php/php5.2.6/ext/"
now my phpinfo shows oracle heading under the main heading of php credits...
it shows
"oracle
Oracle Supportenabled Extension Version 0.1.0-dev "
but when i try to make connection using oci_connect(), it gives the same error........
tell me wat to do ........
i m frustrated ..........
tell me a solution......