I am sorry but what is p2 or p5 grades? I am not familiar with them so cannot comment about them without more info. However, grades are not the only way of assessing PhD candidates, so you probably have a chance. Supervisors want to see ability and potential. So if you can draw upon previous experience with genuine enthusiasm you can make yourself look like a good candidate without the grades.