AJRYAN Posted April 6, 2009 Posted April 6, 2009 A few weeks ago, my hosting service did something to where none of my images were showing up at all in certain browsers. I've seen that happen before when switching services and the hosting service neglected to do something, and right out of the gate they screw up and don't even bother to test properly. In fact, it seems like everytime I move this happens. Well, imagine my pleasant surprise when this didn't happen with my current service. I thought this is great - these people know what they are doing. Well, time goes on and so has my love for them as they stumble time after time. Anyhow, three weeks ago the site was a disaster with images not showing up at all. I put in a trouble ticket - they said they re-installed the cert and that fixed it. I'm not too sure though since I went in around the same time and made some changes which were recommended on the forums. Anyhow, now I started noticing warning messages in ie7 when hitting https pages for secure and nonsecure items, again, just in the last couple of hours. When I put in the last trouble ticket I also informed them that my admin side who's online enhancement was showing my visitors as having an https connection. I checked myself by browsing on the site and seeing that my connection too was listed as https, and in fact it wasn't. Something is really screwy here. I am so friggin frazzled by this I could scream. As far as I can tell I have no hard coded images. I should also note that I ran the myenv.php and it mostly looked normal, except it shows empty for https host, though it does show the correct port (443) $HTTP_HOST == www.fgfgfgfgfg.com $HTTPS_HOST == < this is empty > getenv('SERVER_PORT') == 443 getenv('HTTPS') == on getenv('HTTP_X_FORWARDED_SERVER') == getenv('HTTP_X_FORWARDED_HOST') == getenv('HTTP_X_FORWARDED_BY') == $_SERVER['HTTPS'] == on getenv('DOCUMENT_ROOT') == /home/fgfgfgfgfg/public_html $DOCUMENT_ROOT == /home/fgfgfgfgfg/public_html I also just noticed that they had the following in my .htaccess file without informing me (it was taken out a few weeks ago though when this trouble surfaced, and I can't be certain when it was put there to begin with - maybe I should put it back: RewriteCond %{HTTP_REFERER} !^http://dfgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://fgfgfgfgfg.com$ [NC] RewriteRule .*\.(.*.*)$ - [F,NC] I think they have no business in .htaccess without telling me. Oh well... Lastly, here is the application top info: // set the type of request (secure or not) [b]// $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; //seems to give a problem with images and certificate errors [/b] $request_type = (getenv('HTTPS') == '443') ? 'SSL' : 'NONSSL'; //$request_type = (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) ? 'SSL' : 'NONSSL'; // set php_self in the local scope if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; The emboldened line is what I changed that I thought may have fixed the problem. Can someone please help with this? I am about at my wits' end. :wacko: Thanks so much in advance
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 A few weeks ago, my hosting service did something to where none of my images were showing up at all in certain browsers. I've seen that happen before when switching services and the hosting service neglected to do something, and right out of the gate they screw up and don't even bother to test properly. In fact, it seems like everytime I move this happens. Well, imagine my pleasant surprise when this didn't happen with my current service. I thought this is great - these people know what they are doing. Well, time goes on and so has my love for them as they stumble time after time. Anyhow, three weeks ago the site was a disaster with images not showing up at all. I put in a trouble ticket - they said they re-installed the cert and that fixed it. I'm not too sure though since I went in around the same time and made some changes which were recommended on the forums. Anyhow, now I started noticing warning messages in ie7 when hitting https pages for secure and nonsecure items, again, just in the last couple of hours. When I put in the last trouble ticket I also informed them that my admin side who's online enhancement was showing my visitors as having an https connection. I checked myself by browsing on the site and seeing that my connection too was listed as https, and in fact it wasn't. Something is really screwy here. I am so friggin frazzled by this I could scream. As far as I can tell I have no hard coded images. I should also note that I ran the myenv.php and it mostly looked normal, except it shows empty for https host, though it does show the correct port (443) $HTTP_HOST == www.fgfgfgfgfg.com $HTTPS_HOST == < this is empty > getenv('SERVER_PORT') == 443 getenv('HTTPS') == on getenv('HTTP_X_FORWARDED_SERVER') == getenv('HTTP_X_FORWARDED_HOST') == getenv('HTTP_X_FORWARDED_BY') == $_SERVER['HTTPS'] == on getenv('DOCUMENT_ROOT') == /home/fgfgfgfgfg/public_html $DOCUMENT_ROOT == /home/fgfgfgfgfg/public_html I also just noticed that they had the following in my .htaccess file without informing me (it was taken out a few weeks ago though when this trouble surfaced, and I can't be certain when it was put there to begin with - maybe I should put it back: RewriteCond %{HTTP_REFERER} !^http://dfgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.fgfgfgfgfg.com$ [NC] RewriteCond %{HTTP_REFERER} !^https://fgfgfgfgfg.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://fgfgfgfgfg.com$ [NC] RewriteRule .*\.(.*.*)$ - [F,NC] I think they have no business in .htaccess without telling me. Oh well... Lastly, here is the application top info: // set the type of request (secure or not) [b]// $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; //seems to give a problem with images and certificate errors [/b] $request_type = (getenv('HTTPS') == '443') ? 'SSL' : 'NONSSL'; //$request_type = (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) ? 'SSL' : 'NONSSL'; // set php_self in the local scope if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; The emboldened line is what I changed that I thought may have fixed the problem. Can someone please help with this? I am about at my wits' end. :wacko: Thanks so much in advance I should also point out that this is not happening with Netscape 7.xx, but only (as far as I know) with my IE7, and the padlock does not show up in ie7 at all. If I click on no, it will return a text only page with the exception of my starfield certificate image. My hosting service still hasn't responded, and I have delayed sleeping because of this crap. Please help someone? Please?? Anyone??
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 I should also point out that this is not happening with Netscape 7.xx, but only (as far as I know) with my IE7, and the padlock does not show up in ie7 at all. If I click on no, it will return a text only page with the exception of my starfield certificate image. My hosting service still hasn't responded, and I have delayed sleeping because of this crap. Please help someone? Please?? Anyone?? OK - never mind - I found the answer. Thanks anyhow.... Sigh of relief!!!!
Guest Posted April 6, 2009 Posted April 6, 2009 OK - never mind - I found the answer. Thanks anyhow.... Sigh of relief!!!! Glad to hear it. Hopefully anyone else experiencing this problem will stumble onto this thread and find the answer to their problem as well...................or not. We can just tell them to do what AJRYAN did............whatever that was. It's okay, they would have started a new thread anyway. :rolleyes:
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 Glad to hear it. Hopefully anyone else experiencing this problem will stumble onto this thread and find the answer to their problem as well...................or not. We can just tell them to do what AJRYAN did............whatever that was. It's okay, they would have started a new thread anyway. :rolleyes: OK, well, I have found a workaround, but I still do not know what caused the problem in the first place. It seems like something got flipped somewhere along the line - I suspect it may be in my hosting services configuration, or some spot in OSCommerce that would cause the switch between SSL and NonSSL. I compared some files from the past - they look the same: ie.. <base href="<?php echo (($request_type == 'SSL') ? HTTP>S<_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> has not changed, nor has my application.top file. But I could not get the images to display properly until I switched it like so: <base href="<?php echo (($request_type == 'SSL') ? HTTP_SERVER : HTTP>S<_SERVER) . DIR_WS_CATALOG; ?> It is very late as I have been up all night, and I am extremely tired and I do not function well at this level so maybe I am missing something. But I had to go through all of the known SSL files in the checkout to make sure they function properly. Once I switched the http and the https, things work fine. // set the type of request (secure or not) $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; I don't have a clue why this happened - everything looks as though things were setup properly (my store has been running for years). {edit} almost forgot to mention that my config file hasn't been touched for months and is still setup properly.. If anyone has ANY insight as to what could cause this I'd appreciate it. I'm wondering if there is a server configuration which might be responsible for flipping this. I see a lot of people have trouble with this and is very common with images not displaying all of a sudden, it seems....
Guest Posted April 6, 2009 Posted April 6, 2009 Do you mean <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> in the index.php file not application_top.php
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 Do you mean <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> in the index.php file not application_top.php Application_top checked out fine. I'm really confused on this problem right now. I just read up on the ternary operator and understand how that works now. The thing is I rarely use IE and I had no reason to suspect anything was wrong as Netscape never gave me any problems, and noone has complained except for some people I know. The other thing is why does IE accept as secure everything but the images, hence the secure/non-secure dialog box? This is what is really puzzling to me. Anyhow, thanks for your interest Leslie. If you can shed some light on this I would appreciate it.
Guest Posted April 6, 2009 Posted April 6, 2009 Application_top checked out fine. I'm really confused on this problem right now. I just read up on the ternary operator and understand how that works now. The thing is I rarely use IE and I had no reason to suspect anything was wrong as Netscape never gave me any problems, and noone has complained except for some people I know. The other thing is why does IE accept as secure everything but the images, hence the secure/non-secure dialog box? This is what is really puzzling to me. Anyhow, thanks for your interest Leslie. If you can shed some light on this I would appreciate it. If that line is in applicatio_top, then I don't know what version your shop is. Sorry.
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 I am SO confused. Can anyone tell me why I cannot get the shopping cart itself to be NONSSL now? If I set it up lie this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> Everything works fine, except it is SSL, which it should not and need not be. When I do this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTPS_SERVER) . DIR_WS_CATALOG; ?> It is STILL a https connection, and but I get the funky secure/unsecure dialog with IE - Netscape is fine with it though. sAME WITH THIS : <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> No matter what I do, it is a secure connection, and IE may or may not like it. I'm losing my mind over this - cleared cache and cookies etc. This seems so strange...
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 I am SO confused. Can anyone tell me why I cannot get the shopping cart itself to be NONSSL now? If I set it up lie this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> Everything works fine, except it is SSL, which it need not be. When I do this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTPS_SERVER) . DIR_WS_CATALOG; ?> It is STILL a https connection, and but I get the funky secure/unsecure dialog with IE - Netscape is fine with it though. sAME WITH THIS : <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> No matter what I do, it is a secure connection, and IE may or may not like it. I'm losing my mind over this - cleared cache and cookies etc. This seems so strange...
AJRYAN Posted April 6, 2009 Author Posted April 6, 2009 I am SO confused. Can anyone tell me why I cannot get the shopping cart itself to be NONSSL now? If I set it up lie this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> Everything works fine, except it is SSL, which it need not be. When I do this: <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTPS_SERVER) . DIR_WS_CATALOG; ?> It is STILL a https connection, and but I get the funky secure/unsecure dialog with IE - Netscape is fine with it though. sAME WITH THIS : <base href="<?php echo (($request_type == 'NONSSL') ? HTTP_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?> No matter what I do, it is a secure connection, and IE may or may not like it. I'm losing my mind over this - cleared cache and cookies etc. This seems so strange... OK I think I have (some) of it figured out. Adding items to the cart from the links from the various modules may be overriding the shopping_cart.php settings? These links contain references to SSL and need to be changed to NONSSL- like in featured products product listing etc.... I'll play around with this a bit until I drop from exhaustion.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.