Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Hotclutch

    This site can’t be reached 127.0.0.1

    You need to turn php 7 on, if your site breaks, then you have to look at the error that's causing it.
  4. josh1r

    This site can’t be reached 127.0.0.1

    Thank you and, to confirm, if I upload the compatibility file above, will it make changes to other files/dbase (hence that's what I need to backup)? Assuming I try this, what happens next (i.e. might it magically fix the site and make it work with higher versions of php, will it generate errors showing what else I need to fix, or might it just break the site)?
  5. Yesterday
  6. Hotclutch

    This site can’t be reached 127.0.0.1

    2.2 is very old. You are going to have to see how much work is involved. Backup your site files and database before starting this work so that you can rollback if necessary. This is an updated includes/functions/compatibility.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2012 osCommerce Released under the GNU General Public License */ //// // Recursively handle magic_quotes_gpc turned off. // This is due to the possibility of have an array in // $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; foreach($ar as $key => $value) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } if (PHP_VERSION >= 4.1) { $HTTP_GET_VARS =& $_GET; $HTTP_POST_VARS =& $_POST; $HTTP_COOKIE_VARS =& $_COOKIE; $HTTP_SESSION_VARS =& $_SESSION; $HTTP_POST_FILES =& $_FILES; $HTTP_SERVER_VARS =& $_SERVER; } else { if (!is_array($HTTP_GET_VARS)) $HTTP_GET_VARS = array(); if (!is_array($HTTP_POST_VARS)) $HTTP_POST_VARS = array(); if (!is_array($HTTP_COOKIE_VARS)) $HTTP_COOKIE_VARS = array(); } // handle magic_quotes_gpc turned off. #if (!get_magic_quotes_gpc()) { #do_magic_quotes_gpc($HTTP_GET_VARS); #do_magic_quotes_gpc($HTTP_POST_VARS); #do_magic_quotes_gpc($HTTP_COOKIE_VARS); #} // set default timezone if none exists (PHP 5.3 throws an E_WARNING) if (PHP_VERSION >= '5.2') { date_default_timezone_set(defined('CFG_TIME_ZONE') ? CFG_TIME_ZONE : date_default_timezone_get()); } if (!function_exists('checkdnsrr')) { function checkdnsrr($host, $type) { if(tep_not_null($host) && tep_not_null($type)) { @exec("nslookup -type=" . escapeshellarg($type) . " " . escapeshellarg($host), $output); foreach($output as $k => $line) { if(preg_match("/^$host/i", $line)) { return true; } } } return false; } } /* * stripos() natively supported from PHP 5.0 * From Pear::PHP_Compat */ if (!function_exists('stripos')) { function stripos($haystack, $needle, $offset = null) { $fix = 0; if (!is_null($offset)) { if ($offset > 0) { $haystack = substr($haystack, $offset, strlen($haystack) - $offset); $fix = $offset; } } $segments = explode(strtolower($needle), strtolower($haystack), 2); // Check there was a match if (count($segments) == 1) { return false; } $position = strlen($segments[0]) + $fix; return $position; } } ?>
  7. josh1r

    This site can’t be reached 127.0.0.1

    under Tools I don't have version checker, but I see the following under Server Info: osCommerce 2.2-MS2 PHP Version 5.2.17
  8. Hotclutch

    This site can’t be reached 127.0.0.1

    Admin -> Tools -> Version Checker
  9. josh1r

    This site can’t be reached 127.0.0.1

    What's the best way to determine that? Thank you.
  10. Hotclutch

    This site can’t be reached 127.0.0.1

    In your host control panel there may be an option under php configuration -> display errors. If it is set to off, then you may need to turn it on. You need to change the php version to see the errors. V2.3.4.1 patched can run on php7.4 Most of the errors will be of the type: 1) The each() function is deprecated. 2) Methods with the same name as their class will not be constructors in a future version of PHP Depending on how far back you are, you may have more work to do.
  11. Hotclutch

    This site can’t be reached 127.0.0.1

    Which version of osC are you running now ?
  12. josh1r

    This site can’t be reached 127.0.0.1

    yeah, even tried different browsers and other computers. as for the debugger. i have it installed and am seeing various items on the screen (I set it to 'screen' for now). how do i best proceed in figuring out what is causing errors due to php version? do i need to first change php version at my host, then see what happens? normally i can't get the site to work at all if the php is too new.
  13. Hotclutch

    This site can’t be reached 127.0.0.1

    You sure you cleared your browser cache ? That may cause you to think the htaccess change is not working.
  14. josh1r

    This site can’t be reached 127.0.0.1

    thanks i'll take a look!
  15. josh1r

    This site can’t be reached 127.0.0.1

    Is there a way to redirect www.domain.com/ to www.domain.com/index.php would a simple 301 work? or given all of the other redirects/rewrites might it not work?
  16. josh1r

    This site can’t be reached 127.0.0.1

    I completely removed the line above mentioning the 127 from my .htaccess file and it still doesn't work Regarding the debugger, can you point me in the right direction to get started? Thank you again.
  17. Hotclutch

    This site can’t be reached 127.0.0.1

    It just occurred to me that, Hash (#) may not work with all server configurations. So you can try completely removing the .htaccess code i mentioned before.
  18. Hotclutch

    This site can’t be reached 127.0.0.1

    RewriteRule ^/?.*$ "http\:\/\/127\.0\.0\.1" [R,L] This is clearly the rule causing the redirect to 127.0.0.1 I don't see how changing the php version would have any effect here. Your old osC can be patched to work on php 7+. You need to add a debugger to show you the errors, then you can ask for advice here on the open forum on how to fix them. Alternatively you need to hire someone to do that task for you.
  19. josh1r

    This site can’t be reached 127.0.0.1

    That unfortunately didn't help However, after changing php version to a newer one, but then reverting to the older version of 5.2 that I've been using (since my old version of osc can't handle newer php), https://www.domain.com/index.php now works fine, although https://www.domain.com still gives the 127...error. Any idea why not having index.php would work? Separately, and I haven't looked into this yet, is it remotely easy to get my old osc working with newer php? Or is that going to be an overwhelming task?
  20. Hotclutch

    This site can’t be reached 127.0.0.1

    RewriteCond %{HTTP_USER_AGENT} ^$ [OR] RewriteCond %{HTTP_USER_AGENT} (bot|crawl|robot) RewriteCond %{HTTP_USER_AGENT} !(bing|Google|msn|MSR|Twitter) [NC] RewriteRule ^/?.*$ "http\:\/\/127\.0\.0\.1" [R,L] hash this out, then if necessary clear your browser cache, and check.
  21. josh1r

    This site can’t be reached 127.0.0.1

    Thank you. here is my htaccess. i changed my website same to just 'domain' for now. i'm sure the below is a mess as it's been updated over the years many times, though has not been touched in a few years so i'm not sure why i'm suddenly having issues. thank you. deny from 109.187.84.170 <IfModule mod_dtimeout.c> <Files ~ ".php"> SetEnv DynamicTimeout 300 </Files> </IfModule> RewriteCond %{HTTP_USER_AGENT} ^$ [OR] RewriteCond %{HTTP_USER_AGENT} (bot|crawl|robot) RewriteCond %{HTTP_USER_AGENT} !(bing|Google|msn|MSR|Twitter) [NC] RewriteRule ^/?.*$ "http\:\/\/127\.0\.0\.1" [R,L] ErrorDocument 404 /404.php #ErrorDocument 403 /404.php Options -Indexes Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com RewriteRule (.*) http://www.domain.com/$1 [R=301,L] RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Change RewriteBase using the instructions above RewriteBase / RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA] # Articles contribution RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA] # Information pages RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA] # Links contribution RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA] # Newsdesk contribution RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA] RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA] RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] <ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript </ifModule> <IfModule mod_expires.c> ExpiresActive on ExpiresByType text/html "access 1 week" ExpiresByType text/css "access 1 week" ExpiresByType application/javascript "access 1 month" ExpiresByType text/plain "access 1 month" ExpiresByType image/jpg "access 1 month" ExpiresByType image/gif "access 1 month" ExpiresByType image/png "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresDefault "access 1 week" </IfModule> # BEGIN Cache-Control Headers <ifModule mod_headers.c> <filesMatch "\.(ico|jpe?g|png|gif|swf)$"> Header set Cache-Control "public" </filesMatch> <filesMatch "\.(css)$"> Header set Cache-Control "public" </filesMatch> <filesMatch "\.(js)$"> Header set Cache-Control "private" </filesMatch> <filesMatch "\.(html|php)$"> Header set Cache-Control "private, must-revalidate" </filesMatch> </ifModule> # END Cache-Control Headers <Files 403.shtml> order allow,deny allow from all </Files> deny from 173.192.238.1/32 deny from 173.192.238.2/31 deny from 173.192.238.4/30 deny from 173.192.238.8/29 deny from 173.192.238.16/28 deny from 173.192.238.32/27 deny from 173.192.238.64/27 deny from 173.192.238.96/30 deny from 174.36.241.1/32 deny from 174.36.241.2/31 deny from 174.36.241.4/30 deny from 174.36.241.8/29 deny from 174.36.241.16/28 deny from 174.36.241.32/27 deny from 174.36.241.64/26 deny from 174.36.241.128/26 deny from 174.36.241.192/27 deny from 174.36.241.224/28 deny from 174.36.241.240/29 deny from 174.36.241.248/31 deny from 174.36.241.250/32 deny from 174.36.228.1/32 deny from 174.36.228.2/31 deny from 174.36.228.4/30 deny from 174.36.228.8/29 deny from 174.36.228.16/28 deny from 174.36.228.32/27 deny from 174.36.228.64/26 deny from 174.36.228.128/26 deny from 174.36.228.192/27 deny from 174.36.228.224/28 deny from 174.36.228.240/29 deny from 174.36.228.248/31 deny from 174.36.228.250/32 BrowserMatchNoCase yandex tard BrowserMatchNoCase spinn3r tard Order Deny,Allow Deny from 94.228.34.* Deny from 5.10.83.* Deny from 74.215.156.* Deny from env=tard BrowserMatchNoCase crawl bad_bot Order Deny,Allow Deny from env=bad_bot deny from 94.228.34.249 deny from 92.19.126.136 deny from 68.168.103.200 #deny from 185.25.32.39 deny from 163.172.16.139 deny from 163.172.0.0/16 deny from 212.83.0.0/16 deny from 64.62.252.162 AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
  22. Jack_mcs

    This site can’t be reached 127.0.0.1

    The cause will most likely be in either the includes/configure.php file or the roots .htaccess file. I think the latter is the more likely. There is probably incorrect redirect code in it. You can post it here if you would like someone to look at it.
  23. Hi. I'm using a very old version of osc (I honestly don't recall which one, nor do I recall how to check, as it's been ages since I've worked on my site). In any case, I just noticed this error: This site can’t be reached 127.0.0.1 refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED I contacted my webhost who said: "It seems that the website is set to redirect its home URL to 127.0.0.1, which is localhost. I attempted to manually check your files and database for any entries for this, but I was unable to find how to alleviate it from the server side." Again, I haven't made any changes to the site in many months/years, so I assume the host changed something on their end that would have caused the issue. If I manually type in a url from the website, I can completely browse the site. It seems that only going to the home page of / or /index.php causes the problem. Any thoughts on how to fix this? Thank you!
  24. YePix

    quantity monitoring

    This should always reduce the counter of the purchased quantity of products from the assigned category by the purchased number. Set up like the download counter. Could someone take a look at whether this code can be built into the checkout_process.php? for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { $stock_categories_query = tep_db_query("select c.categories_product_qty FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id LEFT JOIN " . TABLE_CATEGORIES . " c ON c.categories_id = ptc.categories_id where p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if (tep_db_num_rows($stock_categories_query) > 0) { $st_cat_values = tep_db_fetch_array($stock_categories_query); $stock_cat_left = $st_cat_values['categories_product_qty']; tep_db_query("update " . TABLE_CATEGORIES . " set categories_product_qty = '" . (int)$stock_cat_left . "' - " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . (int)$st_cat_values['products_id'] . "'"); if ( ($stock_cat_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . (int)$st_cat_values['products_id'] . "' and products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '0' where categories_id = '" . (int)$st_cat_values['categories_id'] . "'"); } } }
  25. Last week
  26. Please suggest or advise a module JSON-LD for osc 2.2
  27. YePix

    quantity monitoring

    I have the problem that I cannot test it because I only have 1 database and for this reason my system must not fail. I think, however, that it is not too much effort to calculate the quantities from the categories to products as described above and to subtract the purchased products. this instruction and query in the checkout_process.php should solve it. I just need someone who takes a quick look at it and tells me whether it can be implemented this way. for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { // Stock Update - Joao Correia if (STOCK_LIMITED == 'true') { $stock_categories_query = tep_db_query("select p.products_id, p.products_quantity, ptc.categories_product_qty FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON p.products_id = ptc.products_id LEFT JOIN " . TABLE_CATEGORIES . " c ON c.categories_id = ptc.categories_id where p.products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } if (tep_db_num_rows($stock_categories_query) > 0) { $st_cat_values = tep_db_fetch_array($stock_categories_query); $stock_cat_left = $st_cat_values['categories_product_qty']; tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set categories_product_qty = '" . (int)$stock_cat_left . "' where products_id = '" . (int)$st_cat_values['products_id'] . "' and products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); if ( ($stock_cat_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) { tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . (int)$st_cat_values['products_id'] . "' and products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); } } }
  28. YePix

    quantity monitoring

    I already realize that it is a bit more complex. But I don't have the time to sit down and click around on the categories and products. Everything has to run automatically for me because my products are prepared in real time and if something is no longer available it has to be switched off immediately. I thank you anyway for the suggestion.
  1. Load more activity
×