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

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("Location: dbproblem.php?error=$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 2045
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
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: 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. ...
3
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
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...
4
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,...
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...
0
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...
0
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:...
1
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",...
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: 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
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
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.