0

I am trying to change the background image provided in the theme. Below is the CSS snippet from style.css file:

.toplayer{
  background: url(../images/theme.png) right no-repeat;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
}

I put the new background image in the same directory and tried to change the background by overwriting the above CSS in following way:

background: url(../images/background.png)

After clearing the Drupal cache, I reload the page, but I don't see the new image. At the same, I tried to access the image from my browser, and got the following error:

Forbidden

You don't have permission to access /new/themes/drupal_theme/images/background.png on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Later on, I moved theme.png and rename the background.png as theme.png but I still see the old background image.

1

I think Your have 2 configuration problem.

  • File Permission (in Filesystem)
  • ErrorDocument Attribute (in Apache Webserver)

First, You can solve permission error using 'chmod' command to the sites folder of drupal.

Try this:

chmod -R 777 directory (777 means allow permission for all)

Second, ErrorDocument handle error can occured from invaild ErrorDocument attribute setting in .htacess or httpd.conf(or apache2.conf) file.

Try this:

  1. check your .htacess file in 'install/' directory. If you can not check this file, you can try 'ls -al' command in terminal. you have to find 'ErrorDocument' attribute, and remove or correct it.
  2. check your apache webserver configuration file (httpd.conf or apache2.conf). If you can check 'ErrorDocument' attribute, you can try remove this attribute in file. It is temporary, so you must backup it before try suggested cases.
  3. If you can not solve by case 1 and 2, you can try disable 'AllowOverride' attribute. Try find 'AllowOverride x' attribute and replace to 'AllowOverride None'. Because, this problem can have possiblity from .htacess file in parent directories. AllowOverride attribute can control allow or deny additional configuration in .htacess file.
  4. You must restart apache service after try this cases. you can try 'service httpd restart' or 'service apache2 restart' command.

Hope this helps you...

| improve this answer | |
  • You're always welcome :) – PraveenKumar Aug 14 '17 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.