It is customary for the students to stand up out of respect for the teacher when he enters the classroom. Is that permissible?.
Al-Tirmidhi (2754) narrated that Anas (may Allaah be pleased with him) said: “No person was dearer to them than the Messenger of Allaah (peace and blessings of Allaah be upon him). When they saw him, they did not stand up, because they knew that he disliked that.” Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
The Prophet (peace and blessings of Allaah be upon him) disliked them to stand up for him, out of humility towards his Lord, and so as to differ from the custom of the arrogant and tyrants. Tuhfat al-Ahwadhi.
The scholars of the Standing Committee for Issuing Fatwas were asked: What is the Islamic ruling on students standing up for their teachers when they enter the classroom? Is it permissible or not?
The best of guidance is the guidance of Muhammad (peace and blessings of Allaah be upon him) and the worst of matters are those which are innovated. The best of generations is that to whom the Messenger (peace and blessings of Allaah be upon him) came, and the generations who came after him, as is proven from him (peace and blessings of Allaah be upon him). His practice with his companions with regard to this matter was that when he came to them, they did not stand up for him, because they knew that he disliked that. So this teacher should not tell his students to stand up for him, and they should not obey him if he tells them to do that, because there is no obedience to any created being if it involves disobedience towards the Creator.
And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Fataawa al-Lajnah al-Daa’imah (1/172).
And Allaah knows best.