You get a bonus - 1 coin for daily activity. Now you have 1 coin

Lots of division-by-zero errors in the server logs, where could they be?

Practice




The server logs have a lot of division-by-zero errors, where could they be coming from?

most often division-by-zero errors appear during pagination
do a preliminary check whether the denominator equals zero, and if it is zero, then the result is zero

thanks, I fixed everything, but the division-by-zero errors remain

the server logs should also indicate the file and line where such errors occur

you probably haven't checked integer division in php yet — for that the percent sign % is used

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)