Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Errors and I need help fast.  (Read 11201 times)

0 Members and 1 Guest are viewing this topic.

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« on: September 26, 2003, 04:26:05 pm »

I have been runnung a free image service off of coppermine, I am now getting these errors, although everything works, except when I want to add a new person, or look at the list of people... I need help because this is the second time this has happened, and I really don't want to have to rebuild the database if I have a choice.

These are the errors.

File: /Volumes/WebServer/htdocs/coppermine/include/functions.inc.php - Line: 101

This is what is on line 101

        global $CONFIG;




While executing query "SELECT user_id, user_name, user_email, UNIX_TIMESTAMP(user_regdate) as user_regdate, group_name, user_active, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota FROM cpg11d_users AS u INNER JOIN cpg11d_usergroups AS g ON user_group = group_id LEFT JOIN cpg11d_albums AS a ON category = 10000 + user_id LEFT JOIN cpg11d_pictures AS p ON p.aid = a.aid GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25"

mySQL error: Got error 134 from table handler


Any help would be appreciated.

Cyberpawz
Logged

jack

  • VIP
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 279
Re: Errors and I need help fast.
« Reply #1 on: September 26, 2003, 04:36:57 pm »

Quote from: "Cyberpawz"
mySQL error: Got error 134 from table handler


You might have some corrupted MySQL tables there  :shock:

Try doing a REPAIR TABLE on the coppermine tables (probably start with the cpg11d_users table).
Logged
Please do not contact me for support directly - instead: post on this board!

Zarsky

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 268
    • Zerr Family Website
Errors and I need help fast.
« Reply #2 on: September 26, 2003, 04:37:56 pm »

sounds like your tables or DB got corrupted.  Try running isamchk to fix the tables.  google for specifics or go to mysql.com
Logged
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« Reply #3 on: September 26, 2003, 08:19:57 pm »

I'm on a Mac, so I'm sort of stuck on what I can and can't do... any how-tos for this?

I'm pretty new to the UNIX world so I don't have a clue what the heck to do even with commands told to me...I don't know how to set it up in terminal...

BTW how can a DB become corrupt like this?

Cyberpawz
Logged

Zarsky

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 268
    • Zerr Family Website
Errors and I need help fast.
« Reply #4 on: September 26, 2003, 08:24:41 pm »

Being on a Mac should make no difference....You need to use the built in repair functions of mysql.

Like I said google or go to mysql.com for the specifics on how to repair tables and databases that get corrupted.  Here is a good place to start:

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Table_maintenance

You can also use phpmyadmin to repair/optimize tables and databases, if shell access is not available.
Logged
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« Reply #5 on: September 26, 2003, 08:26:40 pm »

Quote from: "zarsky99"
Being on a Mac should make no difference....You need to use the built in repair functions of mysql.

Like I said google or go to mysql.com for the specifics on how to repair tables and databases that get corrupted.  Here is a good place to start:

http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Table_maintenance


It does when myisamchk isn't recognized as a command.

nor isamchk

isamchk: Command not found.

myisamchk: Command not found.

Cyberpawz
Logged

Zarsky

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 268
    • Zerr Family Website
Errors and I need help fast.
« Reply #6 on: September 26, 2003, 08:31:08 pm »

OK....I am stumped....try phpmyadmin....one of other devs will have to help....if that does not work.  As for how a DB can get corrupted....the information is stored as file....therefor it can get corrupted.  I wish I knew a better explanation than that.  :shock:
Logged
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« Reply #7 on: September 26, 2003, 09:02:47 pm »

Quote from: "zarsky99"
OK....I am stumped....try phpmyadmin....one of other devs will have to help....if that does not work.  As for how a DB can get corrupted....the information is stored as file....therefor it can get corrupted.  I wish I knew a better explanation than that.  :shock:


*Grrr*  phpmyadmin no longer works, I swear to god, Apple's latest OS upgrade fubared my machine...

I'm going to give up here, I'm stuck, and I don't know where to do from here...unless there is something someone knows that works on a Mac, I'll wait and hear, otherwize I'm about to format and start over by the end of Sunday.

Cyberpawz
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
Errors and I need help fast.
« Reply #8 on: September 27, 2003, 05:26:21 am »

OK just woke up :P

