Jump to content

LLLLLLL

Members
  • Posts

    306
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

LLLLLLL's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

2

Community Answers

  1. In fact, adding the unique constraint does nothing. The trigger STILL adds identical values. Whoa. And now it stopped...? I'm going to do some MySql maintenance or something...
  2. They are identical. (In fact, I can't set the column to unique right now because the values are duplicate.) You created the trigger in the exact same way, and your Uid was different when inserting two rows?
  3. I have a trigger, CREATE TRIGGER `TRIGGER_SOMETABLE_UID` BEFORE INSERT ON `SOMETABLE` FOR EACH ROW SET NEW.Uid = UUID( ) Now, I thought this would fire FOR EACH ROW, but if I'm doing an insert like this... insert into sometable ( col1, col2 ) ( select col1, col2 from SOME_OTHER_tABLE ) ... and that inserts two rows, the result is that Uid in both new rows is identical. This is not the desired behavior. Can you tell me how to get a unique Uid in each row?
  4. preg_match( '/\d{5}-\d{4}/', $input ) My issue was that the - in my original syntax was somehow a ndash... so it was the wrong character. Whoa. Sorry I created this thread.
  5. I suck at Regex. Can someone tell me the PHP regex check to see if a string is 12345-6789 .... meaning, five digits, a dash, and then four digits? I'm sure it's quite simple for a Regex pro. Thank you.
  6. Yes, it seems the goal was to write "clever" code instead of something that just works. It's likely we won't be using them long-term, but for now I'd love to figure out why I can't even reach the /setup folder to do anything. My error is the same that hundreds of others have reported.... as with most freeware carts, there are no solutions to be found on the interwebs. "Free carts aren't free."
  7. The class ends up being Magento\Backend\Model\Auth\Session\Interceptor, which isn't a class that exists. I assume it gets created on the fly? Seriously, there are 48,000 Magento files; the software is more bloat than I've ever seen. I'll look into XDebug, I guess.
  8. I've been given an unfortunate task of working with magento. My question might be magento-specific, but I'm not sure that it is. In short, I'm troubleshooting something and confused. This code... $user = $this->getUser(); ...would seem to be quite easy to troubleshoot, but it is not. The current class has no getUser function. Its base class has no getUser function. If I print a debug statement to examine $this, the class I'm looking at -- Session -- isn't the class at all! $this is some other class! In fact, the class that is shown doesn't exist anywhere in the source code. So... what the heck? How can $this not be $this ??
  9. Yeah, no kidding. I always enjoy a large website saying "letters and numbers only." Seriously??
  10. I agree with these replies but... I guess I wonder why SO MANY websites still say that some characters are unallowed. Mmmph. And I'm talking about major websites like large banks, financial institutions, or other similar corporations
  11. I'm curious to get opinions on using strip_tags() for fields that will be encrypted in a database. I often see websites that say "choose a password that contains X certain characters but not Z other characters." And I got curious. Let's say there's a registration form where a new user creates a username and password, and the server will store the password as ... sha1( $user_entered_value ) ... or some other sort of hashed/encrypted string. In this case, why would it ever matter that a user had entered <div> or some other such text in their password? The password will only ever be hashed into something before it is matched... so why would you bother stripping tags? Why bother preventing any "special" characters? Thoughts?
  12. The only Apache setting I know to allow PHP to apply to HTML is AddHandler application/x-httpd-php5 .html That's already there.
  13. This is not the common "I don't know how to set Apache to handle PHP in an HTML file" type of issue. That works. AddHandler application/x-httpd-php5 .html I don't usually configure things like this, but I'm working with an existing site and I don't really want to make a change to URLs here. (If all else fails I'll just add a rewrite in .htaccess.) Here are two examples of what's happening: I have some files that are PHP, and they include HTML files. The HTML partial files sometimes have PHP code. That code works. If I simply try to access somefile.html, and that file includes only PHP code, the raw PHP code will be displayed, instead of being executed as code. Why would that first bullet point be true if that second one is false? Again, I wouldn't have structured things how they are structured now, if starting from scratch. I'll probably do something a little bit different but I would like to know, as general knowledge, why the current setup would fail. Does it matter that in one example a PHP code is being called first, where as the other example calls a .html file directly (as opposed to being included)?
  14. Yes yes, fine. Why does every PHPFreaks answer have to be some show of chest-thumping? Gosh, I thanked you for your answer. I'm well aware that "the attribute isn't limited to strings and ints", but hey, if you feel better about yourself with your guru-like knowledge-dropping, then congrats. Again, thank you for your initial response.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.