Bluehost.com Web Hosting $6.95

reapir mysql table from php

This is a discussion on reapir mysql table from php within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I have an on-going problem that my ".MYI" mysql files get corrupted. I have written php trapping ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-20-2004
steve
 
Posts: n/a
Default reapir mysql table from php

I have an on-going problem that my ".MYI" mysql files get corrupted.
I have written php trapping routine to report on the problem to
admin. My next step is to initiate "repair table" right after the
error is trapped.

The problem is that then I would have multiple repair table commands
initiated from different browser sessions. How can I make sure that
only one "repair table" is running at a time.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-reapir-m...ict151640.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=507693
Reply With Quote
  #2 (permalink)  
Old 09-21-2004
Marcin Dobrucki
 
Posts: n/a
Default Re: reapir mysql table from php


steve wrote:
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.
>
> The problem is that then I would have multiple repair table commands
> initiated from different browser sessions. How can I make sure that
> only one "repair table" is running at a time.


Search for 'singleton class'

/Marcin
Reply With Quote
  #3 (permalink)  
Old 09-21-2004
Marcin Dobrucki
 
Posts: n/a
Default Re: reapir mysql table from php

steve wrote:
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.


Out of curiosity... how are you db files getting corrupted? Is the
server constantly shut off without a shutdown procedure? Perhaps
enabling logging on the filesystem and making sure the computer doesn't
creash is the way to go?

/m
Reply With Quote
  #4 (permalink)  
Old 09-21-2004
Lucas
 
Posts: n/a
Default Re: reapir mysql table from php

Hi Steve,

you're coming home from the backyard. Try the front door. Why would
you want users(browser sessions) iniatiate the repair sequence? This
is usually done by a cron job. If this repair procedure should be
event driven you may want to put a database in between the cron job
and the client application. The application would check the integrity,
if a repair procedure is needed, the flag in database would be set.
Afterwards the only task for the cron-job would be checking the repair
flag and carrying out necessary operations, if required.

Best Regards,

Lucas


steve <UseLinkToEmail@dbForumz.com> wrote in message news:<414f45f2$1_2@alt.athenanews.com>...
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.
>
> The problem is that then I would have multiple repair table commands
> initiated from different browser sessions. How can I make sure that
> only one "repair table" is running at a time.

Reply With Quote
  #5 (permalink)  
Old 09-21-2004
steve
 
Posts: n/a
Default Re: Re: reapir mysql table from php

"Marcin Dobrucki" wrote:
> steve wrote:
> > I have an on-going problem that my ".MYI" mysql files get

> corrupted.
> > I have written php trapping routine to report on the

> problem to
> > admin. My next step is to initiate "repair table" right

> after the
> > error is trapped.

>
> Out of curiosity... how are you db files getting corrupted?
> Is the
> server constantly shut off without a shutdown procedure?
> Perhaps
> enabling logging on the filesystem and making sure the
> computer doesn't
> creash is the way to go?
>
> /m


I have a server with heavy load. Once every few days, I get this
corruption. I have posted on this ng with no results...

The server is constantly up, so it is not related to that.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-reapir-m...ict151640.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=508966
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0