Forums / Installing on a Linux/Unix Server / Site just looks wrong - what have(n't) I done?

Site just looks wrong - what have(n't) I done?

Locked

Started by rick_yard on 30 Mar 2010, 6:42 PM · Views: 5,658

Results 21 to 40 of 42
This thread is locked. New replies are disabled.
30 Mar 2010, 11:27 PM
#21
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Site just looks wrong - what have(n't) I done?

If renaming/deleting/editing the htacess in the includes folder DOES solve this, he also needs to do the same in the admin/includes folder I think...?

30 Mar 2010, 11:31 PM
#22
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Well, of course it's giving a 500 error if you try to access the file directly from outside of the website - it should either do that or throw a 403 error.

Vger

Twaddle:

What I meant though, here is where his stylesheet should be, and it's giving the 500 error, not when you access the site itself

I'd agree about removing/renaming the .htaccess file, though editing it as you suggest I have no idea, either way, worth a try

30 Mar 2010, 11:35 PM
#23
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

The reason for the suggested edit of the .htaccess file is that my experience tells me that some servers won't accept the file as it is written by default and needs for the *.php to be enclosed in double quotation marks (then it works). This is preferable to removing the .htaccess file.

Yes, the same would need to be applied to the admin/includes .htaccess file.

Vger

30 Mar 2010, 11:35 PM
#24
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Vger:

Well, of course it's giving a 500 error if you try to access the file directly from outside of the website - it should either do that or throw a 403 error.

Vger
Not on a standard install it shouldn't

30 Mar 2010, 11:44 PM
#25
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Vger:

Well, of course it's giving a 500 error if you try to access the file directly from outside of the website - it should either do that or throw a 403 error.

Vger
LOL - no error here

:wink::wink::wink:

30 Mar 2010, 11:47 PM
#26
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Not on a standard install it shouldn't

Yes, it should - unless you are on an insecure server with Directory Browsing enabled. In which case you're stuffed anyway from a security point of view. If Directory Browsing is enabled then goodness knows what other insecure openings there are on the server.

You should be seeing something like this when trying to access files outside of the root directly:

Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

Vger

30 Mar 2010, 11:51 PM
#27
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

That's because the stylesheet for that application is not in the 'includes' folder, or any of the subfolders working out of it.

Vger

Twaddle:

LOL - no error here

:wink::wink::wink:

31 Mar 2010, 12:00 AM
#28
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Vger:

That's because the stylesheet for that application is not in the 'includes' folder, or any of the subfolders working out of it.

Vger
But you said...

Vger:

You should be seeing something like this when trying to access files outside of the root directly:

Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403Anyway, not to get into some dumb ding dong as I was just pulling your leg a bit there, my point is, at a guess 9/10 sites (you only have to look at any of the showcase sites) you can directly access the stylesheet if you know the relevant path

And if I remember correctly it's all controlled by Index Listing in cPanel for each directory?

31 Mar 2010, 12:11 AM
#29
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Twaddle:

at a guess 9/10 sites (you only have to look at any of the showcase sites) you can directly access the stylesheet if you know the relevant path

Using includes/templates/classic/css/stylesheet.css and going through the sites in the Zen Cart Showcase, I was able to read each and every one of the CSS files directly within Firefox on the first page there, with the exception of one that came up with a phishing error

31 Mar 2010, 12:14 AM
#30
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

No, fair do's, I was wrong. The css files are flat text files which aren't executable, and the poster should be able to access them from outside of the site. I've checked on a variety of carts now on different servers and they all serve up css files outside of the root. Just goes to show even oldies like me can get it wrong sometimes.

However, the way the .htaccess file is constructed inside the includes folders may still be relevant (even though they relate to php files). Images/buttons are also being blocked. I recommend making the edit I suggested, and if that does not work then try adding just a blank .htaccess file to the includes folders - and if that doesn't work then remove it completely (as a trial only).

Making the edit as suggested has cured this problem before.

Vger

31 Mar 2010, 12:24 AM
#31
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Vger:

No, fair do's, I was wrong. The css files are flat text files which aren't executable, and the poster should be able to access them from outside of the site. I've checked on a variety of carts now on different servers and they all serve up css files outside of the root. Just goes to show even oldies like me can get it wrong sometimes.

However, the way the .htaccess file is constructed inside the includes folders may still be relevant (even though they relate to php files). Images/buttons are also being blocked. I recommend making the edit I suggested, and if that does not work then try adding just a blank .htaccess file to the includes folders - and if that doesn't work then remove it completely (as a trial only).

Making the edit as suggested has cured this problem before.

VgerDon't beat yourself LOL :D - I'm pretty sure what you say is correct, but it's not default on any of my hosting and like I said/tried to remember, you usually have to set up in cPanel using Index Listing. If someone wants to read my CSS files though, they're welcome, I can't see it's a big security issue is it?

I can't remember where I read the trick about the .htaccess file, it was probably on here somewhere to be honest though. Looks like Rick's gone to bed and given up for the night anyway...

I'll look forward to reading tomorrow to see if it's worked for him.... I should hit the hay also....

31 Mar 2010, 12:19 PM
#32
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

If you read about the includes .htaccess causing problems on these forums then the reply was probably from me. I do seem to remember someone else having the same problem and that my suggested solution worked for them. It also would not surprise me if they weren't also hosted with Fasthosts.

Just shouldn't post at 1 am in the morning - brain doesn't work right at that time.

Vger

31 Mar 2010, 12:56 PM
#33
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

LOL - grab your cocoa earlier tonight, Grandpa :wink:

I think here's what I was reading about, certainly ties in with some of the problems he's experiencing - https://www.zen-cart.com/tutorials/index.php?article=235

...and here's the thread I think you are part referring to - http://www.zen-cart.com/forum/showthread.php?t=124757

31 Mar 2010, 2:40 PM
#34
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

grab your cocoa earlier tonight, Grandpa

Grandma actually.

Vger

31 Mar 2010, 2:47 PM
#35
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Oops!!! My apologies, Gran!!!! :blush:

31 Mar 2010, 6:19 PM
#36
rick_yard avatar

rick_yard

New Zenner

Join Date:
Mar 2010
Posts:
8
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

First the good news - it's working!! Thanks guys.

:clap:

The 'solution' as correctly identified was to rename the .htaccess file and that fixed it.

I'm not totally comfortable leaving it that way so now I need to understand what the solution should be. I did note at the top of the file that this is for Apache servers only - and this is my first Apache site.

Thanks for your help in identifying the problem lay with the failure to load the CSS files and that it's a permissions problem. That saved me hours

(And my name isn't Rick - it's Simon. Rickyard is my domain and house name. It was only after typing into this forum with a space that I realised it could be confused with someone's name and I'd never seen it that way. And I'm so happy this is sorted you can even call me Susan, I just don't care!!)

Thanks Guys.

31 Mar 2010, 6:31 PM
#37
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Excellent. We'll catch you on another help thread then when you muck up step 2 :P

Only kidding... give me a break still step 4 :D :D

If I can try to be serious for just one moment, glad that's sorted, Shirley and we can now all have a group hug :hug:

31 Mar 2010, 6:36 PM
#38
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

The solution long term I think is if you plan to keep running Zen Cart, it's to find a hosting company that supports and understands it

You'll get as much supprt as you could ask for on here within reason, but if your server is manned by monkeys and worst so set up by chimps you don't stand a cat in hell's chance of getting this software to work at it's best

31 Mar 2010, 10:16 PM
#39
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

The 'solution' as correctly identified was to rename the .htaccess file and that fixed it.

As you're hosted with Fasthosts putting *.php within double quotation marks will also work, without disabling .htaccess within the includes folders.

Vger

31 Mar 2010, 10:29 PM
#40
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Site just looks wrong - what have(n't) I done?

Vger:

As you're hosted with Fasthosts putting *.php within double quotation marks will also work, without disabling .htaccess within the includes folders.

Vger
Now now, Grandma, you know it's late. And I'm sure all the Archers have also gone to beddy-byes a while back :D

(Just on a side note, when I first came here in November 2000 the world service used to broadcast some doctor/nurse/hosital serial. I might tune in and try find out what happened to Sam, last I heard some Doc had knocked her up. I guess the wee kid will be at school now. Pity to miss them grow up)