Hi folks

Bit of an urgent dilemma:

  • We have various sites running various scripts including Drupal 6 and Drupal 7
  • At the weekend, I wanted to install another site (non Drupal) that has PHP 5.4 as a requirement (we're running PHP 5.3)
  • Checked all the scripts we use and all stated they support PHP 5.4 so upgraded the server
  • Unfortunately, our most important site (non Drupal) had issues even though all other sites (approx 25 using various scripts) where fine including test sites running the same as our most important site
  • Decided to roll back to PHP 5.3 and troubleshoot our most important site locally before trying the PHP upgrade again
  • Most important site is back to being fine as are all others apart from ... our second most important site running Drupal 6
  • Functionality of the Drupal 6 site seems to all be fine but no matter what theme I try it will not render (see below)
  • I've tried numerous themes, cleared all caches numerous time, ran updates numerous time but no luck
  • It does render properly when I try running updates (see below)
  • There doesn't appear to be anything in the logs pointing to the issue

Pic of site not rendering: http://tm.cfals.info/normal.jpg
Pic of database update rendering fine: http://tm.cfals.info/update.jpg

Any pointers as to how to resolve/troubleshoot this issue would be much appreciated; been pulling my hair out for the past five hours or so :(

In the meantime I've put the site into maintenance mode but pretty sure the complaints will start rolling in soon.

Comments

Jaypan’s picture

The site is rendering fine, but it appears your CSS is not being properly applied.

Try turning off CSS caching and see if that allows for the CSS to be applied properly.

no_idea_yet’s picture

Thanks Jaypan, that never occurred to me.

Although it appears to have helped, still not right. Updated pic of normal view at http://tm.cfals.info/normal2.jpg.

Turned off CSS caching as you suggested > cleared all caches afew times > tried various themes a few times, still no go.

Disabled every type of caching/compression on admin/settings/performance and cleared cached data a few times to no affect.

Also tried switching on all error reporting via the index.php file i.e. adding the following to the top of the file straight after the opening PHP tag:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

But no errors showing sadly.

Also, forgot to mention in OP that after a few hours getting nowhere I actually restored the site from a weekly back up prior to posting a cry for help here.

Jaypan’s picture

The only other thing I can think is that it is a file permissions issue, however if you haven't moved/changed any files, then this doesn't make too much sense.

What happens if you view the HTML source for the page, and try to directly access the CSS files in your browser?

no_idea_yet’s picture

At the moment not a lot makes sense to me at all ... think my head is about to explode from all the googling and reading :)

Viewing page source (right click > view page source) brings up the source as it should.

Going directly to /sites/all/themes/pixture_reloaded/layout.css in the browser brings up the CSS as it should.

When things like this happens always seems to be the most important sites that get borked!

JosRomate’s picture

Post the url of the site. We migth be able to help you better if we see the problem.

no_idea_yet’s picture

But it's ugly! lol (seriously though it is even when working, we're looking into a major revamp this month and going to D7)

Just taken it out of maintenance mode: http://repository.cfals.info/

Jaypan’s picture

Well, all the files that are failing are in your sites/default/files folder, so I'm guessing one of two things:

1) That folder has been deleted somehow
2) The permissions are incorrect on that folder (they should be 755 rwx-rx-rx or 775 rwx-rwx-rx).

no_idea_yet’s picture

Thank you! Looks like you're onto something there ... folders are still 755 but looks like somehow all the files have changed to 642? (Pretty sure they should be 644.)

Will hopefully post back soon that all is right with the world and I can sleep tonight.

Edit: just checked another site and the file permissions in that location are indeed 642 :(

Will look into it further though.

Jaypan’s picture

642 is wrong. Change the permissions to 644. Settings.php should be 444.

Edit: This is definitely your problem. The last 4 stands for 'read' permissions, for any user who doesn't own the file, or is a member of the group the file belongs to. Because it's a 2, users do not have permission to read any of those files, and therefore your files are not loading for users.

no_idea_yet’s picture

Permissions do seem to be a tadge screwed :(

Quickly replicated the site (rsync and database dump into a new site) to test it out.

From the "default" directory tried running:
chmod -R 644 files/

But got:
chmod: `files/': Permission denied

Did an ls -al and got:

drwxr-xr-x 3 UserName UserName 4096 Oct 10 2012 ./
drwxr-xr-x 4 UserName UserName 4096 Oct 10 2012 ../
-rw-r--r-- 1 UserName UserName 9415 Oct 10 2012 default.settings.php
drw-r--r-- 13 UserName UserName 36864 Oct 26 21:53 files/
-r--r--r-- 1 UserName UserName 9430 Oct 10 2012 settings.php

Where "UserName" is correct for this site (permissions on "files" is wrong for a start!).

Anyway, going through manually on this new test site and changing the permissions looks like it's going to be a winner so many thanks indeed Jaypan, you're a life saver :)

Looks like another sleepless night ahead going through and physically checking every site.

Jaypan’s picture

Ask your host to do this. If they are any good, they will.

no_idea_yet’s picture

The site in question is back to it's ugly self thanks to you pointing me in the right direction.

Didn't take that long in cPanel to change them all, my host company is pretty cool and would no doubt have done it for me but I prefer to use them as a last resort ... I'll use this "exercise" to find out more about permissions, guessing if I sudo chmod it would work but I'll try that on the test site tomorrow (2:30 am here so time to recharge).

Thanks again for your help Jaypan, very much appreciated.