Parse error: syntax error, unexpected '

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

 
Keymaster
2 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21363

    Participant

    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.

    #21369

    Hi,

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21415

    Participant

    Thanks 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

    #21421

    Hi,

    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 plugin

    I’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 :)


    #21449

    Participant

    Ernest, that worked perfectly! Thanks for helping out so quickly…much appreciated. Great plugin too, cheers!

    #21467
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.