to enable mysql functions, you normally have to install a different package named something like 'php-4.x.x-mysql-x.x.x.'.
for the header problem, if you are sure that you're not sending header's information before those lines, try to delete any whitespaces before the opening php tag. (Can sometimes be the problem)
In order to avoid your problem, the header function should always be called from the first top lines, after the logic that controls what to write to the header.
Check also that php, apache and dns resolve to the correct host name, (http://your.site.com