The player started his career at Leeds United and had loan spells at Millwall and Nottingham Forest before joining Barnsley in 2004.
The announcement on the Welsh club's web page reads: "Stephen McPhail has been diagnosed with a stage one malt lymphoma, previously known as a pseudo lymphoma.
"Treatment is expected to last for three weeks with a return to football by January 2010.
"The club requests that the privacy of Stephen, his wife, and young family be respected during his recovery."
Malt lymphoma is a relatively rare form of non-Hodgkin lymphoma, according to cancer charity Macmillan.
It is most common in the stomach but may also occur in the lung, the thyroid, salivary gland and other organs such as the intestine.
Most cases of malt lymphoma affecting the stomach are caused through infection by bacteria Helicobacter pylori.
It is treated with antibiotics, radiotherapy, surgery and chemotherapy.