Guest Posted October 22, 2007 Share Posted October 22, 2007 If images do not display in IE, but they do in firefox, and if the includes/configure.php files are correct, and the images are in the /images directory, and the permissions on the /images directory and the images are correct, then, go to includes/application_top.php and where it says $request_type = (getenv('HTTPS') == 'on') try changing the "on" to "off". If that fixes the problem, then in the HTML source of /index.php file: <base href=""> should be something like: <base href="http://www.yourdomain.com/"> This thread is trying to work out why this is so, and needs help from our gentle readers. If the fix does or does not work, then us know. Also let us know your osc version php version sql database type and version server type and version ssl enabled or disabled. You can determine the first 4 items by going to your shops admin, then tools, then server info. Link to comment Share on other sites More sharing options...
Gauravs Posted October 22, 2007 Share Posted October 22, 2007 $request_type = (getenv('HTTPS') == 'on') try changing the "on" There is no standard for String that is returned with getenv('HTTPS'), Some webserver admin may keep it as True / False, while some use 1 / 0 and the default for apache is indeed on / off. I would recommend a simple test page to gather how does your webserver behave, and then use define in OSC (an enhancement request ...) <?php echo "This Server returns--->".getenv('HTTPS')."<--- for getenv(HTTPS) Query"; ?> Best Regards,Gaurav Link to comment Share on other sites More sharing options...
Bushmaster Posted October 22, 2007 Share Posted October 22, 2007 If images do not display in IE, but they do in firefox, andif the includes/configure.php files are correct, and the images are in the /images directory, and the permissions on the /images directory and the images are correct, then, go to includes/application_top.php and where it says $request_type = (getenv('HTTPS') == 'on') try changing the "on" to "off". If that fixes the problem, then in the HTML source of /index.php file: <base href=""> should be something like: <base href="http://www.yourdomain.com/"> This thread is trying to work out why this is so, and needs help from our gentle readers. If the fix does or does not work, then us know. Also let us know your osc version php version sql database type and version server type and version ssl enabled or disabled. You can determine the first 4 items by going to your shops admin, then tools, then server info. Seen your other post about starting this thought I would help and supply some info. Mine has always worked. $request_type = (getenv('HTTPS') == 'on') is set to on. My index.php file has this in it for the line in question. <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ OSC 2.2-MS2 PHP 4.3.11 MySQL 4.1.20-max-log Linux 2.6.19.2-UP SSL enabled Link to comment Share on other sites More sharing options...
germ Posted October 22, 2007 Share Posted October 22, 2007 I tried this: echo "This Server returns--->".getenv('HTTPS')."<--- for getenv(HTTPS) Query"; The result - NULL string. So, I changed it a little: $mssl = getenv('HTTPS'); echo 'This Server returns--->'.$mssl.'<--- for getenv(HTTPS) Query'; Same result - NULL string. It came out like this both times: This Server returns---><--- for getenv(HTTPS) Query :huh: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Gauravs Posted October 23, 2007 Share Posted October 23, 2007 It came out like this both times: :huh: Were you using http:// or https:// to invoke the code. application_top.php sets $request_type where the comparison is made and set for all pages. Thus if getenv('HTTPS') is null / false / off / 0 $request_type is set to NONSSL Could you also try with $_SERVER['HTTPS'] instead of getenv('HTTPS') and test it for http:// as well as https://. in case of http:// you would get null, but https:// should give you the environment variable string that needs to be set in application_top.php for comparison. Best Regards,Gaurav Link to comment Share on other sites More sharing options...
germ Posted October 23, 2007 Share Posted October 23, 2007 Going SSL the code returns: This Server returns--->on<--- for getenv(HTTPS) Query If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2007 Share Posted October 23, 2007 Seen your other post about starting this thought I would help and supply some info. Mine has always worked.$request_type = (getenv('HTTPS') == 'on') is set to on. My index.php file has this in it for the line in question. OSC 2.2-MS2 PHP 4.3.11 MySQL 4.1.20-max-log Linux 2.6.19.2-UP SSL enabled Quite remiss of me to not include mine. I am not having the problem. Test site under WAMP osc version osCommerce Online Merchant v2.2 RC1 php version 5.1.6 sql database type and version MySQL 5.0.24a-community-nt server type and version Apache/2.0.59 (Win32) ssl enabled or disabled. Disabled also osc version osCommerce 2.2-MS2-060817 php version 5.1.6 sql database type and version MySQL 5.0.24a-community-nt server type and version Apache/2.0.59 (Win32) ssl enabled or disabled. Disabled Shops on web osc version osCommerce 2.2-MS2 -060817 PHP Version: 4.4.7 sql database type and version MySQL 4.1.22-log server type and version Apache/1.3.39 (Unix) ssl enabled or disabled. Enabled Relevant files unchanged from stock osc. ie $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL'; Link to comment Share on other sites More sharing options...
Guest Posted November 13, 2007 Share Posted November 13, 2007 It appears as though the problem has ceased to exist, so I will close this thread. Link to comment Share on other sites More sharing options...
crag364 Posted December 23, 2007 Share Posted December 23, 2007 Hi, I have this problem at the moment but after a server remoot its all come back up. However will this happen again? I made that code like you said above and before the restart it said This Server returns--->on<--- for getenv(HTTPS) Query. After the restart it comes up with This Server returns---><--- for getenv(HTTPS) Query. Hope this means more to you then it does to me, Craig Link to comment Share on other sites More sharing options...
germ Posted January 15, 2008 Share Posted January 15, 2008 Anothers means to this end: Click Me If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
developthis Posted April 23, 2011 Share Posted April 23, 2011 I am replying because it is IMPORTANT to supply adequate answers to people. I have been a web developer for almost 12 years but I have not used OSC version 2.3.1 until recently. And today is the first time with an SSL certificate installed. Quite frankly, I am so sick and tired of dumb mofo's chiming in on stuff they know NOTHING about. It causes people to have to search through 2000 replies and 1995 of them are guesses or pertain to a much older version. like newbies offering advice when they cant even find a php.ini file or use a crappy shared host that doesn't allow them to access it. This fix does work for osc 2.3.1 Apache server 2 php 5.2 $request_type = (getenv('HTTPS') == 'on') try changing the "on" to "off". For Apache 2 use "0" (not off) All I did was change the "on" to 0 (ZERO) setting it to "off" did not work the first try, so use the number zero. I did not yet change the index.php file because I dont think its really neccessary as the pictures are now all working on both IE and FireFox. Thank you very much for a RELIABLE solution. If images do not display in IE, but they do in firefox, and if the includes/configure.php files are correct, and the images are in the /images directory, and the permissions on the /images directory and the images are correct, then, go to includes/application_top.php and where it says $request_type = (getenv('HTTPS') == 'on') try changing the "on" to "off". If that fixes the problem, then in the HTML source of /index.php file: <base href=""> should be something like: <base href="http://www.yourdomain.com/"> This thread is trying to work out why this is so, and needs help from our gentle readers. If the fix does or does not work, then us know. Also let us know your osc version php version sql database type and version server type and version ssl enabled or disabled. You can determine the first 4 items by going to your shops admin, then tools, then server info. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.