WordPress.org

Ready to get started?Download WordPress

Forums

WP Frontpage News
[resolved] Fatal error (11 posts)

  1. mscgl
    Member
    Posted 10 months ago #

    When I'm trying to activate the plugin, I get this error :

    Parse error: syntax error, unexpected T_FUNCTION in /home/content/wp-content/plugins/wp-frontpage-news/inc/wp-fpn-main.inc.php on line 137

    http://wordpress.org/plugins/wp-frontpage-news/

  2. ydubois
    Member
    Plugin Author

    Posted 10 months ago #

    @mscgl: please check out with your hosting provider to upgrade your version of PHP. You are using a version of PHP that is no longer maintained.

  3. WPCode United
    Member
    Plugin Author

    Posted 10 months ago #

    @mscgl: this plugin requires PHP 5.3. Please check out with your hosting provider to switch to PHP 5.3. Please note that PHP 5.2 is not supported anymore by the PHP core team, so you should definitely move on.

    It is not certain at this point that I will provide PHP 5.2 support in future releases of the plugin.

  4. fmalgrand
    Member
    Posted 10 months ago #

    Hello!
    My version of PHP is PHP 5.4 and when I'm trying to activate the plugin, I get this error too :

    Parse error: syntax error, unexpected T_FUNCTION in /homepages/40/d479849407/htdocs/clickandbuilds/WordPress/La_Super_Ecole/wp-content/plugins/wp-frontpage-news/inc/wp-fpn-main.inc.php on line 137

    What can i do?

  5. ydubois
    Member
    Plugin Author

    Posted 10 months ago #

    @fmalgrand: line 137 of wp-fpn-main.inc.php contains a PHP instruction that is only compatible with PHP 5.3 and up. There is no reason PHP 5.4 would have a problem with that. This line of code comes directly from the WordPress CODEX (http://codex.wordpress.org/Widgets_API). It uses an anonymous function, a feature of PHP that has been introduced in PHP 5.3 (http://php.net/manual/en/functions.anonymous.php). If your WordPress setup breaks with this plugin, it will break with many others. My only guess at this point is that PHP 5.4 is not effetively enabled on your web server. Please check again :)

  6. mscgl
    Member
    Posted 9 months ago #

    it was php version 5.2, so when I switch to 5.3, the problem was gone.

    thanks :)

  7. Dan
    Member
    Posted 9 months ago #

    What about MultiSite? Does it create fatal error? In case that is the prob with mine.

  8. ydubois
    Member
    Plugin Author

    Posted 9 months ago #

    @Daniel Berhane: no, this plugin works fine on WPMU. My own personal blog is WPMU and runs with this plugin flawlessly.

    The only reported case of fatal error up to now is when running on PHP 5.2 or lower, which are obsoleted versions of PHP.

  9. crankopotamus
    Member
    Posted 4 months ago #

    I am having a very similar issue. Here is the error message:

    [22-Apr-2014 23:41:15] PHP Parse error: syntax error, unexpected T_FUNCTION in /home4/teamhoyt/public_html/wp-content/plugins/wp-frontpage-news/inc/wp-fpn-main.inc.php on line 138

    PHP version 5.4.24
    MySQL version 5.5.37-log

    When the plugin is enabled, I get a white screen. It worked fine on the dev site, which apparently is running PHP 5.3.27.

    Any thoughts? Thanks in advance!

  10. ydubois
    Member
    Plugin Author

    Posted 4 months ago #

    Anonymous functions are supported since PHP 5.3. If you were in effect running PHP 5.4 you would not see this error.

  11. crankopotamus
    Member
    Posted 4 months ago #

    You are absolutely right. Sorry for the false alarm. Bluehost's cPanel stats say I have PHP 5.4, but phpinfo.php says it's 5.2. Thanks for the speedy response.

Reply

You must log in to post.

About this Plugin

About this Topic