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

Grafully crashing

Hi,

My Web site is working ok, (well i am still testing it on my local server).
But when i was testing i stopped MySQL and therefore there was no more
database available, so far so good.
So there i was going to the index.php and to my horror i saw a lot of error
messages, ... as expected.

But i cannot have that situation with my users, i must nicely tell them that
i need to invest in more bandwidth or something.
What would be a graceful way of saying that my DB is out of service for now
call latter.

Also when i notice the error, (when my mysql_connect(...) fails), how would
i redirect to 'sorrynodatabase.php' page and throw always what ever
processing has been don already?
The whole site relies on the DB so if it is not working i might as well call
it a day and say sorry.

Many thanks

Regards
Sims
Jul 17 '05 #1
1 1502
Sims wrote:
Hi,

My Web site is working ok, (well i am still testing it on my local server).
But when i was testing i stopped MySQL and therefore there was no more
database available, so far so good.
So there i was going to the index.php and to my horror i saw a lot of error
messages, ... as expected.

But i cannot have that situation with my users, i must nicely tell them that
i need to invest in more bandwidth or something.
What would be a graceful way of saying that my DB is out of service for now
call latter.

Also when i notice the error, (when my mysql_connect(...) fails), how would
i redirect to 'sorrynodatabase.php' page and throw always what ever
processing has been don already?
The whole site relies on the DB so if it is not working i might as well call
it a day and say sorry.

Many thanks

Regards
Sims

if you call mysql_connect with an @ infront so @mysql_connect it wont
produce any error messages therefor...

$rli = @mysql_connect(...);

if (!$rli)
{
<Whut ever should be done when there is an error>
}

you can use @ with the other mysql functions as well.

~Cameron


Jul 17 '05 #2

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

Similar topics

4
by: Yannick Majoros | last post by:
Hello, PHP is crashing (segfault) due to some bug. See http://bugs.php.net/bug.php?id=32929 for details, but here is the code in which it occurs: while...
0
by: Henry Hank | last post by:
Environment: I'm setting up a database server on a Dell Poweredge 2650, dual 1.8GHZ pentium with 1GB of memory and RAID5 drives. I've installed RedHat 9, and updated the kernel to 2.4.20-19.9smp....
5
by: Eddie | last post by:
I have a MySQL-server running Innodb. We have installed ~ 2GB of memory in the server. In spite of this MySQL keeps crashing due to out-of-memory errors. The server is a dual xeon i686 running...
14
by: Java and Swing | last post by:
static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { // this will store the result in a Python object PyObject *finalResult; // get arguments from Python char *result = 0; char *in=...
7
by: Jeffrey Barrett | last post by:
/* machine.txt: ------------------ Cola 0.75 20 Ruby Red Blast 1.00 10 Lemon Fizz 0.75 8 Grape Soda
0
by: Grant | last post by:
My C# web application connects to an Access database using the OleDbConnection and OleDbDataReader. I have 3 other computers that connect to this server but very frequently I get an 'Unspecified...
8
by: code break | last post by:
Can Any one tell me why this program is crashing . testFunc() { int a1, *ptr ; f=&a1; f=f+1; return 0; }
5
by: news.cyberlink.ch | last post by:
Hi, We have a DB2 version 7 fixpack 14 installed on Windows 200 at a customer site that is crashing at regular intervals.Everything was working fine for over many years, now since about one...
1
by: mwallis76 | last post by:
Upon clicking on a hyperlink generated in a ASP.NET GridView control, I am finding Firefox 1.5 to crash. However, when clicking on the same link, Internet Explorer 6.0 works just fine and is...
2
by: =?Utf-8?B?QW5uZXh4eHh4eHg=?= | last post by:
My computer keeps crashing. The files created when it does this are: WERdc15.dir00\Mini090708-03.dmp WERdc15.dir00\sysdata.xml has anybody any idea of what these files are and the solution to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.