Register Arama Bugünkü Mesajlar Tüm Forumu Okundu Say

Reply
 
Thread Tools
Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access
vB.Org Poster
vB.Org Poster has disabled reputation
Kayıt Tarihi: Jul 2018
Mesajlar: 298

Show Printable Version Email this Page
Makale: vBulletin 4 Makaleleri, yazan vB.Org Poster 09 Jul 2018, 23:48

SKILL LEVEL
  • Beginner (Level 1): Understands basic file uploads and template editing.
  • Intermediate (Level 2): Beginner + Understands basic modification and plugin installation.
  • Advanced Intermediate (Level 3): Intermediate + Understands how to read and comprehend partially PHP and vBulletin syntax plus understands the concepts of interacting with the database.
  • Experienced (Level 4): Advanced Intermediate + Understands how to fully edit and modify a database via phpmyadmin or other including executing SQL queries and more.
  • Master (Level 5): Experienced + Can edit, write and create custom modifications and code. Edit database freely w/o worry or issues and more.

Modification Issues? Not the first or last time you say?

It's either happened to you before or simply not yet! What would that be? On occasion modifications can have some unpredictable or down right "finicky" behavior dependent on a number of possible factors, the end result could possibly have locked you out of your forums control panel.

Normally you can simply disable hooks (modifications and plugins) by doing the following:

Edit config.php and add this directly below <?php:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Example:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Now save and upload that to includes/ and overwrite the original config.php - That typically allows you access the control panel again, you can now disable the modification you believe is the culprit OR disable them all. Once disabled remove the added line you included in config.php and re-enable one modification at a time until you find the modification in question.

If however your completely locked out for some unknown reason, password not functioning or well ohh geesh sometimes people put themselves in a bind plain and simple when trying their best! To get back into action, if you have phpmyadmin or access to the database directly you can execute a SQL Query to enable or disable any modification.

Running a backup on the tables mentioned below OR an entire database backup is STRONGLY recommended before beginning!

__________________________________

Disable a Modification:

phpMyAdmin > Select the Database in question > Now click on the "product" table > Once loaded find the title of the modification in question, note the productid*

Now for our demonstration let's pretend something is wrong with the CMS included with the vBulletin Suite and it's caused for some odd reason you to become locked out of your admincp, you would find vBulletin CMS in the title, and the productid is what? Yes it's vbcms.

Now you can click SQL and paste this query:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Run the query, now the CMS is disabled in the options however as Lynne noticed it must also be disabled in datastore . So while in phpmyadmin:

Edit datastore
Edit products
Edit data

Find:

s:5:"vbcms";s:1:"1";

That's the snippet of code you want to find, it also tells the forum what is enabled and disabled i.e. the cache follow? So change the 1 to a zero to disable example:

s:5:"vbcms";s:1:"0";

Remember your only changing that one value directly after vbcms and s:1 nothing else and you should have many more lines of code similar to that.

Save the change and refresh, now the CMS is completely disabled, if it was the "culprit" not allowing access for whatever unknown reason you may now access the site and or admincp. You can re-enable the modification using the Product Manager once you resolve the issue and run the query again in regards to datastore to enable it again, 1 being active.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Active set to 0 = Disabled
Active set to 1 = Enabled

You can now disable modifications using this method one at a time until your able to login to the admincp, then sort the issue and re-enable your modifications quickly via the product manager.

__________________________________

Disable a Plugin:

phpMyAdmin > Select the Database in question > Now click on the "plugin" table > Once loaded find the modification title of the plugin in question to ensure your disabling the correct one and if it is part of the modification causing the issue, note the pluginid*

Now for our demonstration let's pretend you uninstalled a modification however afterwords you receive a white page w/ error text or similar... something went wrong with the modification (either something coincidental or the author did not write the uninstall code correctly) and it's caused for some odd reason you to become locked out of your admincp, in phpmyadmin execute this query:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

*The above per Steve Machol disables the plugins in one query, I originally had you all hunting down individual plugins however Steve commented w/ a good question and a better method i.e.



Therefor use that SQL query to disable all plugins, now access admincp and delete the plugins associated with the mod you had issues uninstalling!

.........................................

Continue below to disable one plugin at a time - Not required if you use the above method.

If for some reason you would like to disable a single plugin only then you would find the modification name in the "product" area... basically every plugin installed under that product will have the same product name in the plugin table however the pluginid is the actual plugin #. If the pluginid is 937 and you know it's one of the plugins you need to disable in order to get things rolling then execute this query in phpmyadmin:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Run the query, now the plugin is disabled, if it was the "culprit" not allowing access for whatever unknown reason you may now access the site and or admincp. You can run the query again and change active=0 to active=1 and re-enable:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Active set to 0 = Disabled
Active set to 1 = Enabled

You can now disable plugins using this method one at a time until your able to login to the admincp, then sort the issue and re-enable your plugins quickly via the plugin manager.

__________________________________

Notes:

You can disable multiple modifications or plugins by adding a ; behind the query and listing the new command on a new line as shown:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

If your tables have a prefix i.e. vb_ then add that before the first table names in either command i.e.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

This is just a tidbit of information, it could prove to be quite useful for a few here and there otherwise it's not required in the least and will never be used by 99% of you .
Views: 31
Reply With Quote
Reply

Thread Tools

Şunları Yapabilirsin
Yeni Konu Açmak
Konuya Cevap Yazmak
Eklenti Eklemek
Düzenleme Yapabilmek

Forum Atla


LD'de Yeni misin? Yardıma mı ihtiyacın var?

All times are GMT +3. The time now is 05:32.

Tasarım Özelliği | Genişlik: Geniş Renk: Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access Disabling Modifications OR Plugins via SQL Query - Fix AdminCP/Forum Access