• Resolved alexlii

    (@alexlii)


    Hello,

    It will show error message below when it was activated networkly.

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected end of file in /var/www/oursite.com/htdocs/wp-content/plugins/multisite-media-display/mutlisite-media-display.php on line 488

    Alex

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi there Alex,

    He has missed a php end tag in mutlisite-media-display.php 488

    <?php
    return;
    }

    // ===============================================================================
    // end functions to display all media files
    // ===============================================================================

    // —————————————————————————-
    // debugging function to show array values nicely formatted
    function mmd_show_array( $xarray = array()) {
    echo “

    "; print_r($xarray);echo "

    “;
    return;
    }

    // —————————————————————————-
    // all done!
    // —————————————————————————-
    ?>

    Hi Alexi,

    If you have issues with this plugins (which I am) – use these 2 plugins together! It will save your life!

    https://www.ads-software.com/plugins/network-shared-media/
    https://www.ads-software.com/plugins/multisite-featured-image/

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Mr. Roharniac: a ‘closing ?> PHP tag is not required for PHP files.

    From an answer on Stack Overflow: https://stackoverflow.com/questions/19953483/php-end-tag

    From the PHP Manual:

    The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later.

    See PHP manual: https://php.net/basic-syntax.instruction-separation

    The problem is a deprecated function for getting the sites array on a multisite installation. This worked with WP 4.8, but not now.

    I believe you are getting the error because you are running earlier than WP 4.6. At least, that’s what the docs say about that deprecated function.

    That’s why the latest version of Multimedia Post Reader (2.00) now requires WP 4.6+, and checks the version during activation. I will be adding that check and requirement, and removing the deprecated code, to the other related plugins I wrote. That should be done tomorrow. (It’s after midnight here, so it will have to wait until tomorrow.)

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    Just uploaded version 1.40, with added check for WP 4.6+ and removal of use of deprecated function.

    Also added a ‘debug=yes’ parameter to show you the SQL statement and number of records found. For non-production use, so you can see if your parameters actually found records – and use the SQL statement in myPHPAdmin if you want.

    If you are using versions prior to WP4.6, the plugin will automatically deactivate.

    Thread Starter alexlii

    (@alexlii)

    Thanks,

    I update our wordpress to the latest version of 4.8.1

    but when I activated networkly, it show:
    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected end of file in /var/www/oursite.com/htdocs/wp-content/plugins/multisite-media-display/mutlisite-media-display.php on line 527

    Alex

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    On my multisite testing site (3 sites), running WP 4.8.1 and PHP 5.4.43.

    I uninstalled MMD (and my related plugins) and deleted it. Then reinstalled it via Add Plugins (while in network admin). Activated it without problem.

    Created a page with just the [mmd_display debug=yes ] shortcode as content. Published the page, and viewed it; all is as expected.

    Not sure why you have the problem activating. Works fine for me with the above WP/PHP versions. Perhaps your WP/PHP versions are different?

    Perhaps de-activate, then delete, then reinstall via Add Plugin?

    Thread Starter alexlii

    (@alexlii)

    I tried twice to delete and reinstall it, it will still show Errors once I try to networkly activate in wordpress 4.8.1:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected end of file in /var/www/oursite.com/htdocs/wp-content/plugins/multisite-media-display/mutlisite-media-display.php on line 527

    I tried to deactivated most of our plugins, like Network Privacy, but the error still show there.

    FYI, our sites are under HHVM+ Redis cache+ nginx+ Wp super Cache.

    Alex

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    I have fresh-installed on a single-site and a multi-site, and activation works OK on either site, via ‘activate’ on the Add Plugin page, or the Installed Plugins page.

    A page with the shortcode works on multi-site. There is an fatal error when you try the shortcode on non-multisite installation; wp_sites() function not found . That is a valid function according to the codex, but it looks like it doesn’t work on non-multisite installations.

    But activation is OK on my testing.

    Is your installation a multisite?

    Plugin Author Rick Hellewell

    (@rhellewellgmailcom)

    I just uploaded version 1.41, which checks for a multisite installation. Update, then go to plugins and reactivate (de-activate then activate if needed).

    If not a multisite, you should see an admin message at the top of the plugin screen saying that the plugin was not activated.

    Although the error you included seems to indicate that the plugin didn’t copy over correctly. Assume you are using the ‘add plugin’ process.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error message’ is closed to new replies.