WordPress.org

Ready to get started?Download WordPress

Forums

Store Locator Plus
[resolved] fatal error (25 posts)

  1. David
    Member
    Posted 1 year ago #

    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/

  2. itootrdotcom
    Member
    Posted 1 year ago #

    Same error here.

  3. nickbell271
    Member
    Posted 1 year ago #

    Same error as well.

  4. sjwattok
    Member
    Posted 1 year ago #

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

  5. akostrubiak
    Member
    Posted 1 year ago #

    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?

  6. akostrubiak
    Member
    Posted 1 year ago #

    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.

  7. LanaLee
    Member
    Posted 1 year ago #

    Same parse error here!

  8. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. akostrubiak
    Member
    Posted 1 year ago #

    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.

  10. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  11. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  12. nickbell271
    Member
    Posted 1 year ago #

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

  13. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  14. LanaLee
    Member
    Posted 1 year ago #

    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!

  15. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @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).

  16. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    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)?

  17. David
    Member
    Posted 1 year ago #

    I'm running 5.2, updated the plug in and it's working. Thanks for all your work!

  18. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    Awesome! Glad to hear it. This is the 3rd report the 3.7.7 did the trick. Sounds like the new release is "good to go".

  19. sjwattok
    Member
    Posted 1 year ago #

    I am glad to hear that the new release is "good to go", but I am disappointed that the developer released an upgrade without testing on PHP 5.2. Your plugin requirements state:
    PHP 5.2.4+ (same as WordPress 3.3.2)
    WordPress: 3.3.2+

    As such, all releases should be tested for PHP 5.2.4, especially since there are major changes between PHP 5.2 and 5.3.

  20. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @sjwattok - I test on the development system and test system I have setup. I even run a set of automated test with Selenium which is FAR MORE than 90% of the plugins out there. I already spend 8 hours testing every release and for a free plugin I feel that is more than enough.

    I've asked time & time again for beta testers. ONE person is on the list and is NOT on PHP 5.2 and did not even test the latest release.

    The ONLY way the plugin will ever be what I consider "well tested" is if the community gets involved, gets the beta release, and tests it fully. As a single person doing ALL of the development, documentation, and support there are simply not enough hours in the day. Especially considering how few people donate ($35 in over 2 years) or purchase premium add-ons.

    Releases go out about once/week and take a full day to test thoroughly. If you wish to donate your time and help test Store Locator Plus release, I'm glad to have you.

  21. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @sjwattok - Also, if you wonder why my development system is on 5.3 and NOT 5.2.4 it is because I have to do other projects to feed my family. 5.2.X has numerous memory leaks and even a SEGFAULT that produces unstable and far inferior results on those other projects.

    Some of those memory leaks creep up in WordPress plugins more often than you realize. Ever wonder why some WordPress sites run out of memory when certain plugins are installed? Read the PHP 5.3.X release notes and you will find DOZENS of memory leaks and security issues being addressed.

    Yes, WordPress requires 5.2.4 and they don't like to change the requirement if they can help it. Makes sense. PHP does some AWFUL things when they release new versions (talk about testing releases & backwards compatibility issues!), but anyone that CAN run PHP 5.3.X should do so. Just make sure you test first so you know none of your plugins break.

    BTW, that is another good point. You cannot simply test 5.2.4. For a full test you must test 5.2.X and 5.3.X. Since I only have enough time to do ONE I choose 5.3 for the reasons stated previously.

    No, not a perfect solution but software is NEVER perfect. Just look at the 300,000+ bugs already reported in Windows 8, and they have a MUCH bigger test team and much longer release cycle. Or closer to home... WordPress 3.5 and their known bug/issues list.

    I hope this sheds some light on what I do and why.

    - L

  22. sjwattok
    Member
    Posted 1 year ago #

    FYI, my company has purchased pro-pack and you can be sure I will be testing all plugin upgrades (not just store locator) prior to promoting them to my production website. For the time being my test and prodution environments are 5.2.5 and 5.2.13 respectively. I would be glad to get beta releases for testing on these platforms.

  23. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    Here is the beta release sign-up link:
    http://eepurl.com/pqZrz

    I was sending emails with the beta releases attached until I realized "that one guy" (literally) was not even opening 90% of these and I never received any test issues even after a notable bug in one release got by me.

  24. sjwattok
    Member
    Posted 1 year ago #

    If you are wondering why my production system is 5.2.13... This is my first WordPress site, I have other sites on this server utilizing other php software that have not all been tested and verified on PHP 5.3

  25. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @sjwattok - I get it. Not everyone can upgrade to 5.3.

    I also understand why some people would think "requirement is 5.2.4, why doesn't he test on that" so I felt an explanation is in order. Things are never as simple or cut & dried as people first imagine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags