By talvi on
Fatal error: Class 'Botcha' not found in /home/phoenx/public_html/psychosocial/sites/all/modules/botcha/botcha.module on line 233
I had updated the modules, uploaded the new file for Botcha (the only thing required apart from the security update of Drupal), clicked install and then crash.
Prior to this I had tried to add new content (as administrator) and got the messgae that I had to first create a content type! However, the basic content types were still present. Hence my check on updates to see if that was causeing some glitch.
Is there anything I can I do or is it a reinstall?
Comments
=-=
roll back to the old files which you should have backed up before updating the module.
if necessary roll back to the backup of the DB which should have been backed up before you updated the module
if you neglected to make backup, enter the system table of the datbase
locate the row for the module in question
edit it and set the status to 0
save and test
the above will disable the module.
In CPanel MySQL there are
In CPanel MySQL there are three databases that look relevant: drpl1, hclv1 and mdle1. Is it one of these? Since the days of dBase I've not used databases directly. Are these ones (assuming they're the right ones) viewable/editable from OpenOffice and is that recommended?
Thanks for replying VM. I really appreciate it.
Could the suddenly "missing" content-types be related to the crash? The favicon reverted to the old version http://drupal.org/node/1815300 Does this all sound like par for the course?
I hadn't expected recovery, and I'm probably underestimating the work I've done to date, but if Drupal is steadily getting itself into a tangle as it is configured, perhaps a total rewite, saving the basics, is good practice?
You can tell which database
You can tell which database your site is using by opening your settings.php file in a text editor and looking for the database settings. You will see the database name there.
From your first post, did you run update.php after installing the updated module files?
Try to solve one problem at a time - the content-type error may, or may not be related so get your site back working first.
Forget OpenOffice it's of no help at all. To view your database you need to use phpMyAdmin or whatever your cpanel provides.
Found and edited it - No change
Brilliant, thanks Patroclas.
Where is the setting.php file located? I can't find it.Located in: /public_html/sitename/sites/default/ The only reference there is to drpl1 :-
UPDATE `phoenx_drpl1`.`system` SET `status` = '0' WHERE `system`.`filename` = 'sites/all/modules/botcha/botcha.module';
No change to status:
Fatal error: Class 'Botcha' not found in /home/.../sites/all/modules/botcha/botcha.module on line 233
------
btw.
I ran the update script first, then checked for updates, then clicked to download and install, and then the system crashed (I think :/ ). cPanel does uses phpMyAdmin
The question of Drupal getting tangled relates to the way WYSIWYG html editors would steadily get the code into a knot. I wondered whether Drupal's editing of code, carried out via the UI, suffers from a "similar" problem. I agree, one problem at a time, just that there seem to be so many "glitches" perhaps caused by code clashing between different modules etc ... another example is not being able to get footnotes to function whilst freelinking (installed prior) works fine.
Do you have a backup of the
Do you have a backup of the database from before the crash?
Do you have a backup of the botcha module previous version?
If so, upload the old botcha files by ftp and then restore the database backup via phpMyAdmin
I don't know why you are talking about WYSIWYG. It's not relevant at this stage.
You may be confusing the 'update script' with update.php. After you install a new version of a module you have to run update.php to update the database.
=-=
that indicates that your query did not work. obviously the bot.module is in there somewhere as it's module you tried to update thus it must have been enabled.
Wires crossed?
VM - wires crossed? I did as you advised:
In phpMyAdmin
Opened the table "System"
Located the line for Botcha and set the status to zero
Confirmation msg: `phoenx_drpl1`.`system` SET `status` = '0' WHERE `system`.`filename` = 'sites/all/modules/botcha/botcha.module';
No change ie no access to the site
Browser displays: Fatal error: Class 'Botcha' not found in /home/.../sites/all/modules/botcha/botcha.module on line 233
Patroclas
I have no database backup (there's only a few pages of content)
I have the "tarball" of the Botcha module
Agreed, WYSIWYG is not relevant except as part of a general query about Drupal.
The update process I followed was that set out in the UI. From memory the phrase used with the link is: "run update script". I've never run update.php (or any other process) manually i.e. externally to the UI.
=-=
no wires crossed. That's how a module is disabled manually in the DB. Essentially is is the same as unchecking the module in administer -> modules and saving the form. The fact that the module is still running even though it's been disabled is another issue. In performing a search with google against the issue queue of the module in question using the error you posted, the issue is already reported: http://drupal.org/node/1828710
That said, you can try removing the folder from the install to stop the code from running and see if you can regain access to the site or test the patches the maintainer is posting to move the issue forward.
In future you may want to follow best practices so as not to put your production site in this type of predicament.
As an aside update.php should always be run after updating modules and core. This is documented. update.php isn't run from inside the UI.
crossed: misunderstood, clarified: renamed, no change, delete?
Our wires were crossed VM, I misunderstood what you wrote. Thanks for clarifying the situation: Botcha is "disabled" but is stll being called.
I located a Botcha folder in:
/public_html/.../sites/all/modules/
and renamed it. No change:
Fatal error: Class 'Botcha' not found in /.../sites/all/modules/zzzzbotcha/botcha.module on line 233
So the script (?) continues to look in the same folder even though it is a different folder? Can I stop the script doing so?
Is it best practice now to simply delete the modules folder??
I gather that the update.php file is run directly via in the browser by logging on as admin and simply navigating to http://...mysite.../update.php Is this correct?
Asides:
Québec wrote in that issue yesterday: "on upgrading to the new version, I got a Fatal error. I assumed that there was no path for the upgrade. So I reinstalled the previous version, uninstalled it and loaded the stable version. Everything looks ok."
but doesn't share how s/he recovered in order to be able to reinstall, nor why s/he reinstalled then uninstalled then installed again.
We all live and learn, but best practices can only be followed if they are visible, and imo they're not visible "in the basement of the Vogon Town Hall". Here is the first time I've heard of the need to run update.php. If it is essential practice, then fwiw imo it should be referenced in the existing note of the module install UI.
If I can recover from this then I aim to uninstall/clean out Botcha. I don't want to apply patches. My aim in using a CMS/CMF is to avoid working under the hood - following the "KISS" approach.
=-=
running update.php = yes you should call it from your browser and should be completed before any further steps are taken.
Stop script and/or delete folder?
The script (?) continues to look in the same folder even though it is a different folder? Can I stop the script doing so?
And/or Is it best practice now to simply delete the modules folder??
=-=
please confirm that you ran update.php? the idea is that it will correct the path as it parses and caches .info files within modules.
if you have , then the only thing you can do at this point (since you won't engage in testing of patches) is to remove the folder from the install and see if that will allow you past the error and back into your site.
docs from drupal.org with reference to updating contrib modules = http://drupal.org/node/1782798
as an aside, when you update through the ui the following appears:
The text run database updates is a link to update.php. Thus, if you've been clicking that link after every module update/upgrade, you've been running update.php.
Lastly, the note of the best practice to backup the database and a link to the directions on how to perform said task is presented to the end user before updating the module. Regardless of the amount of content, your time is still invested in setting up the site and so on and best practices protect your investment.
*note: the repeated references to follow best practices aren't placed here just for you. They are placed here for future readers in hopes that they will learn from the mistakes of others and create a workflow that protects their investments.
Ahah, great stuff VM
I didn't, I was waiting to figure in what sequence to do things. So, first it's run update.php and then it's delete the folder.
I've been checking updates almost daily, and updating if required. I've done this through all routes available in the UI, in order to double/triple check, and as you surmised have therefore been running update.php as a function of updating the databases. So all good news :)
I hear you about others who may follow this, and offer this for backing up databases http://drupal.org/upgrade/backing-your-site-gui and this for updating the core http://drupal.org/node/1494290, both short and sweet and hopefully complete now.
*ps would be great if you'd check/comment on item 8 (of the second link). I copied it across from another longer page but I feel it's a little ambiguous - do the individual lines of the files need to be re-edited in the new files or can the originals be used?
=-=
if nothing has changed in the file then certainly the old one can be used. You can run a diff on the old and new files and inspect what has been changed. for some it's easier to just add their changes anew rather than inspect first. You shouldn't just "use" an old file without checking if something was altered in the new file first. Obviously if a security change or a bug fix went into the new file and you continue to use the old file then you are either missing the bug fix or leaving yourself open to security issues.
Petrol on the fire....
Changed permissions to 750, changed and uploaded settings.php, ran update script (yeah it just went into the routine in the UI, said there was a oending update but would let me choose what to do so I continued. Maybe that was a mistake. Error returned:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://.../update.php?op=selection&token=mj7khRif-V4dZws3sxDQi0MxNKcmSmuk2LXwLZoxues&id=191&op=do StatusText: OK ResponseText: Fatal error: Unsupported operand types in /home/...includes/database/mysql/schema.inc on line 85
Tech support identified this as a script error. Tried to access the home page via the address bar and got a mess:
Site under maintenance
We should be back shortly. Thank you for your patience.
Error
The website encountered an unexpected error. Please try again later.
Error message
Warning: Cannot modify header information - headers already sent by (output started at /home/.../includes/common.inc:2608) in drupal_send_headers() (line 1239 of /home/.../includes/bootstrap.inc).
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:341:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT f.name,f.type,ftd.title,ft.ftdid FROM {biblio_fields} f INNER JOIN {biblio_field_type} AS ft ON ft.fid = f.fid INNER JOIN {biblio_field_type_data} ftd ON ft.ftdid = ftd.ftdid WHERE ft.tid = 0; Array ( ) ";s:9:"%function";s:19:"biblio_views_data()";s:5:"%file";s:85:"/home/.../sites/all/modules/biblio/views/biblio.views.inc";s:5:"%line";i:57;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://.../ [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 84.250.130.175 [:db_insert_placeholder_9] => 1351890599 ) in dblog_watchdog() (line 154 of /home/.../modules/dblog/dblog.module).
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 1039957372509436a7e87961.41053096 ) in lock_release_all() (line 269 of /home/.../includes/lock.inc).
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/.../includes/database/database.inc:2136 Stack trace: #0 /home/.../includes/database/database.inc(2136): PDOStatement->execute(Array) #1 /home/.../includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array) #2 /home/.../includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /home/.../includes/lock.inc(167): db_query('SELECT expire, ...', Array) #4 /home/.../includes/lock.inc(146): lock_may_be_available('theme_registry:...') #5 /home/.../includes/theme.inc(447): lock_acquire('theme_registry:...') #6 /home/.../includes/bootstrap.inc(427): ThemeRegistry->set(Array) #7 [internal function]: DrupalCacheArray in /home/.../includes/database/database.inc on line 2136
Seems that running that update.php poured petrol on the fire...???
**
ps edited item 8 so it's all now crystal
=-=
clear the cache tables in the DB (manually)
clear the watchdog table in the DB (manually)
run update.php again (use a different browser if necessary)
Which database(s) and what's the prob with FF?
Which database(s) VM? Or all of them?
What problem are you identifying with using FF 16.0.2 to run update.php?
=-=
the tables mentioned to empty are those in the active database.
Based on your pasting of errors you've multiple issues occurring. The idea here is to try and stabilize your database so that it doesn't keep "going away". If you've not taken the time to read each line of your own errors, I highly suggest you do. You can paste the main parts of the error into google (as I am) to research your issues.
Clearing cache tables removes anything stored in the cache that is stale. The thought here is reducing the size of the database while while debugging.
clearing the watchdog table because it's flooded with error messages. The multitude of errors is causing mysql to stop working will also aid in reducing the size of the database while debugging.
the problem trying to be identified with trying a different browser is the ajax error.
not sure what you're trying to state above.
Apologies for the delay VM
Let me explain.
A fatal crash while doing a routine module update via the UI has led deeper and deeper into the forest with no way out in sight. Luckily the install was only on the threshold of becoming live so there were only a handful of subscribers but... it's been a blow.
From your replies I am concluding more and more: "When in a hole stop digging". The fundamental question then becomes something like: "How is it possible to manage a site via the UI so that Drupal remains stable?", and the key issue seems to me therefore to take a view on what caused the crash. Was it:- a) the module, b) the Fantastico install, or c) Drupal? As Drupal has only been managed via its UI the most likely seems c).
.
.
.
.. jaw-jawing a bit on these things:
The prime benefit of CMS/CMF (eg Drupal) for me is to automate site management so substituting new overheads for old is only marginally helpful. It's not a question of me "taking the time to read each line of (my) own errors". Although I did an honours in Computer Science, I've no detailed knowledge of MySQL, php, etc and I would need to become knowledgeable in this (and much more) for reading through and researching the error msgs to become very helpful.
Botcha isn't the only headache. Other modules and even the base theme have failed to operate as described. Perhaps this points to b) being the cause of the crash, but as these forums are full of probs with "technically oriented" solutions (patches, custom code, etc), I wonder if c) isn't still favourite. Perhaps Joomla or ModX would be "better" options for a simple, robust CMS/CMF? That would be fine I guess, though frustrating, as core Drupal, plus a "basic" half a dozen modules (freelinking, captcha etc), really seems perfect.
As you asked: the quote which you didn't get suffered from editing-blindness. It should have read:
.
The bottom line here is that the dog, that here being the site's content, has to wag the tail of its enabling IT, no matter how impressive that IT might be. Drupal seems very fragile at the moment, appearing to be just what the doctor ordered only to then fail, first by simply not doing what it/its modules says on the box, and then crashing out completely.