473,779 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem related to OCILogon ()

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) {
$err = OCIError();
header("Locatio n: dbproblem.php?e rror=$err[text]");
}

The problem is, whenever the OCILogon() fails, I'm not able to
redirect to dbproblem.php because OCILogon has already sent the error
message to the client, thus resulting in the following message

Warning: Cannot modify header information - headers already sent by
(output started at /path/to/validate.php:34 )

Is there anyway that I can stop OCILogon() from sending the error?

Jul 17 '05 #1
1 2081
use:

$conn = @OCILogin($user ,$passwd,$db);

The @ symbol before a function call suppresses any error messages the
function might return to the client.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11028
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
5535
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. Of course I could just rewrite tnsnames before calling OCILogon, but I was hoping to be able to pass a key/value list or similar in the dbname parameter. Alternately, can OCILogon use environment variables for this? DP
3
1820
by: Keith E. Sauvant | last post by:
A behaviour we don't understand: +++ $user = 'xxx'; $password = 'xxx'; $database = 'xxx.xxx'; $query = 'SELECT 1 FROM DUAL'; $link = OCIlogon($user, $password, $database);
1
5661
by: Steve1000 | last post by:
Hi, We're having problems connecting to an Oracle 9i db using PHP 5.2.1 and OCI8. Also, we are using IIS 5.1. PHP is working--we can see the info.php page. On the info.php page I see that OCI8 is enabled. But a simple page with an Oracle connection like this returns only 'hello' from the print statement and then nothing: <html xmlns="http://www.w3.org/1999/xhtml"> <body>
4
1705
by: Debbiedo | last post by:
I searched the groups and tried several approaches but still cannot find a solution. I have a table that has several hundred fields that may or may not need to be displayed in a report, depending on whether they are NULL or not. (Due to limitations of out software, the table needs to be designed this way) The data needs to be displayed like this:
2
25824
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 Oracle Connect Error my file test.php : <?php PutEnv("ORACLE_SID=TEST"); PutEnv("ORACLE_HOME=/oracle/ora102"); PutEnv("TNS_ADMIN=/oracle/ora102/network/admin");
0
2970
by: =?Utf-8?B?am8uZWw=?= | last post by:
Hello All, I am developing an Input Methop (IM) for PocketPC / Windows Mobile (PPC/WM). On some devices the IM will not start. The IM appears in the IM-List but when it is selected from the list athe result is that the standard (QWERTY) keyboard appears. I found that many ( all?) ISV's who make IM's have customers reporting this problem. My research on the internet brought me to the conclusion it is some
0
1194
by: boss1 | last post by:
hi all, i am having a problem with php & oracle connection.i m using oracle 8i & php4.3.6 version on Win2000 professional. when i run the connection script.i find a fetal error. Fatal error: Call to undefined function: ocilogon() in C:\Program Files\Apache Group\Apache2\htdocs\oracon.php on line 6. can anyone plz. help me?
1
4059
by: Akino877 | last post by:
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,
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9930
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.