An earthquake of magnitude 6.3 struck the Philippines' main island on Thursday, authorities said, halting some railway operations in the capital Manila.