You'll have to recompile php against php5 then. My guess is that php is looking for the mysql-4 version of the dynamic libraries. Try running:
Code:
$ ldd /usr/lib/php/extensions/mysql.so | grep mysql
to see if your php mysql extension library can find the correct version of the mysql client library.
In my case (Slackware 11.0):
Code:
$ ldd /usr/lib/php/extensions/mysql.so | grep mysql
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0xb7e6f000)
Eric