What matters most : published papers or GPA? (for scholarship and future career) I studied BSc chemistry and because I didn't like it, my BSc GPA is 2.46. Alongside with BSc duration, I studied mathematics at home as a self-learner. Since my BSc-GPA was too low, so I got admission to a very low ranking university in MSc-Maths. However, in my first year of MSc I got GPA 3.78 p. I am discouraged to apply for a PhD for a nice university because:

1- My current university's world ranking is >>4000 and I doubt that it would be a 'university' from the viewpoint of universities that I am trying to get my PhD admission. 

2- I don't have BSc in math and very low BSc-GPA in completely different field. 

My questions are:

1- Is it possible to get admission for PhD (with full scholarship) to a high-ranking universities in mathematics with such a conditions that I have?

2- If I have to study my PhD in the same university or a little better one, do my university reputation and and low GPA-in-BSc threat my future career after PhD (even if I show strong research ability and good recommendation letters)?

My target for PhD admission is countries: Canada (first priority), Europe and Australia. And I am not targeting USA. 

Thank you for your helps. And, sorry for my terrible English.    

Please feel free to edit the question to improve it.
The whole package is important.  An admissions committee will be very interested in your ability to pass their coursework. It doesn't make a difference how productive you are, or how deep a thinker you are if you flunk out on grades, which would just be wasting their resources.

You would need them to believe that your MSc grades would be indicative of future performance.  

By all means, apply, and do the best to make your package look right.  Lot's of students can have mediocre undergrad grades, but figure things out as they mature.  The MSc with good grades was step 1.  Good GRE's would be important, as would letters from the profs of your most difficult coursework confirming that you breezed through it without trouble.

You might also pay attention to those programs with a big die-off at qualifiers.  If a department PLANS that 1/3 of their students will not successfully reach candidacy stage, then their grad program is built in a certain way that can deal with this efficiently.  For example, programs like this do not tend to offer much in the way of financial support until you're paired up with a mentor, and then you're in the budget of that person for support.  In a way, those programs are willing to gamble on you so long as you're willing to gamble on you.