Hello,

I was trying to add some php code to a block that i created that appears on every page of my site. The code didnt work and now every page of my site while logged in is blank. Is there any way to disable this certain block without using the browser? Such as through the mysql database, or by somehow disabling php from blocks only?

Any help would be appreciated.

Thanks

Comments

vm’s picture

you can shut it off in the database.
hard to give you step by step without knowing what the blocks name is.

use phpmyadmin and search your db for what you named your block. this should begin to point you in proper direction.

ktonini’s picture

should i just set its "status" to 0?

vm’s picture

yes

mbx’s picture

Can you provide a bit more detail on how to achieve this. ie. mysql commands? name of table/field with block configuration stored in it? or how to find out which blocks/modules are enabled etc...? I don't have phpmyadmin, just shell access... Any pointers, even just to reference doco would be much appreciated.

My Drupal site is dead (I have a blank screen with access denied on it), so I am wanting to disable (custom) blocks and (contrib) modules to see if that helps...

I'm using Druapl 4.7.3 with MySQL version 12.22 Dist 4.0.24

Cheers,
Matt

mooffie’s picture

I don't have phpmyadmin, just shell access

1. Connect to your database:

mysql -u YOUR_USERNAME -p YOUR_DATABASE_NAME

You should get a "mysql>" prompt.

2. Type show tables; to make sure you've connected succesfully to your database. This command prints all your drupal DB tables.

3. Type:

update blocks set status = 0 where module = 'block';

This disables all custom blocks (one of them is your PHP block). You're done.

------ EDITED ---------

I have a blank screen with access denied on it

Oh, I now see you're not the original poster.

We don't have a reason to suspect there's a problem with one of your blocks. That was the original poster's problem.

I have a blank screen with access denied on it

I suggest you check the FAQ:

http://drupal.org/Troubleshooting-FAQ

or start a new thread.