atmega8 pinout

Timer2 is significantly different on an ATmega8 than it is on an ATmega168. You probably have to move "everything" to a different timer.

Which IRRemote library are you trying to use? I looked at GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols and it already has code to automatically use timer1 on an ATmega8...

Thank you so so so much!!!!