We first present a new result in PPM detection in which we calculate exact probabilities of detection error when the average number of photons is different in each of the M slots of PPM, taking into account the possibility of ties between photon counts of different PPM slots. Then we obtain the exact performance of uncoded optical CDMA over the Poisson channel averaged over all possible delays between N users by considering all M(M+1)/2 possible multiuser interfering patterns. At the optical receiver, after correlating the output of photon counting detectors with signature sequences,a hard decision output is provided to an iterative decoder. A protograph-based code is optimized using the reciprocal channel approximation over the hard decision output to be used by each user. Examples are provided for coded optical CDMA with PPM under different background noise regimes, number of users, and signature sequences. We have examples demonstrating that with the proposed coding scheme the loss due to multiuser interference is about one dB for certain signature sequences supporting up to N users at a frame error rate of 10^-6.