Solved

Database error handling

Posted on 2000-02-18
7
235 Views
Last Modified: 2008-02-01
I have created a dynamic web site which fetches content from tables (Using database - oracle 8, OCI functions). If any table is dropped automatically runtime error saying ".........Warning: OCIStmtExecute: ORA-00942: table or view does not exist in appears..........". Can any body give me the solution as how it can be rectified and some decent message may be displayed instead of the above one.
0
Comment
Question by:shylaja
7 Comments
 
LVL 2

Expert Comment

by:maxkir
Comment Utility

Some hint:

// @ - means suppress errors

@OciExecute($ID, OCI_DEFAULT);

if (OciError($ID))
{
    //Some error happend. You can process it here
}
0
 
LVL 1

Expert Comment

by:aikon
Comment Utility
Hi Shylaja,

You may change the php error reporting error, and catch the error:

a) Changing the error_level:
Open php3.ini and look for error_reporting parameter, by default it is set to 7 so change it to 5.
Note: Php3.ini is locate where you had specified with --with-configure-file-path
If not, it might be at /usr/lib. You can use phpinfo() function to see where is it.

b) Caching errors:
Use de 'die' function:
OciExecute () or die ("Can't send SQL statement to Oracle server");

Regards.
0
 
LVL 2

Expert Comment

by:gravity
Comment Utility
No offence to aikon, but I think Shylaja should reject your answer... maxkir has quite obviously answered the question.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:shylaja
Comment Utility
Thanks Maxkir, Your comment helped.
0
 
LVL 2

Expert Comment

by:maxkir
Comment Utility
Could you then please accept my comment as the answer ?
If you don't mind ;-))
0
 
LVL 1

Expert Comment

by:aikon
Comment Utility
No problem gravity ;)
0
 
LVL 2

Accepted Solution

by:
maxkir earned 50 total points
Comment Utility
Shylaya,
I'm terribly sorry, but could I receive my points for this question ?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now