A homeless Filipino boy has been overwhelmed with aid after a heart-wrenching photo of him studying on the pavement and using faint light from a McDonald's outlet went viral on the Internet.

Nine-year-old Daniel Cabrera will fulfil his dream of becoming a policeman after donations of cash, school supplies and a college scholarship poured in, his mother, Christina Espinosa, told AFP on Friday.

"We're overjoyed. I don't know what I will do with all of these blessings," the stunned 42-year-old grocery store employee and domestic helper told AFP.

"Now, Daniel will not have to suffer just to finish his studies."

The photo, posted on Facebook last month by a college student, showed Cabrera doing his homework on a wooden stool placed close to a McDonald's window to catch the light from the store.

The student, Joyce Torrefranca, captioned her Facebook post: "I got inspired by a kid."

It was then shared close to 7,000 times on the social networking site and reported by local television.

Espinosa and her three youngest children, including Cabrera, have been living in her employer's mini-grocery store since their shanty home was gutted by fire five years ago.

Espinosa said she earned just 80 pesos ($1.77) a day working at the store and as a domestic helper for the store's owners in their nearby home. She augments the income by selling cigarettes and candy on the streets on Mandaue, an urban centre on Cebu island in the central Philippines.

Their grocery store home is close to the McDonald's outlet that had served as Cabrera's study nook, she said.

Cabrera's father died in 2013 due to severe diarrhoea, said Espinosa, who has three older children, all married and living separate from her.

She described the boy as a tenacious child with a single-mined focus on getting an education.

"He is a very studious and determined boy... He would insist on going to school even without his lunch money because I have no money to give," Espinosa said.

"He always tells me: 'Mama, I don't want to stay poor. I want to reach my dreams'."

Story continues

Espinosa said aside from the cash, school supplies and scholarship offer that would guarantee his education through college, people had given school uniforms and a reading lamp.

The local church and government social welfare office had also received aid on his behalf.

"Our problem is how to manage all this financial assistance," the city's social welfare office chief, Violeta Cavada, told AFP.

"He has become a symbol of poor slum boys in the city who can't study because they don't have electricity."

Despite strong economic growth in recent years, roughly one quarter of the Philippines' 100 million people still live on less than one dollar a day, and giant slums dominate all major cities.

Torrefranca's post was shared around the world and in multiple languages, including Spanish, German and Portuguese, all touched by the boy's perseverance.