473,394 Members | 1,645 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,394 software developers and data experts.

OCILogon Fails But OCIError Returns False.

Hello,

I am writing a simple PHP script to see if I can make a connection to my Oracle database. And it showed that my call to OCILogon() failed. But
my call to OCIError() returned "False", which I believe meant to be "no
error found".

I wonder if you could please help me get additional information as to why
my call to OCILogon() failed? My code is below.

Thank you and Best Regards,

Akino
================================================== =======

Code :
====
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo "Connecting...<br/>";
  3. $c = OCILogon("abc123", "abc123", "testDB");
  4. if ($c == false) {
  5.    $err = OCIError();
  6.     if ($err == false)
  7.        echo "No error found.<br/>";
  8.     else
  9.        echo "Oracle Connect Error " . $err[code] . $err[message] . "<br/>";
  10. else {
  11.    echo "Successfully connected to testDB<br/>";
  12.    OCILogoff($c);
  13. }
  14. echo "Exiting...<br/>";
  15. ?>
  16.  
Output :
=====

Connecting...
No error found.
Exiting...
Feb 20 '09 #1
1 4032
gits
5,390 Expert Mod 4TB
you might have a look here and check whether all preliminaries are fullfilled ... correct php.ini, installed oracle-client etc.

kind regards
Feb 21 '09 #2

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

Similar topics

7
by: Geoff Muldoon | last post by:
Hi all, Help please. Environment: Unix (Tru64) / Apache / PHP4.0.6 / Oracle8i Establish connection to Oracle: for ($I=0; $I<$max_attempts; $I++) {
1
by: arun.kumar.varma | last post by:
Hi, My objective is to try to connect to the oracle database and if an error occurs go to another page. The code follows $conn = OCILogon($user,$passwd,$db); // <---- Line 34 if (!$conn)...
1
by: DP | last post by:
I am porting an existing application to OCI. I have 200+ client computers. Since the existing app already has a way to retrieve settings off another server I am looking to bypass tnsnames.ora. ...
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
8
by: Rick Lederman | last post by:
I am using a PrintDocument and PrintDialog to print. The first time that I print it works, but when I try to print a second time without exiting the entire program I get an...
2
by: JuliouZ | last post by:
Warning: ocilogon() : OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in /web/htdocs/test.php on line 6...
8
by: Tyno Gendo | last post by:
I have just written a line of code like this (yes, many people think this stinks bad): <?php true == isset($page_seq) ? echo "$page_seq" : false; ?> However it breaks with 'Unexpected T_ECHO'...
2
by: rdilipk | last post by:
I am posting at the end of this post some code that P/Invoke's SetSystemTime to set the local system time. This call fails -- i.e the time is not set and the API returns false. However calling...
3
by: ragonz | last post by:
i tried to execute php file from cmd line. i'm using xampp version 1.67 with windows server 2003 as the OS. it'll also include oracle as the database,which means OCILogon() will be called in my php...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.