Jump to content

gw1500se

Members
  • Posts

    1,041
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. It should be /etc/php.ini. You will need root privileges to edit it.
  2. No, as far as I know they are system wide and need to be enabled in php.ini. Enabling extensions will have minimal effect as opposed to actually using them in a script.
  3. The keys are the items within the []
  4. Assuming your swap space is sufficient, I guess you are stuck with trying to reinstall PHP and maybe Apache.
  5. Its possible but you might try going to 512K on your memory first. Magento is a separate thing so it would not effect PHP max memory. It would only effect total memory and I assume you have at least 8G. How big is your swap? Although I doubt that would cause a memory fault.
  6. Fault 11 is memory. You probably need to change memory_limit in your php.ini. I think it is 128M by default so you might try 256M.
  7. oci_fetch_assoc returns an array of all the rows returned by the query. Call it once then put $value in a 'for' loop to process each row. $rows=oci_fetch_assoc($stid); foreach ($rows as $row) { . . . }
  8. Not necessarily. There should be a segmentation fault number (e.g. segmentation fault (11)).
  9. Yes. There is also access.log but that probably won't help much.
  10. Just use += (for PHP 5.4+). $_SESSION['users']+=["boss"=>$row["bossid"]]; For 5.3- $_SESSION['users']+=array("boss"=>$row["bossid"]);
  11. Did you check the httpd log?
  12. 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.
  13. Thanks. Makes no sense to me. It is inconsistent with other special characters.
  14. 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.
  15. What editor? I just use 'vim' to edit /etc/php.d/php.ini.
  16. Did you try increasing the memory limit anyway? I always set mine to 1024M.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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?
  22. 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.
  23. session_start is not first in process.php.
  24. 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>";
×
×
  • 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.