Domains shows blank page: PHP Fatal error: Call to undefined function filter_var

Refers to:

  • Plesk for Linux

Created:

2016-11-16 12:43:41 UTC

Modified:

2016-12-21 19:04:25 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Domains shows blank page: PHP Fatal error: Call to undefined function filter_var

Symptoms

  1. Domain shows blank page.
  2. From domain log:
    # tail -f /var/www/vhosts/domain.tld/logs/error_log

    mod_fcgid: stderr: PHP Fatal error: Call to undefined function filter_var() in /var/www/vhosts/domain.tld/httpdocs/includes/functions.php on line 896

Cause

PHP filter module is not enabled:

    [root@test]# php -m |grep filter
[root@test]#

Resolution

  1. Make sure that PHP 5.2 or higher version is installed, because function filter_var is supported since PHP 5.2.0:

http://php.net/manual/en/function.filter-var.php

  1. Make sure tha PHP filter module is enabled after PHP upgrade:

[root@test]# php -m |grep filterfilter

Or follow PHP instruction to enable this module:

http://php.net/filter

Have more questions? Submit a request
Please sign in to leave a comment.