The default version of PHP installed on CentOS 5.3 is 5.1.6. The command "yum update php" won't update to the current version. The function filter_var() is unavailable at 5.1.6, so this causes the undefined function error. Following steps will update to the current version of PHP to fix this problem.
1. Run following to check the PHP version and it should be 5.1.6:
2. Create /etc/yum.repos.d/utterramblings.repo to contain following information:
name=Jason's Utter Ramblings Repo
3. Run following to update PHP as root:
yum update php
4. Run the following to confirm the update of PHP and currently it is 5.2.11:
5. Restart Apache server to pickup the new version of PHP.
6. The error "undefined function filter_var() ..." will be disappeared.