Jump to content

requinix

Administrators
  • Posts

    15,054
  • Joined

  • Last visited

  • Days Won

    413

Everything posted by requinix

  1. object(stdClass)#12 (4) { The value you dumped is an object. ["result"]=> array(6) { It has a "result" property, which is an array. [...]=> object(stdClass)#11 (2) { Somewhere in that array (you should probably not rely on it being in a particular place) is an object. ["code"]=> string(8) "switch_1" It has a "code" property, which is a string with the value "switch_1". ["value"]=> bool(true) That same object has a "value" property, which is the boolean value true. This is an awkward structure to work with. What if you wanted other things besides the switch_1? Wouldn't it be nice if you had a single object/array that had everything at once? Try this: // assuming $object was the variable you dumped, $results = array_reduce($object->results, function($array, $result) { $array[$result->code] = $result->value; return $array; }, []); Then try dumping out $results and see if the data is easier to use in that form.
  2. That's unfortunate. Keep trying? It's not like I can log into their servers and fix it or anything.
  3. .obj :hover > div :hover That will target an .obj with a descendant-element you are hovering over which contains a DIV with another descendant-element you are hovering over. In other words, your HTML has to be something like <A class="obj"> <B> <div> <C> <!-- hovering here --> </C> </div> </B> </A> I doubt that's what you want. :hover isn't cinnamon, so you can't sprinkle it over miscellaneous elements and expect them to taste better. If you want the animation to play while hovering over the DIV then apply :hover directly to it alone - while also remembering that whitespace in CSS is occasionally significant. .obj > div:hover
  4. SSL is only if you are not using a Unix socket. Which you are. So you don't need it.
  5. I don't know. Try https://community.devsense.com/
  6. Are you using their extension? Did you turn on the appropriate settings?
  7. Most of the time, when you find an oddity like this that can't be explained any other way, the answer is going to be a JIT thing: PCRE isn't supposed to, but occasionally does behave in slightly different ways when JIT is on or off. ini_set("pcre.jit", 0); preg_match('/([^\.]|^)\s*a/', "a", $matches); But turning off JIT is not the best answer. Instead, do what kicken did and tweak the expression so it works. Anyway, that expression really should work even with JIT enabled, so feel free to file a bug report against PCRE2 about it. https://github.com/PCRE2Project/pcre2/issues
  8. I don't follow, partly because I don't understand what you mean by "combine" and partly because the code and samples you've posted don't fit together. You already have something that can count the number of times a "code number" is used. What does that code not do which you need?
  9. That's not an error. That's a link. Specifically, a link to https://goo.gl/Y0ZkNV. Pay more attention. Not if you want to do this from Javascript. But you should change to HTTPS regardless. To do it from PHP, if you can accept that you will not get an accurate location, you look up the remote IP address in some geolocation database - MaxMind's, for instance.
  10. If I plug your site into that reporting link I gave earlier, it says there's nothing wrong. And if I visit it in my browser, it has no complaints. Has the problem gone away? Because unless you can find out why the site is (was) marked as unsafe, it'll be hard to fix it to be safe.
  11. Are you sure your site hasn't been compromised? Look through the files on the site and see if there are any that don't belong.
  12. Have you tried looking into whether your assumption is correct? What do you get if you plug your site into their reporting tool?
  13. There are two approaches that aren't unreasonable: 1. Make your thing render as an image, and embed the image into the description (assuming it supports HTML). Then whoever sees the description will see the image. Not great for SEO or visually-impaired users. 2. Set up a cronjob that runs a script every X minutes (whatever makes sense to you). This script calculates what it needs, then goes into the database and manipulates the forum's description text.
  14. Congratulations: you've made this so much more complicated than it needed to be! https://stackoverflow.com/a/21064102
  15. Because you tried to "get attribute" and CSS is not attributes.
  16. 1. Are you sure you don't mean to get the svg's width and height? Since that element actually has those two specified as attributes? 2. parentOfSVG is the same dimensions at its child. 3. getAttribute gets attributes defined on the element. You didn't define a width or height on the parent. 4. I think you want either clientWidth or offsetWidth.
  17. By the way, if you ever want a submit button with a value that's separate from the label - or want a button that is more than just text - then <button> exists to help you out: <button type = "submit" name = "btnSub" value = "something" id = "zz">Select</button> where the btnSub value in $_POST will be "something".
  18. I'll go ahead and say that typically one does not do that. Because the users on your site are not actually setting up a web app. When you signed up on PHPFreaks, you got an account. There's a "page" for you at https://forums.phpfreaks.com/profile/63588-i-am-obodo/ and you can create content in your personal space (so to speak). None of that came with actual system accounts. You don't have a database dedicated to you, let alone a database account. Because your ability to do those things is part of our application. You are not, in fact, setting up your own application. You're simply using ours. If you literally want people to set up applications and write code that lets them connect to databases, that's one thing. But that's not what it sounds like you're describing. What you're describing is basically like what happens on many other ecommerce sites: you sign up, you get a "store" you may or may not be able to customize (be that a URL or subdomain), and you start selling items. As a user, you don't want to spend your time dealing with databases, or installing WordPress, or updating extensions, or writing HTML, or really doing anything else except for putting items up for sale and fulfilling orders.
  19. What's the HTML being outputted, and how about a screenshot of what you're seeing?
  20. People typically don't like downloading attachments and having to sift through code looking for something. Especially when it's not clear what that "something" needs to be. What's the relevant portion of the code involved? And in case it's not obvious from reading it, what do you mean by adding another option?
  21. What do you mean, "remove"? What "other operations"? You've managed to post a whole bunch of code, but wouldn't you know, when asking for help with a thing, giving a description of what you want to do is more important than the code itself! One-time password. Like those 6-digit numbers you get from SMS or "authenticator" apps that cycle every 30 seconds. Such as this algorithm, $acct_otp = substr(number_format(time() * rand(), 0, '', ''), 0, 6); (which is terrible and should never be used by anyone for any reason)
  22. If your ODBC settings are correct, my first guess would be an outdated version of OpenSSL that doesn't support the TLS configuration you're trying to use. What version of OpenSSL do you have, and what do your connection settings say about TLS?
×
×
  • 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.