473,386 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Using WAMP - I cannot connect to Oracle

154 100+
Using WAMP - I cannot connect to Oracle.

I enabled the oci and oracle extension. and running php runs fine but when trying to do a connection to oracle i get this error.

Fatal error: Call to undefined function oci_connect() in D:\wamp\www\oracle.php on line 3

Could somebody please help me this issue.

This is the connection script i am trying to use.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3.   $conn = oci_connect('username', 'password', 'dbname');
  4.   if (!$conn) {
  5.     $e = oci_error();
  6.     print htmlentities($e['message']);
  7.     exit;
  8.   }
  9.  
  10.   $query = 'select a.title, a.id_number, a.creation_time from sa.table_case';
  11.  
  12.   $stid = oci_parse($conn, $query);
  13.   if (!$stid) {
  14.     $e = oci_error($conn);
  15.     print htmlentities($e['message']);
  16.     exit;
  17.   }
  18.  
  19.   $r = oci_execute($stid, OCI_DEFAULT);
  20.   if (!$r) {
  21.     $e = oci_error($stid);
  22.     echo htmlentities($e['message']);
  23.     exit;
  24.   }
  25.  
  26.   print '<table border="1">';
  27.   while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
  28.     print '<tr>';
  29.        foreach ($row as $item) {
  30.          print '<td>'.($item?htmlentities($item):'&nbsp;').'</td>';
  31.        }
  32.        print '</tr>';
  33.   }
  34.   print '</table>';
  35.  
  36.   oci_close($conn);
  37. ?>
Jun 11 '07 #1
3 16841
epots9
1,351 Expert 1GB
do u have the latest extensions enabled?
Jun 11 '07 #2
jonathan184
154 100+
Yes I got the oracle and OCI enabled.

do u have the latest extensions enabled?
Jun 11 '07 #3
All that you need to do is, copy the OCI.dll in the path, where you have instaled apache and php in my case is

C:\wamp\bin\apache\Apache2.2.11\bin and

C:\wamp\bin\php\php5.3.0

restart your apache server , and enjoy

regards
jorge
Nov 20 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
2
by: Hari Om | last post by:
Cannot connect as Internal Hello, I am using IBM AIX 5.1L box for Oracle 9.2.0.1. I cannot connect as internal to my DB INstance - wonder why? Here is what is do:...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and the Java program are on the same Win 98 SE...
0
by: Gopinath Munisifreddy | last post by:
Hi How to connect as sys(Login) to oracle using Microsoft dataprovider for Oracle. I have to specify privilage right SYSDBA in connection. Can u please tell how to specify this in connection...
1
by: No_Spam | last post by:
I downloaded Microsoft Enterpreise Patterns & Practices (June 2005). I'm trying to use the Data.Oracle library to connect to Oracle 9i database with no luck. Does anyone know how to connect to...
1
by: minhnguyen19 | last post by:
I use Oracle 9i release 9.0.1.1 I want to connect Oracle with C# by OCI, but I can't add reference to using OCI.dll? What should I do???
1
by: gobirahul | last post by:
Hi Freinds, please, let me know if u have any idea How Can connect Oracle DB to Microsoft Access???? i have the oracle DB but want get this tables in Microsoft Access. Its urgent....
1
by: sindhujanan | last post by:
hai, anyone plz tell the code to connect oracle using database
3
by: techquest | last post by:
Hi, I want to connect into oracle database and export the table data into a flat file using UNIX shell scripts. I cant use other GUI tools to do this, as the dataload will be in millions. hence if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.