Drupal 7 Skills

Question 1: Can’t overwrite or delete settings.php
It’s a smart security setting of drupal
You need to add permissions to write not only the settings file but also the folder where it is.
Don’t forget to put the permissions back as they were once you finished editing the file.

Make a php page with this code:


replace “path/to/file” with your path to the file, ex: sites/default

That should do it for you.

Oh..important, delete that page as soon as your done!!!

I think its important to note that you need not include the file name. Just the path to the file directory.

sites/default

Question 2: Drupal 7.24 and 6.29: tmp directory and .htaccess
move “/tmp” folder to “./suxun”, or “../tmp”,or “./tmp”, just change according to your tmp place, error disappeared!
In this folder has this .htaccess

Deny from all
# Turn off all options we don't need.
Options None
Options +FollowSymLinks
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006

# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003

# If we know how to do it safely, disable the PHP engine entirely.

php_flag engine off

Question 3: How to show blocks only on frontpage of the site?
select “Show on only the listed pages” from Show block on specific pages, and type “” in the box, save and done.