Q&A
Mr. Pickles the AdPlugg Pug

Error after installation

+1
1
-1

I keep getting an error message after installing the pluggin:

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/content/50/4323350/html/wp/wp-content/plugins/adplugg/includes/frontend/class-adplugg-facebook-instant-articles.php on line 12



Answers

+1
1
-1

Update - 2018-03-15

As mentioned below, this error was caused by running the AdPlugg WordPress Ad Plugin on PHP 5.2. Previously, you needed to be on PHP 5.3 or higher.  We've now updated the plugin (as of v1.8.0) to be able to be run on PHP 5.2.4 and higher. So while PHP 5.2.4 isn't recommended, if you are on version 1.8.0 or higher of the AdPlugg plugin, PHP 5.2.4 (and up) should work.

We however highly recommend PHP 7 or higher.

================

Sorry about the error. That line is a PHP 'use' statement.  The 'use' statement was added in php 5.3 (which came out June 30th, 2009).  I'm guessing you must be on PHP version 5.2.x or less.  PHP 5.2 was end-of-lifed on January 6, 2011 (about 6 years ago).  

We've seen this error a couple of times before and have considered trying to add support for PHP 5.2.x. but at this point, AdPlugg only support PHP 5.3 or higher.

WordPress recommends PHP 7 but they state that WordPress should work with 5.2.4 or higher (though it's not recommended). This is part of the reason why we're considering trying to get AdPlugg to work with PHP 5.2.4 as well.

Is there any way that you can upgrade your version of PHP?  If you contact your host, they can most likely upgrade you. If you can't, please let me know and we can maybe figure something else out.

Thanks,

Collin