Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. You have multiple versions of PHP installed. One will be from apt, but the other is probably a manual install or something you got from another repository. Or maybe you installed from apt once, did something with your system setup, and then installed another. The easiest thing to do will be to remove all of your PHP and Apache stuff completely, make sure you're set up to be able to install the version of PHP you need, then install just that one. You should have one directory with all the extensions and they should be all available without having to edit any INI files.
  2. If you were able to install the mbstring and intl extensions through apt then you should have been able to install Apache and PHP that way too. Did you? Or did you install them some other way?
  3. Here is an introduction on how to use Composer.
  4. kicken already did that in his code. What problems are you having with trying to use it?
  5. I don't suppose you're trying to run that composer command from within a checkout of PHPMailer itself, are you?
  6. You cannot mix PHP and Javascript like this: PHP runs on the server and has finished running by the time your browser starts to execute any of your Javascript. If you want the length of the string then you can get that in Javascript easily. What are you actually trying to do with this code?
  7. Throwing syntax at the function and seeing if it does what you want isn't a very efficient way of programming. Do you understand how those regular expressions work? What the various symbols mean? Again: one step at a time. This ~(\bhttps?://\S+)(?:\s+\[([^]]+)\])?~i is a good enough regular expression that will match these: http://www.google.com https://www.google.com http://www.google.com [Link text here] https://www.google.com [Link text here] Did you know about the [text] bit at the end? Do you want that?
  8. Take it one step at a time. Do you have a regular expression that can match "www.google.com"? Do you have a regular expression that can match "google.com"? Do you have a regular expression that can match "person@gmail.com"?
  9. Don't use mail(). Do use PHPMailer or SwiftMailer, which understand how to do the sorts of encryption stuff that your server apparently (and fortunately) requires.
  10. What do you think? No really: do you think it's single or double?
  11. Don't do emails yourself like this. Use a library like PHPMailer or SwiftMailer. They know how to send emails properly.
  12. Meaning what? Giving us a single sentence of description and dumping a bunch of code doesn't go very far towards persuading us to help with a problem. Including an actual description, like of what you want to do and what you tried and how it seems to be (not) working, does help.
  13. That is also very, very much the more appropriate solution than creating dynamically-named variables. So that's great 👍
  14. First create the /user/index.php (or whatever you want to call it) like ginerjm suggested, then use URL rewriting to take a request that looks like /user/X and rewrite it to /user/index.php?id=X.
  15. The correct solution is to use something set up in the server configuration to let you do URL rewriting - without having to resort to anything to do with 404 pages. Have you tried asking the people who run the server what they can offer you in the form of URL rewriting? It's an extremely common behavior for websites so it's hard to believe they aren't providing you a way to do it.
  16. The first thing to fix is the error page you see when there's a problem. "This page has a problem" is not useful for you to fix anything. What you need are error messages about specific problems. Edit the PHP configuration file, put these two settings at the very bottom of the file, and restart Apache: error_reporting = -1 display_errors = on Then try running your PHP script and query again. I think you'll see at least one warning. Then put your mysqli_report line back, and/or try the query using ' quotes, and see what PHP says.
  17. It would be helpful if you explained what it does do, rather than just what it does not do. Like what kind of error messages you may be getting. And you should be getting error messages because you're using mysqli::execute_query incorrectly. If you aren't seeing messages then fix that before you fix the code.
  18. What you're trying to do doesn't make any sense at all. Perhaps you'll have a better time learning OOP if you aim your efforts in a more sane direction?
  19. 1. Don't use mysqli_multi_query because you're running the three queries by themselves individually already. 2. Don't create queries where you put $_POST values directly into the SQL. It's extremely unsafe. Use prepared statements instead.
  20. Not entirely sure it is possible. What about downgrading the system openssl to 2.x?
  21. Why is this thread still going? <input type="date" onchange="alert(this.valueAsDate.getUTCDate());">
  22. If the value in the cell is a logical true/false then there's no amount of PHP code you can write which will suddenly make it be text. But you can go into the sheet and mark that cell/column as text - that might work. Of course, if the value is true/false and you want "true"/"false" then you could simply handle that. Perhaps with a ternary, like "$variable = $cell ? 'TRUE' : 'FALSE'".
  23. Whose classes? Are there maybe autoload paths that need to be regenerated?
  24. You can't. There will have to be some conditional statement somewhere. OOP is a technique to solve a problem. It is not a solution to a problem. What's the rest of your design, and we can see if OOP is going to help with this particular task.
  25. Okay. But what is the URL, what "slug value" are you seeing, and what do you want to see?
×
×
  • 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.