Jump to content
#FlattenTheCurve ×


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by requinix

  1. Ah, I was reading pgAdmin 3 documentation. For the hostname, put the path to the socket file. Not all *nix systems are running an authentication system on port 113. You don't need to use it unless you have something special running there that provides some specific form of authentication - which I'm sure you don't.
  2. Again: don't use as the host. Remove the configuration entirely so it uses a socket. You know, like how MySQL connections often work.
  3. It's not. You're effectively dropping all authentication.
  4. Take a look at the authentication configuration for PostgreSQL. "local" connections are peer (system username), while the "host" connections from the local machine are ident (username and password). If you have a password set up for the michael user/role then this should work. But you shouldn't need one: remove the host from the pgAdmin configuration to connect by socket, keep the database and user (but you may want to switch back to postgres/postgres for those), drop the password, and I think drop either the username or role.
  5. Don't comment it. Leave it be. Do you know what it is? Do you know what it means?
  6. Look at line 3 of phpMQTT.php.
  7. Uppercase or lowercase does not matter. Read the rest of the page. It tells you how to use a WHERE clause. Correctly.
  8. WHERE And please ask your database questions in the appropriate database forum.
  9. I think you missed the point. It doesn't matter what timezone the user is in because you're recording and comparing dates on the server. A duration of one year is a duration of one year for everyone. Please localize it. Don't record the end time at all. It starts at a particular moment, it goes up until the date that's one year later, and you check for validity using a <= so that the end date is also considered valid. It will give the user slightly more than one year, and depending on timezones that extra may or may not be noticeable to the user, but who cares.
  10. One table. You create the order in a pending state when they complete the first page. You can update that order with information from the second page, with user information if/when you get it, with whatever. When all the requirements are met you can switch the order to complete or ready or whatever.
  11. If that happens then, with my description, the order will be marked as pending and only have some fields filled in. Or maybe it has everything filled in but it's still pending, not sure. Either way, you can query the table to find these people. Also not sure about this user vs. visitor distinction, but I believe the answer is still what I said: the order is pending, has some information filled in, does not have the "user ID" part of it provided, and you can query for that.
  12. One table for orders. They can be marked as pending/not complete. That's okay. They can have incomplete information - while still pending. That's okay.
  13. You need to address this. Everything should be HTTPS nowadays and there is no good reason why anything should not be. Especially when it comes to content like advertising - that needs to be served in a secure way. I cannot believe there is no way to get those ads working over HTTPS. Check their documentation, complain to support, whatever.
  14. - A role is a user. - Easy mode: a database is a database, ignore schemas and just use "public". - Don't worry about clusters. - Ownership is... ownership. I mean, it's the same thing that it means in English. Owning. - Apache and php-fpm can run as different users, if you want. - No, roles don't need to have database with their name. It's just easy that way. - You can't create a database and give ownership to somebody your role isn't associated with. Use the postgres user to create the michael database, owner michael. Then reconnect as michael and do whatever you want.
  15. Remember what I said about using a form? Use a form.
  16. I'm not sure I followed that question but I think the right reply is something like "if you enter 3-15-2020 as the date then what is the time?"
  17. If the database is on the local machine then you should use peer authentication. When something connects locally, PostgreSQL will ask the system for the username on the connecting end. That'll be your php-fpm pool user. It then allows a connection to the database by that name. IIRC, 1. Use a different user than "postgres". Create a new system user and update your php-fpm pool to use that username (which should mean creating a new pool if you have more than one site running). Restart, obviously. 2. With PostgreSQL, set up authentication for that new user. 3. Create a matching database and move all your data into it. Be careful about ownerships. 4. Update your PDO connection: no host so it connects locally, and drop the username (it's automatic) and password (not used).
  18. ... What is the HTML outputted, both when it didn't work and after your change that made it work?
  19. The code could use some improvement but it should work. Have you done a View Source of the page to make sure the HTML being outputted is correct? Does "cannot get it right" mean anything more than just the checkbox remaining unchecked?
  20. You know what would be even better than that? Not storing the duration. Like Barand said, you don't have to bother storing it and then worrying about what to do when values change when you can just call TIMEDIFF whenever you need it.
  21. TIMEDIFF returns a time string, not a number. If you need a number then try TIMESTAMPDIFF.
  22. 1. As far as I can tell, the "rules" is supposed to be a string - not an object. If you didn't need to account for is_page_loaded then you should say <validation-provider ... rules="required|positive_price"> 2. The validation function needs to return true or false. You are returning string or false.
  23. requinix

    CSS with PHP

    They aren't the same width because you don't have any sort of CSS in there that says anything about a width. It's not like the browser can read your mind about how you want it to appear... Have you tried giving the buttons a width?
  • 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.