• Hello,
    I installed the plugin but since it doesnt do what I wanted I havent used it so I had no tables but it was still activated.
    I created a shortcode for my site that contains a sql query. I forgot a quote in my query and when I loaded the page my site went blank and crashed. I contacted my hosting support and they had to work for a while to get it back because they couldnt find the cause until they realized it came from your plugin because of that error:

    write(1, ”
    \nParse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home/xxx/public_html/xxx/wp-content/plugins/wptables/admin/partials/view-wptables-list-tables.php on line 82
    \n”, 225) = 225

    They actually had to delete the plugin files to relaunch the site.
    How come the plugin was called by a function that has nothing to do with it?

    Also, I tried to find a way to contact you directly but couldnt find anything anywhere so I had to post that in a public place here.

    Best regards,

    C.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ian Sadovy

    (@iansadovy)

    Hello Cedric,

    Thank you for reporting and sorry for the troubles.
    By inspecting the view-wptables-list-tables.php file I have found out that it uses PHP 5.4 syntax for creating an array – https://take.ms/gPgwn . Since all the classes are declared when the plugin is activated, it will throw the syntax error if PHP < 5.4. Still, I cannot understand how it can be connected to the shortcode.

    Sorry again.

    Regards,
    Ian

    Thread Starter cedric92

    (@cedric92)

    Hello Ian,

    Thanks for getting back to me quickly.
    My server runs PHP version 5.6.23 for information.

    I knew my query was at fault when the site crashed but I was surprised to hear your plugin was incriminated. I installed it and created a couple tables with sql queries but since I couldnt do what I wanted (I needed very complex formatting that could only be handled by a specific function), I deleted the tables but left the plugin activated. So yes, it doesnt make sense that it was called when I triggered my shortcode.

    You dont have to apologize, you are offering a good service for free and in those cases mistakes can happen. That’s why I tried to contact you in private at first because I didnt want to post that in a public place because it might hurt your plugin’s reputation when it may be a problem that is specific to my setup. But when people see how fast you replied and that you cared I think they’ll forget about it!

    Best regards,

    Cedric

    Hi Ian,
    I’m receiving the same error as Cedric92 as a result of simply updating to ver 1.39. My website was inaccessible until I renamed the plugin folder via FTP, which forced deactivation.

    I suspect my hosting provider is running an old version of PHP, but would it be safer if the update process left the plugin deactivated if it detected an incompatible version of PHP?

    I’ve recovered the situation by restoring ver 1.29 from a backup. Is it possible to make the latest version backward compatible with PHP < 5.4, or do I have to get my hosting provider to upgrade PHP?

    Best regards,
    Geoff

    UPDATE: It was easier than I thought to update the PHP version in my hosting site. All is well again.

    • This reply was modified 7 years, 1 month ago by ghaynes2014.
    Plugin Author Ian Sadovy

    (@iansadovy)

    Hello @ghaynes2014,

    Thank you for writing.
    I will think what can I do for safer updates. But it seems to be only the issue when updating from 1.2 to 1.3, because in 1.3 I have added a metadata for min required PHP version, so WordPress shows generic alert in case of incompatible PHP version when installing the plugin.

    All in all, I am glad that you have managed to update PHP and resolve the issue so fast.

    Feel free to let me know if you have any other questions.

    Regards,
    Ian

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin crashed my site even though I have no tables’ is closed to new replies.