• Resolved newbiecoder

    (@newbiecoder)


    Hi

    MLA not loading message. PHP has been updated to v5. I′ve tried deactivating and reactivating plug-in but still the same message:

    The Media Library Assistant cannot load.
    The plugin requires PHP 5.4 or newer; you have 5.3.28.
    Contact your system administrator about updating your version of PHP.

    Thanks.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report; I regret the trouble you are having.

    I changed the minimum required version to conform to the new WordPress recommendation. MLA uses a standard PHP function to get the version and I have no reason to believe it is giving wrong results. Here is the code in /media-library-assistant/tests/class-mla-tests.php that does the test:

    
                    /**
                    * Test that your PHP version is at least that of the $min_php_version
                    *
                    * @since 0.1
                    *
                    * @param          string     representing the minimum required version of PHP, e.g. '5.3.2'
                    *
                    * @return          string     '' if pass else error message
                    */
                    public static function min_php_version( $min_version )
                    {
                                    $current_version = phpversion();
                                    if ( version_compare( $current_version, $min_version, '<' ) ) {
                                                    return sprintf( '<li>The plugin requires PHP %1$s or newer; you have %2$s.<br />Contact your system administrator about updating your version of PHP.</li>', /*$1%s*/ $min_version, /*$2%s*/ $current_version );
                                    }
    
                                    return '';
                    }
    

    If you have access to the MLA source code you can delete the lines that do the test to bypass the problem. Remove this portion:

    
            $current_version = phpversion();
            if ( version_compare( $current_version, $min_version, '<' ) ) {
                    return sprintf( '<li>The plugin requires PHP %1$s or newer; you have %2$s.<br />Contact your system administrator about updating your version of PHP.</li>', /*$1%s*/ $min_version, /*$2%s*/ $current_version );
            }
    

    Make sure you leave the “return ”;” line intact.

    As an alternative, I have uploaded a new MLA Development Version dated 20151213 that corrects the problem. To get the Development Version, follow the instructions in this earlier topic:

    Shortcode not working in (special) widget

    You can install the Development Version if you don’t feel comfortable making the source code changes I outlined above.

    I urge you to work with your hosting company to resolve the PHP version problem. MLA won’t be the only code using “phpversion()” to make a test of this sort.

    Let me know how you make out. Thanks for your interest in the plugin.

    Thread Starter newbiecoder

    (@newbiecoder)

    Great. Will let you know how I get on. AFAIK the PHP version is accurate but as I am fairly inexperienced, I will double check with the host and then try your solutions so I can report back.

    Thanks

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.41, which relaxes the PHP requirement from version 5.4 back to version 5.3. The new version should work for you.

    I am marking this topic resolved, but please update this topic if you have any problems.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MLA not loading -PHP version 4’ is closed to new replies.