[Solved] Images in Themes not working

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

[Solved] Images in Themes not working

Post by johnortt »

Hi everyone,

I have just completed a fresh install and everything seems to work fine except for the background images from the theme.  As a result all my menus have no background colour or image and are practically unreadable as text is written over other text.

The site can be seen here: www.xxxxxxx.com/cmsms (Links removed for security)

The only modification I did was to add .htaccess files as CMSMS was installed in a subfolder

My system info is:

CMS Version
1.6.5
Current PHP Version (phpversion):
5.2.6
Server Database (server_db_type):
MySQL (mysql)
Server Database Version (server_db_version):
5.0.77
Server Software (server_software):
Apache/1.3.41
Server Operating System (server_os):
Linux 2.6.18-128.1.16.el5PAE On i686

P.S. I did try to post this problem before but it doesn't seem to have worked.  Hopefully second time lucky...

[administrator: erased website name]
Last edited by johnortt on Wed Sep 30, 2009 8:13 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

Hi johnortt

When I call http://www.xxxxxx.com/CMSMS/images/cms/external.gif directly in the browser I'm getting a error 500.
So probably your url_rewrite settings are wrong at some point.

Disable pretty url and see if the images are back on the site again.

Perhaps you can put the text off the .htaccess file here.

Hope this helps, Rolf


ps. Your website is in a folder. Did you set this into the .htaccess file?

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /CMSMS/
Last edited by Rolf on Wed Sep 30, 2009 7:53 am, edited 1 time in total.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Thanks for the reply Rolf.

I have tried switching off pretty URLs by disabling the htaccess files and commenting out the config file but it didn't seem to help.  The following is what I have got in my htaccess files.  I have removed all the commented out lines.

The following is at the top level to redirect URLs to the CMSMS folder:
-----------------------------------------------------------------------------------------------------------------
RewriteEngine on
RewriteRule (.*) CMSMS/$1 [L]
-----------------------------------------------------------------------------------------------------------------

The following file is in the CMSMS folder at the top level:
-----------------------------------------------------------------------------------------------------------------

RewriteEngine on
RewriteBase /CMSMS/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

-----------------------------------------------------------------------------------------------------------------

Let me know if you need the config file aswell.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

Hi,

You better try to switch off the .htaccess file at all. Rename it back to htaccess.txt
Look in the root and the cmsms folder for .htaccess files!

Change all the settings in the config.php file back to the default values (url_rewriting=none).

The images should appear again (I hope  ;) )

Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Argghhh,

It didn't work Rolf.

I renamed the two .htaccess files to htaccess.txt and then replaced the config file with the original unaltered one.

I then logged in and went to site admin > global settings > advanced setup where I clicked the 'clear cache' button.

I then logged in again but only to find the same problem.

To try to get to the root of the problem I tried right clicking on an image and inspecting the code using chrome.

the src is listed as: "uploads/NCleanBlue/screen-1.6.jpg"

The source for the printer icon (which does show) is: "modules/Printing/printbutton.gif"

Both of these pats seem to be correct....I am at a loss!

If you have any further advice I would be very grateful.

Regards,

John
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

pfff  :-\

Let me think.........

Folder permissions uploads folder? Should be something like 755.
If I set it on my testsite to 444, I get the same problem.

®
Last edited by Rolf on Mon Sep 28, 2009 1:16 pm, edited 1 time in total.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Sorry Rolf,  That still didn't sort it.  I tried 755 and even 777 (with full recurse on subfolders) but with no luck

I have decided to try a clean upload and install to see if I get the same problem (without worrying about pretty urls).

I'll post again to let you know what effect this has.

Thanks for persevering with me!

Regards,

John.
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Okay,  I have just deleted the whole site and re-uploaded followed by installation and I still have the same problem.

We can now discount the pretty URL code as the problem....
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Now going to go a step further back and re-download from CMSMS site to ensure original file wasn't damaged.

Up until now I have not used the checksum files but this time I will try it.  If I download the two files at the top of the downloads list is that all I need?  I was then going to use 7-zip to extract the files and then ftp them to my site. If I have missed anything please feel free to call me an idiot :)
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

John,

Can you pm me admin login info, so I can look for myself?

Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Hi Rolf,

Did you just get the PM?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

Hi John,

I think your problem is that al your folders have the permission 707 in stead of 755.
and all files have 604 in stead of 644.

How does this happen? I don't know, probably due to server settings...  :-\

Just changing all the folders and files by hand, don't think thats an option.
Think you have to talk to your web host, there are also some attention points in the System Information.

...
Tried to change the permissions of some folders and files, but it didn't help.
Yes, try to contact your web host, perhaps he has a solution!
...

Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

Thanks for taking so much time Rolf.

I'll see if I can change them myself via ftp and if not iI'll speak to my host.

I'll let you know how I get on.

Regards,  John
johnortt
Forum Members
Forum Members
Posts: 12
Joined: Wed Sep 23, 2009 5:23 pm

Re: Images in Themes not working

Post by johnortt »

I don't want to jump ahead of myself but I have solved the immediate problem.

The images now display correctly.

To do this I renamed the .htaccess file to htaccess.bak in the uploads folder (effectively disabling it).

This wasn't my idea, I did a search for "CMSMS Fasthosts" on Google and from there came across the following link:
http://drupal.org/node/153335

It described a very similar problem for someone setting up drupal and thankfully the same solution worked.

Now for the next problem......

Has disabling this .htaccess file had any unforseen side effects?

For info the contents was:

-------------------------------------------------------------------------

# To deny PHPs
                                                                             
  order deny,allow                                                                                                           
  deny from all                                                                                                               
 

--------------------------------------------------------------------------
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Images in Themes not working

Post by Rolf »

Hi John,

The .htaccess file is there to protect your uploads folder against non-cmsms scripts-files which hackers use to put strange stuff in your files....

®olf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “[locked] Installation, Setup and Upgrade”