Knowledge Base/Testimonials Widget/Announcements

Most Aihrus Plugins Require PHP 5.3+

Michael Cannon
posted this on November 27, 2013, 23:20

I'm very sorry for the troubles you've just encountered. You're probably here because, you just found out you're running PHP 5.2.

My webhost says I'm running PHP 5.3, 5.4, or 5.5…

More than likely though, it's available to you, but you're not running it yet.

If you're seeing an error message like the following, then you're running PHP 5.2 or lower.

Parse error: syntax error, unexpected T_STATIC, expecting ')' in ...\wp-content\plugins\custom-bulkquick-edit\lib\aihrus\class-aihrus-common.php on line 44

If you don't believe it, then create a `phpinfo.php` file in your website root with the code below. Then using your web browser, call it via `http://example.com/phpinfo.php` to see which PHP version you're running.

<?php phpinfo(); ?> 

Now, see the DIY section below for solutions.

Plugins Affected

  • Testimonials 2.16.0+
  • Testimonials Premium 1.17.0+
  • Custom Bulk/Quick Edit 1.3.0+
  • Custom Bulk/Quick Edit Premium 1.3.0+
  • GC Testimonials to Testimonials 1.0.0+

DIY – Fix The Problem

Which PHP Version?

PHP 5.3+ means PHP 5.3 or newer is required. So PHP 5.3, 5.4, or 5.5 should be fine. Truthfully, you should use PHP 5.5 so that you don't have to worry about this for a few more years again.

.htaccess Edit

On many web hosts, just add the following code to the top of your `.htaccess` file in your website root directory.

AddType application/x-httpd-php53 .php

Or try

AddHandler application/x-httpd-php53 .php .php5 .php4 .php3

cPanel

  1. Log into your control panel
  2. Select CGI and Scripted Language Support
  3. Select PHP Scripting
  4. In the Select Default PHP Version section, select version 5.3 or newer

Thank you Ascii King for cPanel guidance.

Delete via FTP

You can delete the offending plugin via FTP, get back into WordPress, and then upload one of the older Testimonials versions like http://downloads.wordpress.org/plugin/testimonials-widget.2.15.1.zip that's available from http://wordpress.org/plugins/testimonials-widget/developers/.

Update Your PHP Version

Some web hosts allow you to change your PHP version. The links below should help you do so.

If your web host doesn't allow you to change the PHP version, email their support department to request a current version of PHP.

Why PHP 5.3 or newer?

Aihrus is moving forward in developing using current technology and techniques. As such, at some points in time during software development a crossed bridge must be burned. So that we can use things like…

After Updating, Clear Your Caches!

Still No Go…

The condition you mention is rare, but does happen when the server's main PHP version isn't PHP 5.3+ and the PHP 5.3+ configuration is via .htaccess or the like. A server change so that it's providing PHP 5.3+ by default will resolve things.

Wasn't Testing Done?

Yes!

These plugins go out to 30+ beta testers, several live and development sites, a multitude of tests are run, and coding standards are met before any release happens. Frankly, software releases are a major pain because of so much hassle in getting good enough testing completed.

More beta testers are always welcome. You get free licensing and support for the products you provide feedback upon.

WordPress Stats

See them.

I Can't Upgrade to PHP 5.3+

Then download and use the last PHP 5.2 compatible version.

 

Comments

User photo
Chris Barrett

I'll just add that BlueHost, one of the recommended WordPress.org providers (http://wordpress.org/hosting/), defaults to 5.2.

If you need to update, please review: https://my.bluehost.com/cgi/help/447

November 28, 2013, 14:55
User photo
Gamba Dave

I have no words, i simply cannot even enter my site (www.davegamba.com) and i cant do anyarrangment. Moreover i'm absolutly no expert with this kind of things and have no idea, and dont understand what you explain here. Dont really know what to do, but my site is completely stocked

December 4, 2013, 03:57
User photo
Michael Cannon
Aihrus

@Gamba, please ask your webhost to upgrade your website to PHP 5.3 or higher.

