Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Parse error: syntax error, unexpected '
- This topic has 5 replies, 2 voices, and was last updated 7 years, 3 months ago by
Ernest Marcinko.
-
AuthorPosts
-
March 4, 2019 at 1:00 am #21363
msteffgen
ParticipantWe’ve purchased your Ajax Search Pro plugin however when we installed the pro version it took down our site and gave us this error:
Parse error: syntax error, unexpected ‘[‘ in /var/www/vhosts/whitingcorp.com/httpdocs/wp-content/plugins/ajax-search-pro.bak/includes/classes/etc/class-asp_helpers.php on line 30
What is odd is that with the lite version it works fine, but as soon as we activate the Pro version it takes the site down along with he admin backend.
March 4, 2019 at 11:34 am #21369Ernest Marcinko
KeymasterHi,
There is something not okay with that installation path, that within the error message. The plugin path in the message is ‘/ajax-search-pro.bak/’, while it should be ‘/ajax-search-pro/’. Please make sure to disable, and remove the plugin via the plugin editor screen, as well as check if there is any directory with the name ‘ajax-search-pro’ within the ‘wp-content/plugins/’ folder and remove that as well.
Either the extraction process failed, or there might be an archivation system active on your site, that may have made a back-up copy of the folder for some reason.
Once everything is removed, try uploading and installing the plugin again via the plugin manager. It should work.March 6, 2019 at 2:31 am #21415msteffgen
ParticipantThanks for the quick reply. I had put the .bak on that directory when trying to do some troubleshooting when the pro plugin took down the site. So I went in and removed that pro directory all together and uploaded and installed the pro plugin again through the plugin manager and am still getting an error. What’s odd is the lite version is working just fine, it’s only when I install the pro plugin it takes the entire site down. Here is that error:
Parse error: syntax error, unexpected ‘[‘ in /var/www/vhosts/whitingcorp.com/httpdocs/wp-content/plugins/ajax-search-pro/includes/classes/etc/class-asp_helpers.php on line 30
March 6, 2019 at 9:20 am #21421Ernest Marcinko
KeymasterHi,
Thank you for the details, I may have found something there. I googled a bit, and found that on very rare cases, there is a certain PHP directive activated, which may report a fatal error, when declaring arrays as ‘[]’ instead of ‘array()’. There is very little information about this, but I am pretty sure, that this is the issue here.
To resolve it, you will have to replace one of the plugin file contents. Please let me know if you need help with that. Instructions:
1. Open up the wp-content/plugins/ajax-search-pro/includes/classes/etc/class-asp_helpers.php file on your server
2. Replace it’s contents with this
3. Save, and now try to activate the pluginI’m 99% positive this is going to resolve the problem. In that case, I will make sure to include this as a permanent fix in the upcoming release.
March 6, 2019 at 5:13 pm #21449msteffgen
ParticipantErnest, that worked perfectly! Thanks for helping out so quickly…much appreciated. Great plugin too, cheers!
March 7, 2019 at 9:18 am #21467Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.