Hello all,
I have a PHP socket script. GPS trackers connect to this socket. IMEI verification takes place and if that is ok, the code is passed to a database. Also if the code contains alert-info, SMS alert is sent to mobile phones.
It works like a charm.. well almost.
My problem is that when I run the script indefinite, after some hours the processor usage exeeds to 99,9% (with top, I can see it is the PHP file which is the cause).
Now my question is: Is it possible to debug the script, so I can find the origin of the CPU usage?
Thanks,
Steef
Socket programming
Moderator: General Moderators
Re: Socket programming
Yes, it's possible to debug PHP scripts (try Google) but debugging this kind of problem is annoying.
Most likely source of the high CPU usage: infinite loop.
Basic debugging technique: use echo/print statements to see what the code is doing.
Most likely source of the high CPU usage: infinite loop.
Basic debugging technique: use echo/print statements to see what the code is doing.
Re: Socket programming
Thanks a lot. I took your advise and found the problem. Now I am looking for the solution (posted another topic).
THANKS!
THANKS!