Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Parse error: syntax error, unexpected '
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 2 months ago.
- AuthorPosts
- March 4, 2019 at 1:00 am #21363
We’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 #21369Hi,
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.
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 6, 2019 at 2:31 am #21415Thanks 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 #21421Hi,
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.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 6, 2019 at 5:13 pm #21449Ernest, that worked perfectly! Thanks for helping out so quickly…much appreciated. Great plugin too, cheers!
March 7, 2019 at 9:18 am #21467You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.