Version 1.5.2 error
-
Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in
/wp-content/plugins/post-list-featured-image/autoload.php on line 26https://www.ads-software.com/plugins/post-list-featured-image/
-
I’m not sure what you mean in your title by “1.5.2 Error”.
The free version through the WP directory is only up to 0.5.0
However, we listed that the new version needs PHP 5.3 or higher to function due to Multi-site support. The latest stable release of PHP is 5.5.14. Most Hosting providers should already be up to or passed 5.3+. Please review the explanation below and let me know.
Requirements:
Wordpress version 3.5.1 or higher
PHP version 5.3 or higher**NOTE that you can contact your hosting provider to request they upgrade your PHP version on your server. Most servers should be already updated. In the unlikely event that you’re on an unmanaged dedicated server or VPS, you may nee to contact your hosting support to get updated.
You can revert back to the last version before this release here.
https://www.ads-software.com/plugins/post-list-featured-image/developers/
Sorry, I am running Version 0.5.0 |
I guess the problem may be to do with:
PHP 5.2.17 (cli) (built: Mar 1 2012 16:36:14)
I’ll try to upgrade that and see what happens.Yes and also there is a minor update to 0.5.1
Dreamhost said
In order to do what you are looking for you would need to do a custom install on the Dedicated server. We only support PHP 5.2 by default.
This makes me sad. And update to 0.5.1 still generates an error. I guess I must regress?
That is a bunch of bull. What do they expect to happen as the rest of the world moves forward? PHP 5.2 was las updated:
Version 5.2.12
17 Dec 2009
That is almost 5 years ago. In my opinion, Dreamhost is selling a product that has been long past obsolete. That would be like walking into a Best Buy to get a laptop that has Windows Vista OS. There is a reason for upgrades to technology, and your hosting provider should be keeping up with at least the latest 5.3 version:
Version 5.3.23
14 Mar 2013
that was released just over a year ago. and we are already approaching PHP 5.6
That’s a shame.
Johnny
Thanks Johnny
I couldn’t agree more, it’s a very strange situation which I hope to be able to rectify at some stage.I notice that the latest version fails after checking the PHP version, then appears to invoke the same action twice in autoload.php:
if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) { add_action( 'admin_notices', array( 'Post_List_Featured_Image_Loader', 'required_php_version' ) ); return; } /*register_activation_hook( __FILE__, array( Admin::instance(), 'activation_actions' ) ); register_deactivation_hook( __FILE__, array( Admin::instance(), 'deactivation_actions' ) );*/ add_action( 'plugins_loaded', array( \PostListFeaturedImage\Controller\Admin::instance(), 'init' ) ); add_action( 'plugins_loaded', array( \PostListFeaturedImage\Controller\Front::instance(), 'init' ) );'
I assume this should make it generate the error message “Post List Featured Image plugin requires at least PHP 5.3.0 to work properly.” instead of an error?
Yes, that should display an error in the admin page and not load the plugin. What error are you getting?
Have you figured out this issue? If so can you please respond to the last request for information.
Thanks,
Johnny
@paul
Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/insider/blog.rococochocolates.com/wp-content/plugins/post-list-featured-image/autoload.php on line 26@johnny
I don’t know how to pressure dreamhost into updating PHP on my dedicated server. I guess I could go ahead and upgrade it myself, but I don’t feel inclined to take this risk as this is the only plug-in/issue I know about due to outdated PHP.@tom
Sorry, but the plugin will not work if PHP version is less than 5.3 because the plugin (and our other plugins) makes use of PHP Namespaces in loading classes.Paul: If you put the PHP version check into a file by itself, and then have it include the rest of the plugin if the PHP version is acceptable, then you can avoid breakage like this.
I did something similar to this in my SFC plugin ages ago:
https://plugins.svn.www.ads-software.com/simple-facebook-connect/trunk/sfc.phpThe idea is that the main plugin body will be compatible, and it won’t cause a syntax error in older versions since it doesn’t load the incompatible part in those versions.
Like it or not, PHP 5.2 is still currently over a third of the possible userbase. Best not to break their sites just by installing your plugin.
@tom: PHP 5.3 should be an option in the Dreamhost control panel.
Otto: You’re exactly right! …and that is exactly the first goal of the autoload.php file (which is not namespaced – just static class). I believe it should be able to do the same thing in PHP 5.2 as long as it doesn’t encounter the class namespace, right? Anymore tips?
I guess if/else won’t work either in PHP 5.2.x with a static call to a namespaced method.
So anyways, updated the plugin but of course you still need to update your PHP version if you want to use the plugin, otherwise, disable/delete it.
- The topic ‘Version 1.5.2 error’ is closed to new replies.