Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by LLLLLLL

  1. class foo { // was this always allowed? public $bar = 'abc default value'; // or did older versions only allow this? public $bar; } I couldn't determine the answer to this question looking at documentation. I found some old code where no class had a default value. Maybe it was a developer preference, but I was wondering if older PHP versions didn't even allow default values? Just a question of curiosity.
  2. The JSON is valid. It gets parsed. result = JSON.parse( data ); The only error is that Chrome shows an error PRIOR TO PARSING. But there is no error in the JSON, and nothing has interacted with "data".
  3. I'm tired of PHP Freaks. Too many people trying to show their arrogance and not help. As I have stated, the error is before any parsing. The parsing is always successfu. The error occurs immediately when DATA has a value. You're the only one mentioning magic. Nothing magic is happening. I'm done with this thread. Getting no help and never will.
  4. Yes, I put a breakpoint there -- which means BEFORE that line has executed -- and the error already occurred. Proceeding past parse() is not an issue. It is a proper JSON object.
  5. But the JSON blob can be parsed, so it's not an invalid blob. Besides that, nothing has interacted with "data" at this point, so where would an error come from?
  6. I'm getting "Uncaught SyntaxError: Unexpected end of input" (VM4193:1) on this AJAX call: MakeRequest : function( blah, blah ) { $.post( blah-blah-url, obj, function( data ) { var result = null; try { result = JSON.parse( data ); } catch (err) { } SOMETHING.HandleResult( result ); }) .fail( function() { }); }, ... the odd thing is, I get this error in Chrome before anything has actually happened in the result. What I mean is: when I put the breakpoint on result=null, the error happens right there. The parse() function has no error, so... what on earth is going on? I'm not sure how to be any more clear on this or what to add. It's quite standard stuff. The JSON blob that's returned is obviously valid... so I wonder where that error is coming from?
  7. Oops, I'm sorry I messed had some extra stuff in a third table that messed up the query.
  8. But what if I want everything from users (u.*), and just the one column from logins? This seems to be where I'm getting duplicate rows.
  9. This seems like something I've done several times a year for years, but I can't seem to get it. I can't find a solution on Google that works, although the question was asked many times and answered, too. Also, I'm low on sleep right now. Let's say I have two tables: USERS USERS_LOGINS I want to join the tables and get one row per user, with only the latest login row. Assume "UserId" is the pk/fk and there's some sort of LoginTime in the USERS_LOGINS table. So I will get results like: - Brian 8/4 - Mitch 8/3 - Jerry 8/2 I appreciate the help.
  10. You're talking about client-side code, not PHP code. You need an onchange event on your select element.
  11. There are lots of discussions about this topic online. My issue wasn't subdomain sessions being recognized by the primary domain (and vice versa), but rather just a subdomain handling things at all. You set something in the subdomain, refresh the page, and then the thing was unset. Here's what I currently have: session_name( "blah" ); ini_set( "session.cookie_domain", '.dev.example.com' ); session_set_cookie_params( 0, '/', '.dev.example.com', true, true ); setcookie( session_name(), session_id(), 0, '/' , '.example.com' ); session_start(); Things that were required, apparently: 1) Session name 2) setcookie Now with this setup, I can do this: start session in dev.example.com, access it in subsub.dev.example.com, go back and forth... session holds as expected. But what I cannot do, is: start session in subsub.dev.example.com, refresh page, have the session data hold. So lots of questions. Obviously the most important: why doesn't a session hold when I start the session in the subsub domain? Why is a session name required? (Is it?) Why is setcookie required when all I want to do is start a session? (Is it?) I don't use this step if it's a single-domain type of setup.
  12. There are two items using positioning in the header. We're done here.
  13. I'm not sure why you emphasize nearly, as if there is a lot of positioning on the page. There isn't. The relative div was added for the purposes of the text in the upper-right of that purple box (favorites of 2016), but that's the only positioning on the page. I can rework how that text gets to that spot... but my question still isn't answered. Any z-index added to the search results doesn't make it appear above the relative-positioned purple box. So the answer still isn't clear.
  14. Check out http://mainlypiano.com/ and start typing in the search box ("dav" will get you several results). Notice that the search box goes below the middle light purple box. There's no z-index here to cause an issue. If one removes the relative position of the light purple box, the search results menu shows in its entirety. That's weird, isn't it? (That messes up the "favorite albums" text there, which is the point of the relative position, but lets you see the error.) Any idea why this is happening?
  15. 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...
  16. 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?
  17. 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?
  18. 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.
  19. 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.
  20. 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."
  21. 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.
  22. 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 ??
  23. Yeah, no kidding. I always enjoy a large website saying "letters and numbers only." Seriously??
  • 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.