Problem/Motivation

I get no background header images. 'Header image rotator' is turned on in the settings and the default images that came with the theme are in the _custom/headerimg/ directory, but the header background is just white.

I am running Drupal-7.28.

Comments

florian’s picture

Assigned: Unassigned » florian

I am sorry I can not reproduce it. May I have access to your website?

vls’s picture

Yes, it is hightek.org. I created a temporary semi-admin login I can give you if you need it. If you email me at drupalsupport@hightek.org I can email you back the login information.

vls’s picture

OK. I finally found the problem. In the main css file for the theme, style-zero.css, it is running ../_custom/headerimg/rotate.php to load the header image. My nginx web server configuration was only allowing PHP scripts to be executed from the root of the drupal directory for security. I made an exception in my nginx configuration for now, for that one script, which fixed it. However, I'm not an expert in this but it seems that the common consensus by others is that it is not a good idea to run PHP scripts from CSS for such things. There is a discussion here

https://groups.drupal.org/node/150619

from back in 2011, about this same issue with the zeropoint theme. One person posted this response from his web hosting company where they would not even allow it.

This is expected. Our configuration doesn't support
any php files in themes.

By the way, it should never be used. Any image rotation
etc should be handled via javascript, so it is a bad practice
in the theme design, as images should never be served
via php (unless for imagecache module).

It is also pointed out in this discussion that this PHP method prevents the browser from being able to cache the images causing slower page loads because it has to retrieve the background image with every page load.

Thanks for working with me to try to resolve it.

Regards,
Vincent

florian’s picture

Status: Active » Closed (fixed)

This was fixed in versions 7.x-4.x and 6.x-4.x