I have made a script that run various loops and does some SQL inserts. I can’t post it as it’s just too big, and it’s unfair for people to try and fix it.
But, as I get more and more things for it to loop, it appears to be struggling to calculate everything and failing to assign values to arrays sometimes.
For example $myvar[$i] = 'abc' just doesn’t work. I echoed the values before I assigned them to make sure I wasn’t trying to insert nulls, but that’s not the case.
I reordered the loop to see if it was somehow related to other data problems, but the missing values were random. I have tried and tried to work out how to fix this, I bumped up the memory allowance, checked my timeout settings, it’s all fine.
I tried uploading the script in binary and ASCII, didn’t solve it.
I tried deleting white space around the top and bottom, didn’t solve it.
I checked to see if my version was out of date, its PHP Version 5.3.4 – problem?
I gently rocked my pc from side to side, didn’t solve it…
I’ve never seen PHP screw up like this, it’s always my fault. But this time it seems like PHP is the issue here.
My questions are:
- Does PHP ever miss a beat like this? Perhaps I found a bug?
- How can I fix this sucker, you guys are my last resort. Perhaps some PHP settings I am not aware of?
- Does PHP drop the ball when loops are too large or too complicated?
1 Answer