Jump to content

requinix

Administrators
  • Posts

    15,275
  • Joined

  • Last visited

  • Days Won

    432

Posts posted by requinix

  1. I'm pretty sure you're encountering https://github.com/mdbtools/mdbtools/issues/312.
    Good news is that it was fixed, bad news is that it was fixed in mdbtools 1.0.1 and Ubuntu 24.04 currently only covers through 1.0.0.

    There might be a third-party PPA out there that has an updated version, but I don't know where to look for one.
    Or you could venture down the path of building it yourself, if you wanted: grab the Ubuntu sources, patch them according to this PR, and build.
    Or for a workaround, I think you'll be safe as long as you're not SELECTing anything that requires 64-bits of data length - meaning a VARCHAR(16777215) is okay but a VARCHAR(16777216) is not.

    • Great Answer 1
  2. That insane number for how much memory it tried to allocate strongly indicates an internal problem. But with both pdo_odbc and the plain odbc extension? Now I'm suspecting MDBTools is the one at fault. Are you using the latest version of that?

    8 hours ago, raphael75 said:

    UPDATE: If I modified the query from "select *..." to "select id, name..." it worked! Do you know what would cause this? Is there any way I can get "select *" to work, or could this be a bug?

    Can you identify exactly which column(s) is causing the problem? What data type is it? Are you able to run SELECT queries on other tables that have a column of the same type?

  3. 5 hours ago, raphael75 said:

    @requinix I have never used gdb before, but I just went through a tutorial on how to use it with php and here is the output. Please let me know if this is what you need:

    Almost there. Do that, then when you get the gdb prompt enter "bt" and it will dump a bunch of numbered lines.

    So far, though, it looks like the problem is in unixODBC, which is surprising as you're already on the current version - that said, it's been a couple years so I'm not sure it's still maintained...

  4. You're reinstalling VS Code for this?

    Either the error isn't fixed like you think, or the thing presenting the error is running from a cached version that somehow hasn't updated. Reloading the window, let alone quitting and restarting, should resolve the latter.

    Maybe some more specific information would be helpful?

  5. Services Offered has been a place for people to offer their services for hire. Over time, it's "evolved" to support companies to announce themselves as well (provided their services are on-topic), and today it primarily functions as a pseudo-sanctioned forum for spam. There's a slight moderation burden in monitoring it for off-topic spam and removing replies (which are against rules but the forum software isn't able to enforce this adequately).
    Job Offerings has been the other side of the coin, where people and companies could post about jobs they have available. It doesn't see much activity these days - 5 threads in the last two years.

    Given that Services Offered is more of a burden than a benefit and that Job Offerings isn't much of an offering anymore, we're looking to close them down within the next week or so. Thoughts?

    • Like 1
  6. The "Problems" tab is a list of problems detected by the IDE and/or various extensions. You clear the list by fixing the problems, or somehow otherwise turning off the error reporting.
    You can hide the tab entirely through the right-click menu on the tab area, and similarly for the problems list in the status bar.

  7. Something doesn't make sense here. Why can you look at IV values in the "current" element but for the pills/syrup you have to look "ahead"?

    I'm also not really following the algorithm. Given the example there, exactly what steps are you (as a human) following to get exactly what output?

  8. 50 minutes ago, phppup said:

    I initially engaged DOM with some "broken" HTML that had already been a little mangled by stripos and offset cuts.

    Don't? Just give it the whole document you're working with.

    50 minutes ago, phppup said:

    When I re-oriented it by <p> it "repaired" my chopped-up <h2> lines. Is this a built-in benefit? How?

    When you did what, it did what with your what?

    It will make some alterations if necessary to make the document valid, which means if it's doing something then that likely means the source was somewhat incorrect HTML.

    50 minutes ago, phppup said:

    Eventually I ran the DOM code properly and can see it's effectiveness. I guess at this point it's just a matter of signing the correct loops to gather and distribute the data as I desire. Right?

    Spend a bit of time getting familiar with DOM as a whole (not PHP's implementation, I mean the concept itself) and what it can do. With the sample you posted, I would expect an implementation that (1) finds H2 elements, (2) grabs their nextSiblings for the first paragraph, and (3) grabs their nextSiblings for the second paragraphs. It's also possible to do XPath queries for more advanced searching, but the new DOM API offers querySelector/querySelectorAll which is nearly as powerful.

    50 minutes ago, phppup said:

    So, are the ole days of stripos and string contents now antiquated?

    🌎🧑‍🚀🔫🧑‍🚀 Always have been.

  9. You cannot run Javascript code inside your PHP code. It does not work and never will work. The only reason you saw "3072" before was because your PHP literally outputted that <script>, the Javascript executed in your browser, and what the code does is literally write the value to the page.

    The only way to get values like screen.width to PHP is through some sort of request to the server, such as AJAX. If that's not working for you then fix that and then you'll be able to use AJAX just like everyone else.

    But that's probably the wrong thing. Why does your PHP need to know the screen width?

  10. You've got three basic options for storage: a string, a number, or as binary

    A string is the obvious choice because human beings think of IP addresses as strings. You can support IPv4 and IPv6 easily because it's just a string. You can do exact searches because it's just a string, but CIDR-ranged searches are hard.
    A number is another choice, as an IP address is essentially a number. That's fine for IPv4 addresses, but the IPv6 is too large to support. Exact and CIDR searches are easy.
    There's also binary, which is probably the least convenient form to work with. It has the strengths of strings (variable-width) but its own disadvantages (binary data, inefficient ranged searches), as well as the strength of numbers (efficient storage) as well as their disadvantages (need to convert to/from string format).

    If you don't need ranged searches then use strings, if you think you need ranged searches then think again because you probably don't. Because this is one of those times where you can get lost overthinking the problem.

    Besides that,

    Don't store just the last IP address. Store all of them. Since you're dealing with user accounts you'll also have a session, and in there you can remember the IP address, and that means you can know if it changes (which would mostly mean a mobile device switching networks, but even that isn't especially common these days).
    Fun side effect of this is that you're more likely to think about session security, like how you should reauthenticate a user if a request comes from the "wrong" IP address...

     

  11. Less sarcastic answer is,

    Apparently the diff says that the two <aaaa> nodes are different, likely due to the attributes, so they can't be merged. What happens if they have the same attributes? Or is it that the diff somehow isn't being recursive?

  12. I like how you said "it works as it should", then you post the output of the diff which clearly shows what it's doing.

    So no problem, right? It's all working as it should, which means your expectations are incorrect. 👍

×
×
  • 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.