Jump to content

gw1500se

Members
  • Posts

    1,033
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. Not necessarily. There should be a segmentation fault number (e.g. segmentation fault (11)).
  2. Yes. There is also access.log but that probably won't help much.
  3. Just use += (for PHP 5.4+). $_SESSION['users']+=["boss"=>$row["bossid"]]; For 5.3- $_SESSION['users']+=array("boss"=>$row["bossid"]);
  4. Did you check the httpd log?
  5. Assuming PHP 5.3 or better and db date is in the format Y-m-d. $fromdb=new DateTime($datefromdb); $today=new DateTime(); $diff=$fromdb-$today; print("Difference is ".$diff.d." days); Note the result can be negative days.
  6. Thanks. Makes no sense to me. It is inconsistent with other special characters.
  7. I have an HTML input tag that can contain spaces. When I read the 'post' data the spaces are changed to '+' rather than '%20'. I run that data through Python 3 'unquote' and all the special characters are converted as appropriate. I suppose I can replace the '+' with a space but that raises 2 questions: 1. Why is the space not sent as '%20'? 2. How do I tell the difference between '+' as a space and '+' as a character in the string? TIA.
  8. What editor? I just use 'vim' to edit /etc/php.d/php.ini.
  9. Did you try increasing the memory limit anyway? I always set mine to 1024M.
  10. Since none of us are clairvoyant, as far as I know, it might help if you posted your code. Be sure to use the code icon (<>) and select PHP.
  11. Did you move the session start to before the include as I originally suggested? The next step is to include a print of $_SESSION at the end of the script that sets that variable to make sure it is set at the end of that script and again after the session start of the script that uses it. That will determine if the variable is being reset somewhere in the first script or in the 2nd before it is used. This assumes there are no intervening scripts you didn't mention that can mess it up.
  12. Not specifically based on what you have posted. At this point we can only tell you that the session variable is not set at the point you are trying to use it. If you don't want tell us the error you are getting or any details then there is little else we can do.
  13. What do you mean "it didn't work?" What was the error? You need to provide more detail about what you are getting for us to help you.
  14. Why use another variable at all? Use $_SESSION['Role'] directly. In any case do you do any error checking after the query to make sure the data is returned to set it in the first place?
  15. The error message is quite clear. You are not setting 'user_id' in the session variable at least in that case. Where is the code that sets that variable. If you printed $_SESSION, like I suggested, you would see the problem.
  16. session_start is not first in process.php.
  17. What is the error? Are you setting that session variable correctly? Did you output $_SESSION to make sure it is what you expect? echo "<pre>"; print_r($_SESSION); echo "</pre>";
  18. Perhaps I do not understand what you want but why does using $_SESSION['user_id'] not work?
  19. So what did you try and what did you get that you did not expect?
  20. It seems pretty obvious to me. In 2 places you have 'text]'.
  21. Don't give the same name to every button. Create an array of buttons then check which one was selected when you process the submit. i=0; while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["comment"]. "<br>"; echo "<input type='submit' name='button[i++]' />" ;
  22. I don't think that would cause a syntax error. We need to see the preceding code.
  23. You are getting that error because the syntax of something previous is wrong.
  24. If you looked for an error you won't find it. I meant look at the generated HTML source and see if the structure and data for the option box is there and correct. If it is not, you should be able to see what was built and what is missing/wrong.
  25. Did you look at the resulting page source to check for any HTML errors?
×
×
  • 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.