CentOS - PHP从浏览器调用未定义的函数mysql_connect()[重复]

This question already has an answer here:

I create a sample PHP file to check MYSQL database connection and save as test_db.php

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

   $link = mysql_connect("localhost", "root", "1qazxsw2")  or die(mysql_error());;

    mysql_close($link);
?>

When I run command php test_db.php, everything is ok

But when I open it from web browser, it show 'Fatal error: Call to undefined function mysql_connect()'

How can I fix it? Now I use php-5.3.3-49.el6.x86_64

Another information: It show '--without-mysql' in php_info

</div>