Yes, that will print out the current running config for PHP according to your webserver. Which needs to have a mysql section in it. If you do not have that section then that's your problem. I recommend that you read the following tutorial on how to setup Apache, PHP, MySQL on CentOS:
http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp(http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.2-lamp)
You want to pay special attention to step 6 which is entitled "6 Getting MySQL Support In PHP5"