|
As per my last post on what I thought was a failed PHP upgrade it turned out to be a damaged table in my MySQL database.
I know most of my regular readers are not going to be interested in this, but I like to write about how to overcome problems with Open Source software especially as it can help others who later experience the same problem and search through Google to find someone elses answers. This is my way of giving back to the community that provides the free Open Source software that I use...
My initial problems were two fold. I use Joomla Content Management System for this websit, during some recent work on my website I encountered some weird problems, these turned out to be a major power failure at the datacenter. I left the site and came back much later in the day and continued my work - at this time installing a auto-responder for my site. this required an upgrade to the php packages on my web server.
So I did the upgrade with 4 packages being upgraded that were in use, and one package failing. The failed package was a webserver/mailserver written by a Russian fellow, since I already have both of those sorted I did not worry about this package failing.
The immediate effect was that a stats colecting program called JoomlaStats ceased to function with a pile of errors, since I have superceded this with Google Analytics anyway I just uninstalled it without checking hte errors - my mistake number 1.
However a couple of days later while browsing my site - I have to do this occassionally to (a) remind myself of what I have already written (b) check that it is all working - I noticed that my photos were not being called if clicked on.
I immediately thought back to what I had done and thought that it must be due to the Open Source Menalto Gallery2 not functioning with the version of PHP that I installed, so I headed over to the forums there to search for clues as to what might be wrong and how I could fix it.
After scavenging around there for a while I found how to turn on debugging mode in the Gallery2 software and get a complete output of exactly what the software was doing and failing at.
The error I found was that I had damaged tables in my MySQL database, and I had to repair them.
How To Repair Damaged MySQL Tables
- Log into PhpMyAdmin as root user
- In the far left hand pane choose the database you want to repair
- Then in the right hand pane scroll all the way down, just under the table there is a link that says 'Check All' click on this then in the drop down box next to that click on Analyze table
- Then when it run the analysis scroll back down looking at the errors in the far right colum of the right pane, there could be some errors in here, in the left pane click on the corresponding database table name to get full details.
- In the right pane again click on 'Check All' then in the drop down box choose 'Repair Table', wait until it finishes running
- Again click on 'Check All' then in the drop down click on 'Optimise Table' since we are here we might as well get it all running as good as possible.
There, that is how you repair damaged MySQL tables with PhpMyAdmin which most webservers have installed, if you don't have this look for similar in your MySQL web interface, if you don't have one then I strongly suggest you install PhpMyAdmin, it makes your MySQL database management easy... as the only other option is to learn command line MySQL commands and go from there.
|