Did you compile your own version of MySQL or used the Mac binary one?   Assuming you're using OSX (btw, Apple's latest update is unstable and has been removed from autoupdate, don't know if you have applied that..), you can try the 'locate' command:

Quote
Welcome to Darwin!
[Mooreys-G4:~] moorey% locate isamchk
/Library/MySQL/bin/isamchk
/Library/MySQL/bin/myisamchk
/Library/MySQL/man/man1/isamchk.1
/Users/moorey/Applications/mysql-4.0.13/isam/.deps/isamchk.Po
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk.c
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk.o
/Users/moorey/Applications/mysql-4.0.13/man/isamchk.1
/Users/moorey/Applications/mysql-4.0.13/myisam/.deps/myisamchk.Po
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk.c
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk.o
/usr/local/bin/isamchk
/usr/local/bin/myisamchk
/usr/local/man/man1/isamchk.1
[Mooreys-G4:~] moorey%


As you can see I have more than a couple of MySQL installed.  If you don't see it on your system, try and and run the following command and locate again:

Quote
$ ./usr/libexec/locate.updatedb


I'm not sure how tables can get corrupted, so I've never really tried the commands myisamchk.  If you haven't got very important stuff on your gallery yet, you can recreate the tables by reinstalling or get phpMyAdmin going again. HTH.

ps: Here's a good OSX MySQL installer: http://serverlogistics.com/mysql.php

It allows you to control it from your System Preferences. CPG, Apache2, PHP and MySQL runs on my Mac just fine.
Logged

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« Reply #9 on: September 27, 2003, 05:37:49 am »

Quote from: "moorey"
OK just woke up :P

Did you compile your own version of MySQL or used the Mac binary one?   Assuming you're using OSX (btw, Apple's latest update is unstable and has been removed from autoupdate, don't know if you have applied that..), you can try the 'locate' command:

Quote
Welcome to Darwin!
[Mooreys-G4:~] moorey% locate isamchk
/Library/MySQL/bin/isamchk
/Library/MySQL/bin/myisamchk
/Library/MySQL/man/man1/isamchk.1
/Users/moorey/Applications/mysql-4.0.13/isam/.deps/isamchk.Po
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk.c
/Users/moorey/Applications/mysql-4.0.13/isam/isamchk.o
/Users/moorey/Applications/mysql-4.0.13/man/isamchk.1
/Users/moorey/Applications/mysql-4.0.13/myisam/.deps/myisamchk.Po
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk.c
/Users/moorey/Applications/mysql-4.0.13/myisam/myisamchk.o
/usr/local/bin/isamchk
/usr/local/bin/myisamchk
/usr/local/man/man1/isamchk.1
[Mooreys-G4:~] moorey%


As you can see I have more than a couple of MySQL installed.  If you don't see it on your system, try and and run the following command and locate again:

Quote
$ ./usr/libexec/locate.updatedb


I'm not sure how tables can get corrupted, so I've never really tried the commands myisamchk.  If you haven't got very important stuff on your gallery yet, you can recreate the tables by reinstalling or get phpMyAdmin going again. HTH.

ps: Here's a good OSX MySQL installer: http://serverlogistics.com/mysql.php

It allows you to control it from your System Preferences. CPG, Apache2, PHP and MySQL runs on my Mac just fine.


I'm using the one from Server Logistics...I know the one from Apple was unstable, and also I didn't want to deal with a lot of headaches so I went with the one you stated before I started all of this.

What is happening for some reason is MySQL works fine with everything but PHPMyAdmin...

