I identified today the main reason that my oscommerce sites had become very slow loading so below is the solution in the hope that it helps someone.
Do I have this problem?
Check the images on non secure pages, if they are loading as https then you have the same problem. Also viewing source will show that the base href for non secure pages is https.
In catalog/includes/application_top.php the following line sets the request type SSL or not.
// set the type of request (secure or not)
$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
For whatever reason my server was always returning ON even when not an SSL request.
This causes the base href of non secure pages to be https and causes ALL images to load as https://www.mysite.com/thisimage.php causing massive slowdown.
Changing the line to ...
// set the type of request (secure or not)
$request_type = (getenv('SERVER_PORT') == '443') ? 'SSL' : 'NONSSL';
Works, at least on my server.
Hope this helps someone.
Page 1 of 1
oscommerce suddenly running very slow? $request_type changes solved the problem
#1
Posted 11 October 2007 - 10:55 AM
Got problems with Ultimate Seo Urls or just want more?
Ultimate Seo Urls 5 - Modern Seo Urls for PHP5
I offer help freely on these forums but personal contact (PM etc) I view as consultancy, for which I charge. To avoid disappointment please don't send me a personal message unless you are willing to pay for my services.
Are you a help Vampire?
Ultimate Seo Urls 5 - Modern Seo Urls for PHP5
I offer help freely on these forums but personal contact (PM etc) I view as consultancy, for which I charge. To avoid disappointment please don't send me a personal message unless you are willing to pay for my services.
Are you a help Vampire?
#2
Posted 28 November 2007 - 10:51 AM
it is also necessary to make this change in ...
catalog/includes/functions/general.php
tep_redirect
change to
catalog/includes/functions/general.php
tep_redirect
if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL pagechange to
if ( (ENABLE_SSL == true) && (getenv('SERVER_PORT') == '443') ) { // We are loading an SSL page
Got problems with Ultimate Seo Urls or just want more?
Ultimate Seo Urls 5 - Modern Seo Urls for PHP5
I offer help freely on these forums but personal contact (PM etc) I view as consultancy, for which I charge. To avoid disappointment please don't send me a personal message unless you are willing to pay for my services.
Are you a help Vampire?
Ultimate Seo Urls 5 - Modern Seo Urls for PHP5
I offer help freely on these forums but personal contact (PM etc) I view as consultancy, for which I charge. To avoid disappointment please don't send me a personal message unless you are willing to pay for my services.
Are you a help Vampire?
Page 1 of 1

Sign In
Register
Help




MultiQuote