You should contact your host and have them tell you how to switch to PHP 5.4 (or newer).
While PHP 5.2 is still supported for XF right now, we don't support downgrading to it. PHP 5.2 is completely unsupported by the PHP developers so I strongly recommend migrating to a newer version. There are likely unfixed security issues in the version you're using.