I get a blank screen... than and with Coppermine, it has corrupted the database for some reason... and I need to fix it... since you are using a Mac, is there any way of telling me via the terminal how to fix the database? (since PhpMyAdmin isn't working for the time being)

Cyberpawz
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
Errors and I need help fast.
« Reply #10 on: September 27, 2003, 05:59:51 am »

Is there any reason why phpMyAdmin isn't working?   As phpMyAdmin is an interface to MySQL, if it's not working, could it be the MySQL as a whole isn't working?

What version of phpMyAdmin are you using?  What's the error message?  The table fixing isn't specific to Mac -- it's specific to lunix and as long as you have your terminal, you have unix on your fingers. :)

So let's follow some instructions from mysql.com's help:
Quote
[Mooreys-G4:/Library/MySQL/bin] moorey% myisamchk --help
myisamchk  Ver 2.6 for apple-darwin6.6 at powerpc
By Monty, for your professional use
...

Check options (check is the default action for myisamchk):
  -c, --check         Check table for errors
  -e, --extend-check  Check the table VERY throughly.  Only use this in
                      extreme cases as myisamchk should normally be able to
                      find out if the table is ok even without this switch
  -F, --fast          Check only tables that haven't been closed properly
  -C, --check-only-changed
                      Check only tables that have changed since last check
  -f, --force         Restart with '-r' if there are any errors in the table.
                      States will be updated as with '--update-state'
  -i, --information   Print statistics information about table that is checked
  -m, --medium-check  Faster than extend-check, but only finds 99.99% of
                      all errors.  Should be good enough for most cases
  -U  --update-state  Mark tables as crashed if you find any errors
  -T, --read-only     Don't mark table as checked

Repair options (When using '-r' or '-o')
  -B, --backup        Make a backup of the .MYD file as 'filename-time.BAK'
  --correct-checksum  Correct checksum information for table.
  -D, --data-file-length=#  Max length of data file (when recreating data
                      file when it's full)
  -e, --extend-check  Try to recover every possible row from the data file
                      Normally this will also find a lot of garbage rows;
                      Don't use this option if you are not totally desperate.
  -f, --force         Overwrite old temporary files.
  -k, --keys-used=#   Tell MyISAM to update only some specific keys. # is a
                      bit mask of which keys to use. This can be used to
                      get faster inserts!
  -r, --recover       Can fix almost anything except unique keys that aren't
                      unique.
  -n, --sort-recover  Forces recovering with sorting even if the temporary
                      file would be very big.
  -p, --parallel-recover
                      Uses the same technique as '-r' and '-n', but creates
                      all the keys in parallel, in different threads.
                      THIS IS ALPHA CODE. USE AT YOUR OWN RISK!
  -o, --safe-recover  Uses old recovery method; Slower than '-r' but can
                      handle a couple of cases where '-r' reports that it
                      can't fix the data file.
  --character-sets-dir=...
                      Directory where character sets are
  --set-character-set=name
                      Change the character set used by the index
  -q, --quick         Faster repair by not modifying the data file.
                      One can give a second '-q' to force myisamchk to
                      modify the original datafile in case of duplicate keys
  -u, --unpack        Unpack file packed with myisampack.

Other actions:
  -a, --analyze       Analyze distribution of keys. Will make some joins in
                      MySQL faster.  You can check the calculated distribution
                      by using '--description --verbose table_name'.
  -d, --description   Prints some information about table.
  -A, --set-auto-increment[=value]
                      Force auto_increment to start at this or higher value
                      If no value is given, then sets the next auto_increment
                      value to the highest used value for the auto key + 1.
  -S, --sort-index    Sort index blocks.  This speeds up 'read-next' in
                      applications
  -R, --sort-records=#
                      Sort records according to an index.  This makes your
                      data much more localized and may speed up things
                      (It may be VERY slow to do a sort the first time!)
  -b,  --block-search=#
                       Find a record, a block at given offset belongs to.
...

[Mooreys-G4:/Library/MySQL/bin] moorey%


Ok.. interesting options are: "-c", "-a", "-r".

Try those options in that order on say, perhaps, as suggested: cpg11d_users table.  Give us some output.

Here's how I did a test:
Quote
[Mooreys-G4:/Library/MySQL/bin] moorey% sudo myisamchk -a /Library/MySQL/var/test/cpg11d_users
Checking MyISAM file: /Library/MySQL/var/test/cpg11d_users
Data records:       1   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2
- check record links
[Mooreys-G4:/Library/MySQL/bin] moorey%


Ok good luck - I'm going out for the rest of the day.  Remember I've never used these commands so it's a bit of trial and error.
Logged

Cyberpawz

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 122
Errors and I need help fast.
« Reply #11 on: September 27, 2003, 08:16:14 am »

Quote from: "moorey"
Is there any reason why phpMyAdmin isn't working?   As phpMyAdmin is an interface to MySQL, if it's not working, could it be the MySQL as a whole isn't working?

What version of phpMyAdmin are you using?  What's the error message?  The table fixing isn't specific to Mac -- it's specific to lunix and as long as you have your terminal, you have unix on your fingers. :)

So let's follow some instructions from mysql.com's help:
Quote
[Mooreys-G4:/Library/MySQL/bin] moorey% myisamchk --help
myisamchk  Ver 2.6 for apple-darwin6.6 at powerpc
By Monty, for your professional use
...

Check options (check is the default action for myisamchk):
  -c, --check         Check table for errors
  -e, --extend-check  Check the table VERY throughly.  Only use this in
                      extreme cases as myisamchk should normally be able to
                      find out if the table is ok even without this switch
  -F, --fast          Check only tables that haven't been closed properly
  -C, --check-only-changed
                      Check only tables that have changed since last check
  -f, --force         Restart with '-r' if there are any errors in the table.
                      States will be updated as with '--update-state'
  -i, --information   Print statistics information about table that is checked
  -m, --medium-check  Faster than extend-check, but only finds 99.99% of
                      all errors.  Should be good enough for most cases
  -U  --update-state  Mark tables as crashed if you find any errors
  -T, --read-only     Don't mark table as checked

Repair options (When using '-r' or '-o')
  -B, --backup        Make a backup of the .MYD file as 'filename-time.BAK'
  --correct-checksum  Correct checksum information for table.
  -D, --data-file-length=#  Max length of data file (when recreating data
                      file when it's full)
  -e, --extend-check  Try to recover every possible row from the data file
                      Normally this will also find a lot of garbage rows;
                      Don't use this option if you are not totally desperate.
  -f, --force         Overwrite old temporary files.
  -k, --keys-used=#   Tell MyISAM to update only some specific keys. # is a
                      bit mask of which keys to use. This can be used to
                      get faster inserts!
  -r, --recover       Can fix almost anything except unique keys that aren't
                      unique.
  -n, --sort-recover  Forces recovering with sorting even if the temporary
                      file would be very big.
  -p, --parallel-recover
                      Uses the same technique as '-r' and '-n', but creates
                      all the keys in parallel, in different threads.
                      THIS IS ALPHA CODE. USE AT YOUR OWN RISK!
  -o, --safe-recover  Uses old recovery method; Slower than '-r' but can
                      handle a couple of cases where '-r' reports that it
                      can't fix the data file.
  --character-sets-dir=...
                      Directory where character sets are
  --set-character-set=name
                      Change the character set used by the index
  -q, --quick         Faster repair by not modifying the data file.
                      One can give a second '-q' to force myisamchk to
                      modify the original datafile in case of duplicate keys
  -u, --unpack        Unpack file packed with myisampack.

Other actions:
  -a, --analyze       Analyze distribution of keys. Will make some joins in
                      MySQL faster.  You can check the calculated distribution
                      by using '--description --verbose table_name'.
  -d, --description   Prints some information about table.
  -A, --set-auto-increment[=value]
                      Force auto_increment to start at this or higher value
                      If no value is given, then sets the next auto_increment
                      value to the highest used value for the auto key + 1.
  -S, --sort-index    Sort index blocks.  This speeds up 'read-next' in
                      applications
  -R, --sort-records=#
                      Sort records according to an index.  This makes your
                      data much more localized and may speed up things
                      (It may be VERY slow to do a sort the first time!)
  -b,  --block-search=#
                       Find a record, a block at given offset belongs to.
...

[Mooreys-G4:/Library/MySQL/bin] moorey%


Ok.. interesting options are: "-c", "-a", "-r".

Try those options in that order on say, perhaps, as suggested: cpg11d_users table.  Give us some output.

Here's how I did a test:
Quote
[Mooreys-G4:/Library/MySQL/bin] moorey% sudo myisamchk -a /Library/MySQL/var/test/cpg11d_users
Checking MyISAM file: /Library/MySQL/var/test/cpg11d_users
Data records:       1   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2
- check record links
[Mooreys-G4:/Library/MySQL/bin] moorey%


Ok good luck - I'm going out for the rest of the day.  Remember I've never used these commands so it's a bit of trial and error.


I'm using the latest version of PhpMyAdmin...the funny thing is this, as for saying that MySQL isn't working as a whole... I thought that too, so I went to check out my other stuff that is dependent of MySQL, and so far Coppermine is the only one effected....

I'll try thoes other commands when I wake up later today... thanks, if anyone else has another suggestion please suggest, or tell, because right now I do not really wish to go into the terminal for trail and error functions, since this is live data, and I really don't need to loose more than I have now.

Cyberpawz
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 18 queries.