Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem loading pages


DavidF

Recommended Posts

Is there anyone that might know what is wrong with my site? 95% of the time it loads correctly. Every once in awhile, it does not load the correct fonts, tables graphics or colors. The actual text of the site is still visible, and links work, but the formatting is messed up, and the fonts are incorrect and there are no colors, except the background in the header. All the rest of the site is black and white. I have added a modification for guest checkouts, category desctiptions, and for dynamic header tags. But that is all that I have changed.

 

Any suggestions as to what might be going on?

 

Thanks

Link to comment
Share on other sites

This has something to do with the base href header tag getting messed up sometimes. Someone else had the exact same problem about a month ago. For some reason the SERVER variable that sets HTTPS in application_top.php was getting set and they did not have SSL enabled. They also did not have anything in the define statement for HTTPS_SERVER in the configure.php file. So when the page would load it was not setting the base href and thus the stylesheet, graphics, etc... would not load. It had something to do with their host making a change on the server, but they never responded back as to what the change their host made was, so I don't know what to tell you. But the situation was exactly like yours, sometimes it worked fine, and other times it did not. When it does not load properly, view the source for the page, and see if there is anything set on the line that has base href.

Link to comment
Share on other sites

THANKS for the help, this might be on the right track. I did a view source when there was a problem, and the base href line looked like this:

 

<base href="">

 

But under normal circumstances, it should be my URL right? Like this...

 

<base href="http://www.mysite.com/"

 

Do you know what might be causing this?

Link to comment
Share on other sites

You are correct, the url should be in there. It is late, and I can not think of what causes it off the top of my head, but I do know it is a server setting. If you are not using SSL try changing the following in configure.php:

 

define('HTTPS_SERVER', '');

 

to

 

define('HTTPS_SERVER', 'http://www.yourdomain.com');

 

Also, you can try editing the application_top.php file. Look for a line that says something like this:

 

$request_type = (isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS']) == 'on')) ? 'SSL' : 'NONSSL';

 

change it to:

 

$request_type = (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) ? 'SSL' : 'NONSSL';

 

I can't guarantee it will work, but worth a try for you.

 

Good luck. I'll try and remember what the actual cause is and let you know.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...