Support » Plugin: Widget Settings Importer/Exporter » cannot activate

  • Resolved 35paulm


    Getting error upon activation (downloaded plugin directly via wp-admin):

    Parse error: syntax error, unexpected T_FUNCTION in /home/lbxperts/public_html/demos/gym/wp-content/plugins/widget-settings-importexport/widget-data.php on line 49

    I really need this plugin so I can import data from a similar site that I need to replicate. Please let me know what is causing this.

    Please let me know if you need more info.

    Thanks in advance.

Viewing 15 replies - 1 through 15 (of 18 total)
  • I am having the same issue except I cannot do anything now – after I did the update this morning it “Plugin updated successfully” I went to return to plugin and found I can’t go anywhere. Any action results in an error reading “Parse error: syntax error, unexpected T_FUNCTION in /home/spokenw/public_html/wp-content/plugins/widget-settings-importexport/widget-data.php on line 49” – I am in the middle of develping this site. How do I correct this? I don’t know PHP yet.


    This is follow-up to my previous post. I went into the widget-data.php code and looked at line 49. The summary of the error highlights lines 49 thru 56 and states “No CSS Properties apply to current selection. Please select a styled element to see which CSS properties apply.” – I just FTP’d into my server and deleted the plugin folders for import/export and the website and admin console are back up. Please advise when the error is corrected (and which version is safe) and I will re-install the plugins.


    I did some more “googling” after submitting this. Some similar errors were triggered by old php versions. I am using 5.2, but I can upgrade if that is the case. I just don’t want to make that change until I know that’s what the problem is. I hope we get a response soon.

    Thanks in advance!

    I looked at line 49, and it does indeed look like our friends are using a fancy new “enclosure” type statement, which is state-of-the-art PHP. I have PHP 5.2, and that’s probably why I got the error. I would offer a coding solution, but this is a little over my head, and it’s not urgent for me to tear it apart. I just renamed the plugin folder so I could get back into my site.

    I’m also checking with my host to see if they’ll bump me up to 5.3.

    This is a very handy and free plugin, so I’m going to have some patience. For those with urgency (or just no patience), there’s always BackupBuddy. πŸ™‚

    thanks for the tip on backup buddy – it just doesn’t help me in this situation as I am installing demo data as it’s provided from the theme developer, but thanks anyway.

    I guess I’m going to request a bump to 5.3.2 (I think). anyway, please post back if you are successful with the upgrade. I will do the same. πŸ™‚

    I just got updated by my host to 5.3, and boom, that fixed it! So I can confirm pretty solidly that one needs that version of PHP to make Import/Export 1.1 work.

    Kudos to my host, Idologic, for pretty incredible speed!

    I look forward to hearing the developer’s thoughts on this. Maybe if I get some spare time, I’ll try to work out the old version myself.

    I am on chat with hostgator right now and they are getting me bumped up too. Thanks for the info! Shame they don’t mention that as a requirement on their page(s). Thanks Flamenco!

    35, glad to help.
    I’m glad hostgator is justifying the compliments I was making about them just today.

    You know, I think a lot of coders just get excited with a new command that they learn, and maybe don’t even check which PHP version is needed. I know I don’t check to make sure every CSS3 command I use works in Opera from 3 years ago. Mostly an innocent thing, is my guess.

    I’ll say that this super plugin has saved me hours of grief: I frequently move sites that have zillions of widgets. Widgets can’t be exported as easily as other data, because they use “blob” fields. Yes, I’m not joking. πŸ™‚

    This plugin has been pretty helpful so far, but yesterday (Jan-23rd, 2013) update made my site white.

    So with no access to siteΓ€’s admin panel, I was able to recover it by setting all the plugins as inactive in cpanel phpAdmin. Just wanted to warn everybody with this post. Hope you could fix this update.

    Flamenco, I wanted to post one more time to validate your experience. I did get my upgrade to php 5.3 and I was able to flawlessly activate the plugin. Cheers to you and thanks for your input while we figured this out. πŸ˜‰

    Inafin, just a tip that I have used. if I have a plugin that crashed everything, I simply rename my plugins folder to something like plugins_ or plugins-old, then create a new plugins folder. That will almost always bring your site back up, then you can copy and paste plugins back into the new plugins folder one at a time until you figure out which one is messing your site up. Just maybe a marginally easier thing then going into the database and deactivating them . . . but I thought I would share.

    Another quick report from the field. Upgrade to PHP 5.3 can cause other issues. This is known, but not necessarily by non-geeks. πŸ™‚

    I host a bunch of sites, and the uber-upgrade to 5.3 did bork one of them, pumping out error messages all over. I wrote a PHP.INI to hide the errors, so things are running OK. My error logs are showing slight incompatibilities with some other modules. I notified my host, and the tech fixed that up, so now all is clean.

    So I suppose my point is that I hope our widget friends will offer some ideas… an upgrade to 5.3 may be tricky or not possible in some cases. It’s kind of too bad that this thread is marked solved – I wonder if they’ll look at it! πŸ™‚

    Hostgator upgraded my php to 5.3 and it doesn’t work for me. Damn this stuff is starting to really piss me off. Sorry, I have read so many blogs about this, tried so many tricks to get it to work. Nothing is working! πŸ™

    well me trying to find solution to this problem with no luck

    i have php 5.2.17 in server

    the error is in line 49

    add_action( 'admin_enqueue_scripts', function($hook) use ($export_page, $import_page)

    we need to use another approch so that old php like ours can work it out

    and it is all for

    wp_enqueue_style( 'widget_data', plugins_url( '/widget-data.css', __FILE__ ) );
    			wp_enqueue_script( 'widget_data', plugins_url( '/widget-data.js', __FILE__ ), array( 'jquery', 'wp-ajax-response' ) );
    			wp_localize_script( 'widget_data', 'widgets_url', get_admin_url( false, 'widgets.php' ) );


    Plugin Author Kevin Langley Jr.


    The update now requires PHP 5.3 as PHP 5.4.11 is now the latest stable version according to I apologize that many of you are having errors with either just having a lower PHP version or just having other plugins / theme code that is throwing errors within an upgraded PHP 5.3 install. PHP 5.3 was released in June 2009 so this is something that has been throughly tested and is ready for production use by most standards.

    If you have these errors or if you cannot upgrade to 5.3 I highly suggest you download an archived version, the latest that supports 5.2 is version 1.0. I will not be supporting 5.2 in any manner going forward with my plugins. I will be amending the README and other documents for the plugin to reflect the requirement of PHP 5.3.

    With that said, it seems like the majority of the issues within this thread have been solved with the upgrade to PHP 5.3.

    If anyone has any further issues other than the PHP 5.3 issue, please open a new thread with a description of your issue.

    @flamenco, any issues that occur from a PHP 5.3 upgrade would be related to bad code within either plugins or themes. So with that said, I have this plugin working with no errors within a PHP 5.3 environment with quality, error free, code behind my theme and plugins being run.

    Thanks very much for weighing in and providing information. (Not every plugin author does this). Your stance is understandable. I suppose one workaround would be to have that old version somewhere on a website, or maybe use github for that, but no doubt you’re quite busy.

    As a byproduct of this, I am very good at handling 5.3 upgrade issues. πŸ™‚ In my case, I am probably the first person on my box to have 5.3, so kinks needed to be worked out. I think that most users being upgraded to 5.3 will have a smoother time.

    Thanks again for your helpful plugin!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘cannot activate’ is closed to new replies.