Support » Plugin: Store Locator Plus for WordPress » fatal error

  • Resolved David

    (@fenceutah)


    I just updated Store Locator Plus and received this.

    Parse error: syntax error, unexpected T_FUNCTION in /home4/fencesel/public_html/california/wp-content/plugins/store-locator-le/include/storelocatorplus-ui_class.php on line 327

    I’ve looked at the PHP and cannot find the error in it. Help?

    http://wordpress.org/extend/plugins/store-locator-le/

Viewing 15 replies - 1 through 15 (of 24 total)
  • Same error here.

    Same error as well.

    Same problem as above. Site is down, any resolution?

    Giving this all of 2 minutes of thought, I’m not sure of why this

    $this->parent->helper->setData(
                            'theme',
                            function($_this) { return  $_this->parent->settings->get_item('theme'); },
                            $this
                            );

    isn’t this:

    $this->parent->helper->setData(
                            'theme',
                            $_this->parent->settings->get_item('theme'),
                            $this
                            );

    Again, haven’t looked at the code and certainly don’t understand it, but maybe this is the issue?

    Also, for what it’s worth, if your site is down but you still have FTP access, you can move the /wp-content/plugins/store-locator-le/ directory out from under /wp-content/plugins/ and your still come back to life again, sans the Store Locator plugin.

    Same parse error here!

    Plugin Author Store Locator Plus

    (@charlestonsw)

    What version of PHP are you using? The latest version of SLP is using anonymous functions, which I may be able to change but will take a new release.

    I believe you need PHP 5.3 or higher.

    Well looks like my host is using PHP Version 5.2.17 on my server.
    Still not sure why you’d need that anonymous function, if it’s just returning the string. Again though, I haven’t looked at or taken the time to understand the code.

    Plugin Author Store Locator Plus

    (@charlestonsw)

    Anyone that has a server with this issue is likely running PHP < 5.3. I have an update for SLP 3.7.7 that MIGHT fix the problem, but apparently I do not have PHP 5.2 or earlier on my test boxes (I keep them updated for security issues).

    If someone has a system with FTP and web admin access and wants to make it available so I can load/test SLP 3.7.7, please contact me. I need FTP in case the patch does NOT fix the issue so I can remove the offending code and bring the site back online.

    Contact me at http://www.charlestonsw.com/mindset/contact-us/. Keep in mind I am in the USA on EST (GMT-5) and will not be online for more than a couple of hours tonight.

    Plugin Author Store Locator Plus

    (@charlestonsw)

    @akostrubiak, it is doing a lot more than you think. Part of the new functionality it making sure settings are stored in RAM and checked BEFORE simply re-reading the database. It has cut the data I/O calls by nearly a dozen per page load with the few places it has been implemented. Eventually the entire plugin will be re-written to use this methodology and the ONLY way it will work in some areas of the code is via anonymous functions.

    For now I can get by with a short circuit to avoid the anon function, but eventually there are some features that will absolutely require them. Someday (not today) the plugin requirement will change from PHP 5.1 to PHP 5.3 as the minimum.

    I can confirm that I just upgraded from PHP 5.2 to 5.3, and the plugin worked again.

    Plugin Author Store Locator Plus

    (@charlestonsw)

    I just put SLP 3.7.7 up on the CSA website for the Pro Pack users, however I have not tested this patch yet. Proceed with caution.

    For users with the Pro Pack…

    Go to http://www.charlestonsw.com and login to your account.

    You should be able to get to your account info where it will show “downloads” at the top of the page.

    Download the store-locator-le.zip file (should have today’s date with a timestamp of 23:XX EST).

    Check that the readme.txt says version 3.7 near the top.

    You can then go to your site, deactivate SLP (probably already have), delete it (probably did that too) and then go to Plugins / Add New and upload the new .zip file.

    Please make sure you have FTP or command line access so you can remove the plugin directory if this patch fails.

    If it works please let us know so I can push the formal SLP 3.7.7 release through the WordPress plugin directory.

    Grrrr… this is not the first time PHP version differences has bitten me in the butt. Unfortunately NONE of the modern web development platforms I use come with anything but PHP 5.3 or higher (some even PHP 5.4) now so setting up a PHP 5.2 development system is a big chore.

    Thank you for your response I received via email. I was able to change my PHP to 5.3 and your upgrade now works. Thanks for your hard work!

    Plugin Author Store Locator Plus

    (@charlestonsw)

    @lanalee – good to know that 5.3 solves the issue, but not everyone can easily upgrade their version of PHP.

    I’m still waiting for someone to report back on SLP 3.7.7 on their PHP 5.2 system. I have one person officially testing this for me on their setup now. Hopefully I’ll have word before I sign off for the night and can get an official SLP 3.7.7 release out. Not worrying about broken SLP websites would be a nice present to myself tomorrow (actually today I guess since it is officially “tomorrow” now in Charleston SC).

    Plugin Author Store Locator Plus

    (@charlestonsw)

    I pushed 3.7.7 out tonight, hoping it fixes the problem even though I cannot test. You can get it right here on the WordPress Plugin directory.

    Can anyone running PHP 5.2 please confirm that this new patch works (or is still broken)?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘fatal error’ is closed to new replies.