December 4, 2013, 09:27
User photo
Leah Hansel

Hi Michael,
I just updated my testimonials plugin (am running PHP 5.4 (FastGCI) through bluehost and the plugin is working, but I can't seem to change the title?  It just shows the word "Array".
Any help is very much appreciated!
Thank you,
Leah

December 5, 2013, 11:21
User photo
Michael Cannon
Aihrus

@Leah, I just released a fix for that. Try WP Admin > Dashboard > Updates to get it.

December 5, 2013, 12:08
User photo
Leah Hansel
Thanks Michael! That did the trick :D
December 6, 2013, 06:01
User photo
Shannon

Hey Michael - Any chance to work some backwards compatibility into this problem? The webshop I work for uses this (excellent) plugin for every. single. client.  So we've gotten almost 50 emails in the past few days regarding this error - across all different hosting companies. I've been downgrading as fast as I can, but it seems huge that this brings down the entire site every time. And then of course with the downgrade we get an upgrade nag - where, in some cases, the well-meaning clients ignore my advice to leave be, and upgrade, and bring their site down again. Such headaches. Any tips for a better way to respond? I've been telling folks to call their hosts, but our shop looks like the bad guys here. :(

December 6, 2013, 13:34
User photo
Michael Cannon
Aihrus

@Shannon,

I was afraid of this once I realized how many folks are still running PHP 5.2. It's an ugly situation no matter how I look. In order to move development forward into advanced techniques, I need to push the PHP 5.3 requirement. Even then, PHP 5.3 reached end of life in March 2013 and only receives critical updates.

At this point, I'm pondering workarounds, but nothing I come up with is pleasant. I realize I'm going to lose clients, if I haven't done so already. However, like I've learned from running successful companies, sometimes bridges crossed, must be burnt.

For the web hosts still running PHP 5.2, shame on them for not manning up and helping educate users that upgrading to current PHP releases is a good thing for them. Sure, there's the short term pain of bringing software up to date. However, if you're stagnant, you can't innovate and move forward onto bigger and better things.

One idea on the upgrade nag, remove it from your client views. See https://www.google.com/search?q=remove+wordpress+upgrade+notice.

Anyways, thank you very much for sharing your point of view. I'm truly sorry for the headache. You might consider writing up an email template to provide clients to send to their web hosts containing the succinct points of the above fixes. Further, client education might be a good thing.

December 6, 2013, 16:31
User photo
Michael Cannon
Aihrus

@Shannon,

I've tried to put a little more user education into the FAQ entry. I'm open to further suggestions for improvement.

December 6, 2013, 16:43
User photo
Shannon

Thank you for the replies Michael!  I'm going to implement an email template - probably the best bet for now. It is astounding how many hosts just leave the upgrade as an option, and most clients shouldn't have to deal with it at all. 

December 9, 2013, 11:01
User photo
Brian Cormier

I called Hostgator and they upgraded me to 5.3 no questions asked. It only took 10 seconds. All is good now!

December 10, 2013, 08:18
User photo
Michael Cannon
Aihrus

@Brian, Awesome news. Glad it was quick and easy.

December 10, 2013, 10:56
User photo
Alycia Wicker

My client has upgraded to 5.4.22 and is still getting a message that she needs to upgrade her PHP. How can I fix this for her?

December 16, 2013, 17:48
User photo
Michael Cannon
Aihrus

@Alycia, How'd the client update PHP? Were any `.htaccess` changes made?

December 16, 2013, 17:56
User photo
Alycia Wicker

I think she did the one click Blue Host upgrade and I'm not sure how they do it.

December 16, 2013, 17:59
User photo
Michael Cannon
Aihrus

There's a Bluehost FAQ linked to above for PHP. You might check what's been done and then confirm the PHP version via a `phpinfo()`.

December 16, 2013, 18:03
User photo
Alycia Wicker

We checked the '.htaccess' and the correct changes were made to the file. In case anyone else has an issue, we deactivated the "W3 Cache", then updated and reactivated the Cache. Is all good now. Thanks for your prompt responses!

December 17, 2013, 08:02
User photo
Michael Cannon
Aihrus

@Alycia, thank you for the update and the final cache clearing to fix things.

December 17, 2013, 12:41
User photo
Tonia

Hello... I upgraded my php and the plugin still won't activate... any suggestions appreciated :)

December 31, 2013, 08:32
User photo
Tonia

Hello! I upgraded my php to 5.4 but the plugin still won't update. Any assistance would be appreciated. Thanks!

December 31, 2013, 08:41
User photo
Greg Stanton

I'm having the same problem as Alycia. I upgraded to PHP 5.3.20 by following the instructions at the address below (these instructions recommended 5.3 over 5.4, due to better compatibility with old scripts).  

http://blog.fluidhosting.com/2013/08/fluid-hosting-releases-php-5-4...

I confirmed the PHP version via `phpinfo()` as you suggested, and I cleared the cache in my browser (Google Chrome) from "the beginning of time."

However, I'm still gettting the error message that says "Plugin "Testimonials by Aihrus" has been deactivated as it requires PHP 5.3.0 or newer. You're running PHP 5.2.9. Once corrected, "Testimonials by Aihrus" can be activated. More information."

I'm not running a "W3 Total Cache" plugin (I am guessing this is what Alycia was referring to), so I'm not sure what to do. Any suggestions?

Thanks! 

January 13, 2014, 20:07
User photo
Greg Stanton

Never mind. I installed the WP Fastest Cache plugin and used it to delete my cache (probably a roundabout way of doing this, but I wanted the plugin anyway). I then deactivated the plugin, since my site is under development, and I figured I don't need cached copies of pages that are going to be changing. This did the trick!

January 14, 2014, 11:16
User photo
Matt Vaden

Hello guys. Anyone have any helpful hints for users that are hosted @ Godaddy?

When I initially installed the testimonials plugin my client was running PHP ver 5.2.17 (blows my mind why these hosting companies leave this type of upgrade stuff up to average users...), however since then I've upgraded to PHP ver 5.4.19 (verified via phpinfo() ).

I've also disabled caching via wp_config [ define('DISABLE_CACHE', true); ], and there aren't any caching plugins running on this site...basically still setting up this new site, so I haven't gotten that far anyway.

However, when trying to activate the plugin, I'm still receiving the error that I'm still running PHP 5.2.17, but then at the same time I get the notice in WP Admin directly under the above error that the plugin was activated! Actually, once it acted like it was activated, I was able to get into the settings screen to enter my premium license key, but when I clicked the "Save" settings button, I was informed by a WP error screen that the "Options" page could not be found". Upon further investigation, I realized that the plugin had been deactivated. When I tried to re-activate it, I once again received the error that I was still running PHP Ver 5.2.17.

Is there something else that I need to do with the Godaddy hosting account to clear cache or something? It's been approximately 30 mins since I ran the upgrade, so the changes should be fully propagated throughout my host env at this point...not to mention the phpinfo() is reporting that I'm running PHP Ver 5.4.19. What gives here man?

Your help and assistance would be greatly appreciated. Thank you and have a wonderful day!

Regards,

Matt Vaden

February 8, 2014, 07:22
User photo
Michael Cannon
Aihrus

Matt, can you please upgrade to the latest plugin versions? Then attempt activation again? Further, screenshot each step and email them to support@aihr.us if activation fails. Screenshotting each step and page load is critical as there might debug information you're not noticing that'll help us fix things quickly.

February 17, 2014, 03:42
User photo
Matt Vaden

Hey Michael! Thanks for the reply man. I'm really sorry that I never replied to my previous comment, but it does appear that I simply needed to wait awhile longer for Godaddy to propagate the PHP changes.

After waiting approximately 1 1/2 hours, I was able to finally activate the plugin. Thanks again for trying to help.

Regards,

Matt Vaden

February 18, 2014, 15:22