I was bitten by this lately, so I post it here as a hint (it may bite you too):
apt-get install php4-mysql
you can connect immediately from your php script to a MySQL database. Calling simply phpinfo() will prove you wrong because of a minor detail: You must add the following line
at /etc/php4/apache2/php.ini and then issue an apache2ctl graceful .
Now you are OK.