Seeing how my first test of the issue was from miner.php, which showed the difference in the output as well, I don't think that was the issue. I do believe that something may be up with the read/write. After about 5 restarts of CGMiner today I got it to show correct stats, I noticed the avg rate was in kH/s which was odd, along with the shares being off (also odd), a couple restarts and now it's fine again. The SD card is about 2 days old (class 10, spec'd from eLinux.org wiki as completely compatible with rPi), also I have 5 other SD cards (all class 10, random sizes), so it would be easy to test that theory just by cloning the card.
I'm going to monitor this a bit more, I have another rPi that will be here tomorrow, I'll play with it some there on the new rPi as well.
You still have yet to tell me what you are doing to cause the problem.
How are you getting this problem, what data are you sending to the API and how are you sending this data to the API
Again, the API is a simple text protocol, no binary, no hex, all simple text.
My miner.php simply sends text to the cgminer API and gets back text replies.
So I don't get what the true/1 issue is.
Yes I've written 10's of thousands of lines of PHP I do understand that one can make such mistakes, but they don't exist in miner.php as far as I know ...
If you've found a bug in miner.php - report it, you seem to know a little about PHP, so you should be able to clearly point out what is happening.
P.S. 'summary' has no parameters
For someone to say they know anything about programming and not know references (or differences) between an INT or BOOL is beyond me, very basic stuff right there..
I've clearly stated it could be a combination of things (CGMiner,I/O w/ SD Card). I've already proved it was at the application level, by restarting CGMiner several times before finally getting the correct data returned through API calls. Which seems semi-isolated and almost random (for me) however other people have reported incorrect readings between the output screen and what MinePeon's WebUI is showing, which is coming from the UI. So far I personally have seen incorrect speeds, invalid share totals and a few other minor things, all of which eventually get flushed out after restarting CGMiner (usually about 4-5 times after a reboot of the Pi).
Please stop saying you wrote miner.php, you've said it enough times, I don't care because I'm not using it for anything other than to compare data results from the API call (also, it doesn't look like the latest release of MinePeon is calling/including miner.php anywhere now). I'm not pointing a finger at you, but you seem to somehow think I am? So you're continually trying to defend yourself it seems.
I'm glad you know how to send text over sockets, wonderful. I used it (miner.php) along with cgminer.inc.php and my own code to try and see if I was getting the same results as OTHER PEOPLE were reporting and I did...
Also, nice touch trying to "dick measure" with the '10's of thousands of lines of PHP' (yet you still use globals? (in miner.php, everywhere) finding that hard to believe...).