Jump to content

gw1500se

Members
  • Posts

    1,029
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by gw1500se

  1. If a user can upload a file then execute it, you have your permissions on that upload directory set wrong. You should be moving uploaded files to a protected location in any case.
  2. Converting is not very difficult. PHP has the same functions including grep (which may or may not be the best solution). However, I don't understand the password part of your question.
  3. Integrate with PHP or convert to PHP? Please clarify. I don't even see a password being used in this code. As for your specific question, the answer depends on what you are trying to do. You could put an encrypted password in a file that is read protected then decrypt the password in your code to be used wherever.
  4. Post your code here using the code icon (<>) and select to correct code type. You are more likely to get a resply.
  5. As we said that is because your syntax is wrong.
  6. I think those single quotes will make that fail as well. This might work: echo "<article data-style=\"$label_style\" style=\"background-image:url($event->data->thumbnails['medium']\") class=\"mec-event-article mec-clear $this->get_event_classes($event) $colorful_bg_color\"";
  7. As you can see from the formatting, the php echo is being treated as part of the style attribute. You need to get it out of those quotes and use concatenation instead.
  8. It looks to me like you want client not manager. In any case have you verified the path? You should be checking $db to make sure it is set.
  9. Mongo has its own PHP classes. Is this what you are using?
  10. https://mariadb.com/kb/en/library/general-query-log/
  11. Not error log, general log. It should tell you how many inserts are being done.
  12. I suggest your turn on DB logging and see if that tells you anything.
  13. I don't know what "displays correctly" means. You need to determine if the page is being executed twice which seems to be the only way this can happen.
  14. Unlikely (although a bad install is not impossible). If you add some HTML and echo something, see if it echos twice or if the page is reloaded.
  15. Truncated?? I would expect 'delete'.
  16. So there is no HTML? You just click the link and display a blank page? Do you clear the DB before running the test each time?
  17. I'm guessing you have your page set up so it is running or being called twice with the same data. You need to show more of the code. In particular how you trigger the page that runs this code.
  18. $res = $db->prepare("INSERT INTO apidata (item, value) VALUES (?,?)") ; For inserting multiple records you will need to iterate through the array and call 'execute' for each value pair.
  19. It already is an associative array. It is not clear from the link provided what you are specifically asking.
  20. But you said you removed that include????????
  21. Show where you instantiate $conn and check the results. The error implies that $conn is not set.
  22. You are setting $conn to null then trying to use it as a connection object. As a guess, 'ConnectionDB.php' is where you instantiate the $conn object but then set it to null. Why? Probably you just need to remove that statement.
  23. $_GET and $_POST are a function of your HTML form and/or URL. You didn't post any of that. P.S. Please use the code (<>) icon and select the proper type for your PHP and/or HTML.
  24. I, for one, will not help any user with code that is deprecated and obsolete due to potential liability issues.
×
×
  • 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.