Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. 0xc000007b is generally a problem of mixing 32- and 64-bit applications with DLLs. Are you sure you downloaded the right files and extensions?
  2. Well then, if that's your code: 1. You're missing an opening <?php tag 2. $prog is undefined 3. $fd is undefined 4. $pipes is undefined 5. $ldir is undefined 6. You don't do anything with $proc I'm not asking for a single line of code where you think the problem is. I'm asking for ALL of your code.
  3. What's your code? That should not block, or at least not for long. What you do or don't do afterwards may cause problems. It does not require ticks, but depending on what you do in your code the alarm signal may not be handled without using ticks. Again, depends on your code.
  4. You're using PHP to run a batch file to run an application? Post code.
  5. Ticks aren't deprecated... Either ticks won't help you because you're waiting on an external process to complete, or ticks can help because you have code that's actively running but then you don't need ticks in the first place. Apparently it's the latter. Besides, ticks only work in certain PHP setups. What's your code?
  6. Rather than use the hammer you know to hammer in a screw, learn to use a screwdriver. Install ntp/ntpd/whatever the name of the package is called on your (presumably Linux) distro. And make sure the system is using the right timezone. That's it.
  7. Make sure you're still logging those errors, though! You may not want the error message to appear on your site but you certainly should be aware of any problems.
  8. Apache needs the slash if you want it to serve whatever DirectoryIndex file (eg, index.php) automatically. If you want to turn the slash off then you have to (a) add it back yourself or (b) do the work of serving the index.php yourself. # do not automatically append slashes to directories DirectorySlash off # do automatically use index.php RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*[^/]$ $0/index.php [L]
  9. Use two forms. Besides the fact that having those two buttons on the same form would be confusing, if someone chooses a file to upload and then hits Submit, the file still gets uploaded. If you use two separate forms then you avoid that.
  10. You can avoid a loop with $my_numbers = array_rand(array_flip(range(1, 100)), 6);or the cleaner $rand_nums = range(1, 100); shuffle($rand_nums); $my_numbers = array_slice($rand_nums, 0, 6);There won't be much of a difference if you're only getting 6 numbers out of 100, but if you tried more like 6/7 or 90/100 then you'd notice a big one.
  11. Then they didn't get the initial setup correct. What your extension_dir setting and what extensions (as in the actual extension= or zend_extension= lines) are you trying to load?
  12. The first error is something you should contact your hosting company about. Unless you went out of your way to configure a PHP extension? The second depends on the code so posting that file (config.php) would help.
  13. That's a pretty complicated way of doing a loop until a time has passed. $future = mktime(16, 0, 0, 6, 14, 2015); while (time() < $future) { echo rand(0, 300); }That will generate a lot of numbers because the loop will execute very quickly. So this approach doesn't make sense to me. What are you actually trying to accomplish?
  14. I assume Round 2 is supposed to have Bob and Olivia? As it so happens, what you're describing wasn't quite covered by grissom or Barand. So that's awesome. Would it be enough to shuffle the list of ropers and the list of healers, pair everyone, and then "rotate" one of the lists? Like it goes M/N/O/P/Q then N/O/P/Q/M then O/P/Q/M/N and so on. The advantage is that it's really, really easy to do, but the disadvantage is that the results aren't random from one round to the next: someone can look at the assignments in one round and tell what the assignments will be in the next round.
  15. What's the difference between "Submit" and "Add"? The former is just a generic term and the latter implies a specific sort of action.
  16. Moved. Are you sure you want to use a dropdown for after they've made their selection? It's not like they can change it anymore. I suggest you reconsider whether you want to prevent the user from changing their mind, or else use Javascript to change the input entirely - like from a dropdown to a hidden input and plain text. <select name="foo"> <option value="value1">Option 1</option> <option value="value2">Option 2</option> </select> <input type="hidden" name="foo" value="value1"> Option 1
  17. Is mypage a directory? If not, Apache won't automatically add slashes to files so you'd have to have something that's adding the slashes.
  18. Alright, so before things get out of hand again: Let's say you have ropers - Alice - Bob - Cindy and healers - Martin - Nicky - Olivia Exactly what do you want to happen with them?
  19. Don't use the id at all. Use a LIMIT, as well as an ORDER BY to do the sorting. SELECT * FROM blog ORDER BY whatever your date column is DESC LIMIT ?, 10The ? is the starting offset but counting from 0: $start = ($page - 1) * 10. Or if you want to keep specifying the start and end as a range, LIMIT ?, ? $offset = $start - 1; $count = $stop - $start + 1;By the way, this process is called "pagination".
  20. You can't SELECT from a table that you're DELETEing from. Not even in a subquery. Fortunately Psycho's suggestion is better anyways.
  21. Not there either. But I won't stop anyone who wants to join PHP Freaks had some downtime (a couple downtimes, even) a while back. He was active before but when the site came back up he was gone.
  22. Why do you need the subnetID at all? You can always look up the appropriate subnet whenever you want, and without having to care about managing a subnetID column. Assuming there aren't overlapping subnets. Store the start and end of the subnet (with an index on the two) to make it easy to JOIN: JOIN subnet ON ipaddresses.ip_addr BETWEEN subnet.start AND subnet.end
  23. You're missing the point. If you use arrays you can do everything you just said, except you're not fighting against PHP the whole time.
×
×
  • 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.