Jump to content

requinix

Administrators
  • Posts

    15,223
  • Joined

  • Last visited

  • Days Won

    427

requinix last won the day on November 12

requinix had the most liked content!

About requinix

Profile Information

  • Gender
    Not Telling
  • Location
    America/Los_Angeles

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

requinix's Achievements

Prolific Member

Prolific Member (5/5)

1.2k

Reputation

371

Community Answers

  1. That was a great, detailed answer that gave me a lot more information to work with than what you first posted. Knowing what you're doing with the session, more than just "start a session and set session variables for different things", tells me about the sorts of practices you might be following, how they might work and might not work, and gives me a good foundation I can use to ask you questions that will make more sense. Knowing that you're trying to understand the developer tools but still aren't quite able to work with them, more than just "How x 3", means I feel more invested in helping you to learn. Like I said before, those tools are invaluable when it comes to a lot of web development work, and there's a high likelihood that those tools will be able to explain what's going wrong. But knowing that you've tried this with Firefox and that it doesn't work no matter what is the best part. Web browsers don't just randomly decide how they will work. If Firefox doesn't work but Chrome might, that strongly suggests something is wrong with what you're doing - and I mean that in a very general sense of "you are doing a thing and there's a problem with it", as opposed to "you are doing a thing and Chrome isn't working correctly". 1. If you haven't done it yet, the first thing to check is the console in the developer tools. I believe F12 on any browser will pull them up. It should give you some sort of collection of tools or tabs, and one them should be clearly marked as Console. Have the tools open as you log into the admin (like in Firefox). Do you see any errors or warnings? 2. There's also a Network tab. If there's no messages then (that's surprising, but) you'll have to look a little closer at what's happening. Provided the tools were open when you logged in, the tab should show a request to your login page or AJAX endpoint or whatever. That's where cookies may have changed. Open up the information for the request and check the Response headers. What does it say for a Set-Cookie? 3. It might not have anything. That's fine. Now check the Storage tab and look for your site's cookies. One of them will be the session cookie, probably named like PHPSESSID. What are the settings for it? (Specifically, the path.) Also, what are the URLs for your login and admin pages? (Specifically, the path portion.)
  2. If you're asking, does that mean you tried what I said and couldn't find an answer and decided to not mention that? Or does it mean you saw my answer and decided you didn't like it and wanted something else instead?
  3. Use your browser's developer tools. If you're not sure how, spend some time getting familiar with them because they're invaluable for web development.
  4. PHP doesn't care what browser or operating system you're using to view pages. Your problem is going to be either (a) settings in the Ubuntu browser that prevents it from accepting the session cookie, or (b) a problem with the session cookie where the Windows browser is accepting it incorrectly but the Ubuntu browser is rejecting it correctly. Actually there's a third possibility: a difference between how you're using the two browsers that is important but you don't know about and/or aren't mentioning. Such as a different hostname, source IP address that somehow matters, some sort of Windows authentication mechanism... 1. Check the network responses and confirm you're receiving a Set-Cookie on at least the first visit 2. Check that the cookie is being remembered by the browser/not being rejected for some error that should have been logged somewhere/isn't immediately expiring/something else 3. Check that the cookie is being sent in additional page requests 99% of the time the problem will show up in one of those three steps.
  5. Did you press the Logs button to view error logs? Or check the Windows Event Viewer for more clues?
  6. I don't remember if Intelephense provided the feature or not. In fact I might not even have tried it with PHP - maybe it was another language. But I assume the concept works the same way everywhere. But yeah, the hover or autocomplete list has always been sufficient for me. Oh well, whatever works best for each person.
  7. It might work a little more cleanly in PHPStorm, but when I tried it in VS Code, I found it much more complicated to try to select text or read through code when the editor was injecting those things into the view. Maybe if they weren't inline, though I can't imagine how not, they might be nicer for me... But I'm also a proponent of the idea that you should be able to tell what the parameter is, be that through a variable name or an obvious literal value (or a constant...), and if you can't tell then you should do something about that. // this is obvious on what the parameters are password_verify($password, $hashedPassword) // this is not password_verify($value, $row[1])
  8. That said, how the heck do you know what "6" means? Use column names instead.
  9. The code you posted is not using alert(). Is it possible that the code you posted is meant to return a message to display? And since you're returning a message that looks like HTML, it is alert()ing that HTML? If so then the code you need to fix isn't what you posted...
  10. There's nothing in here that should show a normal Javascript alert()...
  11. And where is that? I'm guessing that you're expecting to see those two events in your version of the code but, according to that one screenshot, are not. Without seeing code or data, I'm also guessing it's going to be one or more of: - You don't have the data for the events - The data for the events is present but incorrect - The query to retrieve the data is incorrect - The query is correct but the code to display the data is incorrect
  12. Misunderstood. Frameworks are a bunch of code that other people wrote to do stuff. Using them saves you the time of having to write your own bunch of code to do stuff. They do so much stuff that the intention is you take what they provide as a foundation and then add what you want. There's also libraries, which are a bunch of code that other people wrote to do stuff that saves you the time of having to write your own code to do stuff, but they're much smaller in scope than frameworks. They're basically about solving small individual problems, so using libraries means you don't have to solve those same problems yourself and you can focus on more important issues. There is overlap between frameworks and libraries. The distinction is in how they get used: are you taking a bunch of stuff and adding more, or are you using stuff to create other separate stuff? VS Code and Dreamweaver (if anyone still uses that) are "integrated development environments", but everybody just calls them IDEs. IDEs are glorified text editors, in that they let you type stuff into a text file just like any simple text editor does, but IDEs also have tons of features dedicated to dealing with code and so are much nicer to use than text editors. Like they can be aware of language syntax nuances and tell you when you wrote something wrong, while text editors might be able to do a little bit of that but would care more about checking your spelling. I don't like "template" as a metaphor. A template is about taking something and supplying a few bits here and there and you're done. You go to some blog creator website (coughwordpress) and they'll give you a template for a site: you set a name, colors, images, whatever, but all you're doing is customizing the same basic thing that everybody else is using. This forum is basically a template because we installed Invision Power Board and customized it a bunch. A framework is about you having a starting point for actually building something - not just customizing. You write code to do things, you implement features, you make decisions about how things work, and so on. Making a complicated website involves many different things, and frameworks have a lot of that designed for you so you don't have to make it all yourself. Where are you seeing "controls"? That typically means things like text boxes and buttons and links, like right now I'm typing into a "textarea" control that has a bunch of formatting button controls at the top and a "submit" button control below it. But people don't normally use the word "control" much these days. I think maybe you shouldn't worry much about what a control is. It's such a generic term that it doesn't really say much. "Text box" and "button" and "link" are specific types of controls, and talking about those is much easier (but also kinda off-topic from what we're talking about now).
  13. It pretty clearly says "bad credentials" in the error message...
  14. Ah: {filter:brightness (50%)} It's silly but you can't have a space between "brightness" and the "(50%)". Remove that. TIL
  15. I'm using my browser tools to inject a CSS rule exactly like what I said earlier and it's working for me. But I'd probably edit it to be .home-banner .porto-ibanner:hover > img /* or */ .home-banner .porto-ibanner:hover .porto-ibanner-img and I recommend adding some fade-in and fade-out transitions (it looks kinda weird to un-hover and the brightness returns but the popup thing takes a second before it hides again).
×
×
  • 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.