• I unpacked and uploaded the files, and successfully ran through the installer which helped me create the wp-config file, but when I tried to run the install, I got this error:

    Fatal error: Call to undefined function: php_version() in /var/www/sitename/html/blog/wp-settings.php on line 100

    I checked the file it was referring to, lines 99-101 are as follows:

    99     if ( version_compare( '4.3', phpversion(), '>' ) ) {
    100     die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version() ) );
    101     }

    I’m not quite sure what the problem is! Has anyone else run into this error? What did you do about it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    It’s trying to call a PHP function called phpversion() to check what version of PHP you’re running. Apparently your server doesn’t feel that function exists.
    What version of PHP are you running?

    Thread Starter mhogue

    (@mhogue)

    Thanks, I discovered the problem. The server is running PHP 4.2.2 and WordPress requires at least PHP 4.3

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Even better, move to a hosting company with PHP 5.

    Hi,

    I am also receiving this error, but my ISP is running php 5.1.6

    The message I am getting is

    Fatal error: Call to undefined function: php_version() in /home/3382/enscott/www.enscott.co.uk/public_html/blog/wp-settings.php on line 104

    Any other possible causes?

    Could I just comment out the offending lines (as I know my ISP uses the latest PHP release), or is this asking for trouble??

    ThankNeil

    Problem solved.

    The function that works is phpversion NOT php_version as in the wp-settings file. I wrote a PHP program to test is and found that contrary to published information my ISP is actually running PHP Version 4.1.2.

    The line in error is in wp_settings.php, line 104

    die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, php_version()

    Change the call at the end from php_version() to phpversion() and you get the correct error message

    Your server is running PHP version 4.1.2 but WordPress requires at least 4.3.

    So, now proper error received, back to ISP to get PHP upgraded

    Cheers

    Neil

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Call to undefined function: php_version()’ is closed to new replies.