Log in

View Full Version : Need help with repair.php


Knoman
01-02-2002, 03:34 AM
I know how to run it's commands to check on corrupt databases, but what I need to know is how to get crontab to run it automatically. I'm able to use crontab and know how to write a command, but that's not the problem. The problem is that if crontab were to run the repair.php file, will it ask that file for the admin user name and pass? If so, how would I go about in getting it to work?

Psychdrone
01-02-2002, 04:33 AM
don't put it in the admin directory

Knoman
01-02-2002, 04:35 AM
hmmmmm.... it didnt seem to work before... let me try again.

edit:

Warning: Failed opening './global.php' for inclusion (include_path='') in /home/sites/site3/web/forums/repair/repair.php on line 83

Fatal error: Call to a member function on a non-object in /home/sites/site3/web/forums/repair/repair.php on line 86

JamesUS
01-02-2002, 07:42 AM
You need to put it in either the main forums directory or the admin directory :)

Psychdrone
01-02-2002, 08:02 PM
ya thats what I ment, not in the admin directory but in the main fourm directory!!

Hey Knoman, if you could pm me the contab code, on how you would get this to repair it automaticly, ever, whatever you set it at, that would be great man!

Knoman
01-02-2002, 10:41 PM
*/6 * * * * path/to/php absolute/path/to/repair.php?nohtml=1&check=1&iterations=4&forum=databasename

yeah, i know having the server running it every 6 mins is excessive, but my database have been corrupting a lot lately.

Knoman
01-03-2002, 12:57 AM
this is working out great. i normally get 50 emails a day from the database about errors. today, i got zero ^_^