Jump to content
Latest News: (loading..)

MrPhil

Members
  • Content count

    7,645
  • Joined

  • Last visited

  • Days Won

    95

Everything posted by MrPhil

  1. MrPhil

    Google Tag Manager

    Are "googletags" related to a Google advertising offering, such as Adsense, Adwords, etc.? If so, how do you monitor (and control) the quality of what Google is sending you for on-page advertising? I bring this up because on a couple of technology-oriented sites I visit from time to time, there are banner ads (constantly changing) that are often absurd. They are pure clickbait that I won't even waste a second on, but I'm sure they appeal to someone. An example: an obviously photoshopped, hideous picture of Hillary Clinton with a caption promising a look at her "hit list". Now, I understand that some people just hate her guts and are anxious to click to get the latest dirt on the Hildebeast, but I'm guessing it's something totally different from what was promised (including drive-by malware downloads). Other examples: breathless "doctors astounded by _____", "scientists amazed by _____", a picture of two helicopters lifting a supertanker off a beach, a 40-storey high cruise liner (that looks unstable enough that the tiniest ripple would capsize it), a 777 airliner with the two engines replaced by passenger cabins and the central fuselage replaced by a huge jet engine,... well, you get the picture. These things are funny to look at, but I wouldn't want them despoiling my site. I assume that Google is involved somewhere because the page is loaded with "googletag" in the source. So, how does one keep control over the quality of ads being run on their site? Do reputable ad providers guarantee a certain level of quality and truthfulness, or is it the Wild West out there? Do any let you vet what they intend to run, before they run the ads?
  2. You piqued my curiosity, so I found this: https://www.thesawguy.com/sabre-saw-vs-jigsaw/., https://www.thesprucecrafts.com/jigsaws-and-sabre-saws-the-difference-3536880, and https://www.luxuryhomestuff.com/saber-saw-vs-jigsaw/. And even https://woodworking.stackexchange.com/questions/1423/what-is-the-difference-between-a-sabre-saw-and-a-jig-saw. Anyway, it looks like the definition has changed over time (and regions, and manufacturers) and what I was taught in jr High shop is now considered "old school". Peace out.
  3. Don't show it to the US Department of Defense. They'll think $1000 for a sabre saw is cheap. Really. They pay $600 for hammers and $800 for coffee pots. P.S. That's a sabre saw. A jigsaw is a non-portable saw with a reciprocating blade.
  4. MrPhil

    Site been working for a year, now broken!

    If it's commented out, you can safely delete it, as it's not being used. The only reason to keep something around would be if some time in the future you might want to use it again. php_value and php_flag are things you'll never use again in an .htaccess file, so go ahead and trash them. If civilization comes crashing down and you have to revert to PHP 3, you can always recreate those lines.
  5. MrPhil

    Pay what you want pricing

    Well, that's a whole 'nuther animal. If you give them store credit towards the canceled order, and they pay any extra towards the new order at the time of the reorder, they never owe a balance. They don't have an outstanding balance (owed to the store) at any time, which was the original problem to be solved.
  6. MrPhil

    Pay what you want pricing

    But, but,... the customer isn't owed money by the business -- they owe money to the business. If you can monkey the credit/voucher module to accept a negative balance, that might be added to the next order. However, if the customer wants to settle up now (might not order something for a while), they still need some sort of dummy transaction that the voucher could be added to. If this were an uncommon event, I would just handle it manually (charging their credit card), but it sounds like it's common enough to warrant an automated method.
  7. MrPhil

    Site been working for a year, now broken!

    Almost. It says to associate .php files (and .php7 and .phtml, which you don't use) with PHP 7.2. Removing or commenting out this line would drop you back to the default version of PHP. Yeah, anything starting with # is commented out and can be ignored. If you uncomment them, you'll probably get a 500 error since they're obsolete. As written, it might well work OK, but I'll give a caution: for best SEO, you want to be consistently mydomain.com or www.mydomain.com. You should add a test for domain name and combine the HTTPS test into the same rewrite, so there's only one 301 redirect happening. Something like: RewriteEngine On RewriteCond %{HTTPS} !on [OR] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L] Note that your domain is hard coded (this is the "with www" way) because HTTP_HOST can be mydomain.com or www.mydomain.com, and you can't simply shove a www. in front of it. If you want to use the "without www" form, you would take the ! off the HTTP_HOST line and remove www. from the rewrite. The R=301 tells search engines to index this revised URL instead of what they had before. The ETag business I don't quite understand, but if your host put it there, presumably it's OK. The cached file expiration stuff is to cut down on files being fetched from the server (performance improvement), ranging from 2 days to a year (depending on how quickly a file is expected to change). Yeah, f***king script kiddies trying to find vulnerable WordPress sites and break into them. "Throw it against the wall and see what sticks". I wish I could slit their bellies open and throw them into a shark tank... at least that could provide some amusement. At least you found that your database somehow got corrupted and your PayPal entries removed. It would be a good idea to figure out how that happened, to avoid a repeat. At the very least, learn to keep file and database backups on your PC so you don't have to keep going back to your host to do it for you. And learn how to restore files and database!
  8. MrPhil

    Site been working for a year, now broken!

    !on and off should be equivalent, unless you have a very strange server setup. ^(.*)$ and (.*) should both capture the entire REQUEST_URI (sans initial /) into $1, but the first form (with anchors) may be a bit more reliable in capturing the entire string. Since you're using %{REQUEST_URI} instead of /$1 in the rewrite, the $1 capture is ignored anyway. Do you have any subdomains or add-on domains in play here? %{HTTP_HOST} is what the visitor entered, not some canonical form of your domain name. For best SEO results, you really should pick "with www" or "without www" and stick with it, adding the test to this redirect (with [OR]) so that you end up sending only ONE redirect request (search engines penalize you for multiple redirects, say, one to change http to https and another to add or drop www). An explicit R=301 tells search engines that the resource has been permanently moved, and the new URL should be used from now on. The first one gives an implicit R=302, which is a temporary move, and should not be remembered. The [L] flag is a convention to tell .htaccess processing to leave and come back in (start over from the beginning). Whether it makes any real difference depends on what other URL rewrites/redirects you have in your .htaccess. A "500" (Internal server) error can be caused by a lot of things, including a botched .htaccess or php.ini file, or sometimes PHP code errors. Do you have any php_value or php_flag entries left in your .htaccess? They belong in a php.ini file (or equivalent). Your host should be able to tell you how to turn on enough error logging to find the problem, and what files (e.g., "error_log") to look for.
  9. MrPhil

    New Products Listing

    You can install "grep" on Windows, or the built-in "findstr" command does almost the same thing.
  10. Don't wait for a new official release of osCommerce. It's likely to never come (quite literally). Use the 2.3.4.1BS Edge/CE/Frozen for any new system, and if you're running anything older, be thinking about upgrading to this one. Regarding the errors you reported, the new version (Edge) now hard codes a lot of file names and table names, rather than using defined constants. If you try to mix in old add-on code, you'll have to modify it manually to either define the constants (there is a "compatibility" add-on for that), or hard code the names. I don't know if that will fix the phplot.php error. The "headers already sent" message will probably go away when you fix the other errors -- it's caused by an error message being sent to the browser "too early", before all the headers have been defined.
  11. MrPhil

    TEP STOP error when changing to PHP7.2

    Hackers are constantly looking for things that can be exploited to break into a system. An example would be a buffer overflow, where you cram 10 pounds of shit into a 5 pound sack, and something can overwrite code with your data when the sack bursts. Trust me, such things do happen. Just because you're totally unaware means nothing -- ignorance is not bliss. A new PHP system does have new code which might be exploited, but it's also being continuously patched. An old system (like pre-5.6) is no longer being patched, and any security holes that are still there, are there forever. Hackers know about them, they know the code being run on them (such as osC), and sometimes can figure out data or usage of osC that will exploit that hole.
  12. Now you're asking for something totally different. The best way to handle sequential numbers is to have a table holding the tickets, with an autoincrement key field for that ID. Presumably there's a table already involved here, somewhere. You could also do it with a file holding the ID, which would be incremented and written back, but that's a lot more complicated coding to ensure atomic operations. By the way, the solutions given already in this thread are not safe. There's no guarantee that two tickets can't end up with the same "random" ID number, unless you check it against all existing ticket numbers. You would be better off using an autoincremented field value -- at least, you could guarantee that it's unique. A hash of some unique string (such as the customer name and address) might also be suitable.
  13. MrPhil

    Fatal error, webhost is stumped

    Well, comment out the echo statement I had you add, and see if you're back to where you were. See if you have any error_log or similar files floating around that might detail what the error is. There might also be a server error log under your account control panel that might say something. I don't think I've ever seen a host that didn't permit you to add PHP settings somewhere. On very old systems, they might be php_value or php_flag settings in your .htaccess. Others might have something similar to php.ini, but called something different. As a last resort, ini_set() calls can be added, but that's the sign of a bogus host if that's the only way.
  14. MrPhil

    Fatal error, webhost is stumped

    Some server accounts permit you to define a php.ini file for yourself. Ask your host if there is something like that you can use. The alternative would be to put ini_set() in application_top.php so every page gets it. Assuming you or I didn't make a syntax error, is there any page source in the browser (Ctrl+U, usually)? If completely empty, there must be something wrong with the new statement. Or, if the server choked with millions of lines of output, that would suggest an endless loop on that page.
  15. MrPhil

    Fatal error, webhost is stumped

    I think the master value is the server-wide max value, and the local value is what is set for your account/page. 128MB is usually enough in most cases, but since you probably have some headroom (768MB), you could see if something larger in your php.ini or with an ini_set() makes any difference. If increasing to, say, 192MB cures the problem, you might leave it at that, but generally it's better to understand what's going on than to simply raise limits until it stops breaking. At least, it could buy you some time to figure out what's eating up so much memory. $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level); Any chance of temporarily inserting the following diagnostic just before that line: echo "str_repeat('".$this->spacer_string."', ".$this->spacer_multiplier." * ".$level.")\n"; and seeing if the string is absurdly long, or the multiplier or level is huge? 159744 bytes is awfully large for a string temporary. The problem could also be that $result is caught in an endless loop and building up until it crashes the system (it wasn't the str_repeat that is the problem).
  16. MrPhil

    TEP STOP error when changing to PHP7.2

    It's not a good idea to stay with very old PHP versions that are out of support. Hackers love to attack systems running on unsupported PHP, as they know where all the security holes are. Right now, PHP 5.6 and up is supported, but after the beginning of 2019, only 7.1 and 7.2 will be supported. Use anything older at your own risk.
  17. MrPhil

    Fatal error, webhost is stumped

    Well, 768MB of virtual memory is a butt-load to use up. As suggested, do you have a huge number of categories already defined (how many)? Anything else in huge numbers? Are your images of reasonable size (not 100MB each, to be scaled down by the browser)? What PHP version, what add-ons, etc.? Anything unusual in your configuration or data that you can think of? Can you run your phpinfo() and see if all numbers, especially memory size(s), look reasonable and expected, and match your php.ini?
  18. MrPhil

    TEP STOP error when changing to PHP7.2

    Yes, it will be easier to switch to the new osC (note that it requires PHP 5.6 or higher) than to try to patch up your old osC to properly run on PHP 7.2. Migrating the database might have to be done manually (modifying tables), but it's a one-time job. Your biggest task will be to update your add-ons and any custom code you've made, to run on the new system. On the bright side, you'll have PHP 7.2 compatibility, responsive design (mobile-friendly), a lot of bugs fixed, and a lot more secure. Once you've got that, please try to stay up--to-date and not let your shop fall so far behind again. The longer you let it stagnate, the bigger and harder the job to make it current (such as when your host updates PHP). Unfortunately, your new version is probably the end of the road for osCommerce. There's no sign that the current offering (official 2.3.4.1) will be developed any further (it hasn't been updated in years), and Gary seems to be saying that's it for the CE version (his further work is on another project). There are a number of projects out there based on osC (and thus an easy migration from osC) that you'll eventually have to choose from, unless you want to learn PHP and maintain your store yourself.
  19. MrPhil

    Nothing happens after install

    I was asking the OP where they thought the file was.
  20. MrPhil

    Nothing happens after install

    By "root", do you mean the store's root directory (e.g., /shop)? It looks for user.css there, not in the site root or the filesystem root.
  21. MrPhil

    New install messing about.

    osC 2.3.4.1BS Edge/CE/Frozen is responsive (mobile-friendly) right out of the box. No templates needed. The "BS" is for the Bootstrap library it uses.
  22. Well, it is possible to install osC on the same website as other pages. Like most applications, it was designed to think it "owns" the whole website, so you should keep in mind that jumping in and out of your store to other parts of your site could cause session-related problems (loss of sign-on, loss of shopping cart contents, etc.). There should be no problem (on the osC side, anyway) if someone enters the store at any place, and stays there until they complete their checkout. osCommerce should be installed into its own subdirectory, such as /shop or /store, and not into the site root (/). If it is vital that a visitor be able to jump around the site, you may need to think about a completely integrated Content Management System, such as WordPress, Joomla, or Drupal (with their associated store) for your entire site. The store probably won't be quite as feature-laden and flexible as osC, but at least it should interact in a predictable manner with the rest of your site. At least make a test install of osC, and see how well it plays with others. It all depends on how the rest of your site is written, and whether a visitor may be signed into another application on your site. Keep in mind that osC (like any other shopping cart application), is self-contained and includes its own catalog and product display system. It is not just a shopping cart and checkout system, to be fed from your existing catalog or product display system. Very Important: Do NOT use the official osC 2.3.4.1 download from this site! It is years out of date, will not even run on any reasonably up-to-date server, and will make you miserable. Instead, use the Community-Supported osC 2.3.4.1BS Edge/CE/Frozen, available from GitHub (see my signature below).
  23. MrPhil

    New install messing about.

    You said you installed osC 2.3.4.1. Was this the official release downloaded from this site? If so, it is unfortunately many years out of date, and will not work properly with current PHP releases. In that case, you should have been using the GitHub release 2.3.4.1BS Edge/CE/Frozen. It's not your fault -- there is no official notice that the BS (Bootstrap) version should be used instead. Lots of people are misled into thinking the official release ought to be up to date.
  24. MrPhil

    Warning on front page

    What do you mean by "latest version"? If it's the official 2.3.4.1 version, it's years out of date and will not run on current PHP levels. Since you're just starting out, remove that installation and use the real latest version, osC 2.3.4.1BS Edge/CE/Frozen (from GitHub). See my signature for how to get it. And what PHP version are you running? It needs to be a current version (at least, 5.6) for the Edge version to run.
  25. MrPhil

    Pay what you want pricing

    Are you really looking for a way for a customer to take care of resolving a balance owed (to you)? You're talking about a dummy product (nothing actually shipped) that could have any price? They actually have to pay you, so something based on a voucher or gift card system wouldn't work. Do they order often enough that you could offer to add the balance to their next order (I'm not sure I'd do it automatically -- it might be a legal problem)? Maybe you could have a dummy product for $0.01 that authorizes payment for the existing balance (less one cent). You'd have to show the balance to them and get their OK (they might want to make a partial payment). All this assumes you have a new field with "outstanding balance owed by customer" in the customer table.
×