On the first night of Hanukah, we recite three Berachot over the candle lighting: "Le’hadlik Ner Hanukah"; "She’asa Nissim La’abotenu Ba’yamim Ha’hem Ba’zman Ha’zeh"; "She’hehiyanu."
Our community follows the custom to recite as the text of the first Beracha, "Le’hadlik Ner Hanukah." Although the Rambam (Rabbi Moshe Maimonides, Spain-Egypt, 1135-1204) maintained that one should recite, "Le’hadlik Ner Shel Hanukah," adding the word "Shel," and some of the prayer books from Halab follow that opinion, our custom is in accordance with the view of the Shulhan Aruch and the Arizal (Rav Yishak Luria of Safed, 1534-1572) to omit the word "Shel" and recite, "Le’hadlik Ner Hanukah." This was also the view of the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909).
The second Beracha, as mentioned, is the blessing of "She’asa Nissim La’abotenu Ba’yamim Ha’hem Ba’zman Ha’zeh," in which we give praise to G-d "who performed miracles for our forefathers, in those days, at this time." The Aruch Ha’shulhan (Rav Yechiel Michel Epstein of Nevarduk, 1829-1908) explained that the phrase "Ba’yamim Ha’hem Ba’zman Ha’zeh" refers to the two miracles which we celebrate on Hanukah – the victory over the Greeks, and the small amount of oil which burned for eight days. The miracle of the oil occurred on the eight days of Hanukah – starting on the 25th of Kislev – and thus when we speak of the miracles performed "Ba’zman Ha’zeh," during this time, we refer to the miracle of the oil. But when we mention the miracles which occurred "Ba’yamim Ha’hem" – "in those days," we refer to the victory over the Greeks, which took place before the days of Hanukah.
If a person forgot to recite the Berachot before lighting the candles, he may recite the Berachot after he began lighting, as long as he still has more candles to light. Even though the strict obligation of Hanukah candles requires the lighting of just a single candle, and the others are lit merely as a "Hiddur" (enhancement of the Misva), nevertheless, since the other candles are part of the Misva, one is not considered to have completed the Misva as long as there are more candles to light. Therefore, even after lighting one candle or several candles, the Berachot can still be recited if there are more candles to light. This is the ruling of Hacham Ovadia Yosef and of the Ben Ish Hai. If one realized his mistake only after lighting all the candles, he can no longer recite the Beracha of "Le’hadlik Ner Hanukah," since the Misva has already been fulfilled. He should, however, recite the Beracha of "She’asa Nissim," which (as we will see later) is relevant even to the viewing of Hanukah candles, and is not linked specifically to the act of kindling.
The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) writes (676:4) that one begins reciting "Ha’nerot Halalu" immediately after lighting the first candle. This means that after the first night, "Ha’nerot Halalu" is recited while one kindles the remaining candles. Others Poskim, however, maintain that one should begin reciting this prayer only after he completes the lighting of all the Hanukah candles. The work Derech Eretz, which documents the practices of the Jewish community of Halab (Aleppo, Syria), writes that different practices existed in this regard. It appears that there was no formally accepted custom as to when precisely the recitation of "Ha’nerot Halalu" should begin.
Different texts of "Ha’nerot Halalu" exist. According to the Ben Ish Hai, and according to Kabbalistic tradition, it is proper to recite the text which consists of precisely 36 words, which correspond to the 36 candles lit over the course of the eight days of Hanukah (1+2+3+4+5+6+7+8). Some Siddurim have this text, but others do not, and it appears that the community in Halab did not make a point of reciting specifically this text. Regardless, it is preferable to recite this text, in accordance with the teachings of Kabbalah.
Incidentally, the Mishna Berura observes that both the word "Ha’nerot" and the word "Halalu" has four letters, and they thus allude to the eight nights of Hanukah.
If a person is away from home on one of the nights of Hanukah, and, for whatever reason, he has nobody lighting for him at home, such that he will neither be lighting nor have somebody light for him, he recites the Beracha of "She’asa Nissim" upon seeing Hanukah candles lit by somebody else. This is the ruling of the Shulhan Aruch (Orah Haim 676). If this happens on the first night of Hanukah, then he also recites the Beracha of "She’hehiyanu." However, Hacham Ovadia Yosef and Hacham Bension Abba Shaul (Israel, 1924-1998) note that this requirement to recite a Beracha over seeing the candles applies only if one sees the candles within a half-hour of when they were lit. If a person in this situation saw the candles later, then he does not recite a Beracha, even though he will not be lighting or have anybody lighting for him at home.
Summary: The custom in the Syrian Jewish community to recite "Le’hadlik Ner Hanukah" as the first Beracha over the Hanukah candle lighting, as opposed to "Le’hadlik Ner Shel Hanukah." One who forgot to recite the Berachot before lighting, may recite them if he realized his mistake before he completed lighting all the candles. If he realized his mistake only after lighting all the candles, he recites only "She’asa Nissim." Some begin reciting "Ha’nerot Halalu" after lighting the first candle, whereas others wait until all the candles are lit. It is preferable to recite the text of "Ha’nerot Halalu" which consists of 36 words. One who is away from home on a night of Hanukah and will neither be lighting nor have somebody light for him, recites the Beracha of "She’asa Nissim" (and, on the first night, "She’hehiyanu") if he sees Hanukah candles within a half-hour of their having been lit.