WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP-Table Reloaded] Cannot save changes for big table (22 posts)

  1. nilsen
    Member
    Posted 5 years ago #

    Hi Tobias!

    I got a problem when I try to save the following table:

    http://94.229.70.183/~diekurve/import-table.html

    It is a pretty big table with 91 Rows and 7 columns, maybe that causes the problem? I click on "edit" then enter any changes and on "save changes" but nothing gets saved.

    Help would be greatly appreciated. This used to work before, so I am not sure what the problem might be. I tried to use version 1.2.1 of the plug-in to see if this causes the problem, but this as well did not save the changes. Also I tried this on another installation of wordpress on another domain, which did not work as well.

    I have uploaded the table to the above address, so you can replicate the problem.

    Here is my wordpress info:

    · WP-Table Reloaded (DB): 1.3
    · WP-Table Reloaded (Script): 1.3
    · WordPress: 2.8.1
    · PHP: 5.2.9
    · mySQL (Server): 5.0.81-community
    · mySQL (Client): 5.0.81

    Thanks,
    Nils

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Posted 5 years ago #

    Hi,

    that's weird.

    I just imported your table onto my local test machine and everything works fine. I was able to make changes and everything saved fine.

    How did you get to those 91 rows/7 colums? Did you add them all together or one by one? Is there any constellation where saving works?

    What do you mean with "It used to work before?". In a previous WP-Table Reloaded version?
    Has maybe something on your server changed? Has your webhoster upgraded the server or PHP versions?

    I've heard of a this issue before, there the problem was due to a server configuration issue: The server had the "Suhosin" security add-on installed, which limits the number of variables that can be passed in a "POST" request (and thus the number of input fields, one can use on a page).
    Can you create a php file with the call phpinfo(); in it and check if the "Suhosin" add-on is installed?

    If all of this does not help, please contact me via email (my address is in the plugin file wp-table-reloaded.php in the Copyright notice).

    Regards,
    Tobias

  3. nilsen
    Member
    Posted 5 years ago #

    Hi Tobias,

    yes, the "Suhosin" security add-on is installed on the server:

    "This server is protected with the Suhosin Extension 0.9.27"
    See for yourself: http://94.229.70.183/~diekurve/phpinfo.php

    How should I proceed? Should I ask the host to change my number of variables to a bigger number or is there some other solution for this problem?

    Thanks,
    Nils

  4. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    ok, I just checked. It's the fault of the Suhosin extension.

    What it does: It limits the number of elements in an array to 64 (the value "suhosin.post.max_array_index_length" in your phpinfo.php).
    In my plugin, every row basically is such an array element. This means: With Suhosin enabled with this value, you will not be able to Edit table with more than 64 rows.

    Yes, please ask your host to set this value higher. (Actually the values "suhosin.post.max_array_index_length" or "suhosin.request.max_array_index_length" need to be set higher. Might be some others too, I don't really know.)
    There also might be a possibility to do this yourself with a .htaccess file. Unfortunately I can't help with this, as I'm not familiar with that topic (and luckily Suhosin is not installed on my server.)

    Sorry for the inconvenience, but there's nothing that I can do within the plugin to circumvent this :-(

    Best wishes!
    Tobias

  5. nilsen
    Member
    Posted 4 years ago #

    Hi Tobias,

    I have now disabled the suhosin extension using my php.ini file. Before I tried changing any value to a very high number, which did not work as well.

    When it comes to saving, I found out that I cannot have more than 35 rows x 5 columns. After that I cannot save the table anymore. When I click on "save changes", it will not show the "Settings saved" message, but go back to the list of tables page.

    I pretty much tried everything, but nothing seems to work ;-)

    Nils

  6. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    ok, this gets even more weird then.

    Can you contact me via email? My address is on http://tobias.baethge.com/imprint/.

    Thanks!
    Tobias

  7. nilsen
    Member
    Posted 4 years ago #

    Ok, the solution to this problem was the following:

    Write a php.ini file into the wp-admin folder (php.ini was in the root folder, but this did not help) and remove the following line from it:
    extension="suhosin.so"

    This deactivates the Suhosin extension, which obviously messes around with the wp-table reloaded plugin.

    Thanks again Tobias for his help and I hope somebody else saves some time, by reading this topic...

  8. nilsen
    Member
    Posted 4 years ago #

    Update:

    Both php.ini files, the one in the root folder AND the one in wp-admin need to have this Suhosin plugin removed, so delete this line:
    extension="suhosin.so"

  9. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    thanks for posting the solution:

    Just a quick note:
    The "Suhosin" extension is a security addon to PHP. It (by default) limits arrays that are passed to a PHP script to 64 elements.
    As arrays are the used data structure in WP-Table Reloaded, the data get's messed up by this, if one has more than a certain number of rows in a table (oddly, the number of rows varies).

    Tobias

  10. hammertime79
    Member
    Posted 4 years ago #

    So is it only each row that is counted as an array? Or do columns come into the equation also?

    The reason for asking is that I have a table with 6 columns x 20 rows and have an intermittent problem with the table saving.

    I've found that I can only edit one row at a time before saving. I had initially put data into around 10 rows x 6 columns then when I tried to save it failed and I lost my work.

    Can you please clarify?

    Also, what are the server security implications of removing the Suhosin extension as per the above fix?

  11. hammertime79
    Member
    Posted 4 years ago #

    Ok to add to this, I cannot save any changes to "Table Styling Options" either. I have selected the tickboxes next to "Alternating row colors:" and "Table head:" but when Update Changes is clicked the changes are not applied.

    Also, any custom CSS relating to colour doesn't appear to be working, although the CSS to align text is ok.

  12. hammertime79
    Member
    Posted 4 years ago #

    "Swap Rows" also is not working.

    WP v2.8.6 btw.

  13. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    thanks for your comments.

    From your descriptions, it really sounds that you are also hit by the "Suhosin" problem.

    I don't know exactly how it works, or what exactly it filters.
    WP-Table Reloaded works like this:
    A table is a two-dimensional array, i.e. an array of rows, and each row is again an array of cells.
    They are named in standard PHP/HTML notation, like
    cell[2][4] (which would be the third row, fifth column, as the counting is zero-based).
    Each cell has its own textfield, and all textfields' contents are send to the PHP script with a HTTP POST request.
    Before they reach the script though, the Suhosin extension seems to remove some of the variables to limit their number.
    The checkboxes basically work the same way and therefore are affected, too.

    You could try to increase the limits of Suhosin, or disable it temporarily to test.
    I don't know what other implicatations this could have on your server though. Depending on the server configuration it might be important -- or pretty useless.

    Best wishes,
    Tobias

  14. hammertime79
    Member
    Posted 4 years ago #

    Hi Tobias,

    Thanks for the reply. It was indeed the Suhosin extension causing all of my above problems, we managed a workaround and all is working again.

    Thanks for a great plugin and excellent support.

  15. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    sure, you are welcome! :-)

    And thanks for confirming that Suhosin was the reason for the trouble!

    Regards,
    Tobias

  16. larsit0
    Member
    Posted 4 years ago #

    Hi,

    I just ran into the same error. When checking the syslog I saw this event every time I tried to edit a large table:

    Mar 4 17:09:22 *servername* suhosin[6974]: ALERT - configured POST variable limit exceeded - dropped variable 'table[data][48][0]' (attacker '88.*.*.*', file '/path/to/wp-admin/tools.php')

    So obviously this is a "problem" (well, not really a problem) with suhosin. What I did was edit the file /etc/php5/apache2/conf.d/suhosin.ini (Debian Lenny). I set the values for

    suhosin.post.max_vars
    suhosin.request.max_vars

    to a higher value and now everything works as expected ;)

    Thanks for the great plugin, Tobias! ;)

  17. TobiasBg
    Member
    Posted 4 years ago #

    Hi larsit0,

    thanks a lot for this information!

    I didn't know yet, that suhosin writes something to the syslog. That log entry makes it really clear that suhosin is the issue.
    Also thanks for the hint on how to increase the limits! Not every user of the plugin will be able to do this (because they are on a shared host), but now I can at least tell them something to try (and where to look to confirm that suhosin is causing the issue).

    Thanks a lot!
    Tobias

  18. briansmom
    Member
    Posted 4 years ago #

    Tobias- this is my exact problem. I have a super large database, 3000 lines but only 1 column...it keeps taking foreverrrrrrrrrrr to load and then loses half my info etc.

    I am just knowledgeable enough to get this plugin downloaded and working, but above that I'm slow! I can't seem to find this php.ini file ? I am in my ftp and looking in wp-admin and it's not there. ?!

    if you can write specifically step by step what to do, I'd appreciate it! I LOVE this plugin and am using it for a variety of things on 2 of my websites!

    Elissa

  19. briansmom
    Member
    Posted 4 years ago #

    to update- I went to my host's site, and in the files there I "turned on" my php.ini file. The host recommends adding "uncomment" to the following lines, which I did.

    ;To increase the POST size: uncomment ; post_max_size = 20M
    ;To increase php execution time: uncomment ; max_execution_time = 300

    I added this file to my wp-admin

    I don't see the word suhosin anywhere.

    I am still having problems.

    Elissa

  20. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    unfortunately, I do not really know a whole lot about server configuration or php.ini editing, therefore I can't give exact steps to fix this, sorry.
    You will probably need to work with your webhost to fix this.
    Sorry, that I don't have better news.

    Best wishes,
    Tobias

  21. derteleberater
    Member
    Posted 4 years ago #

    Hallo Tobias

    ich hatte das selbe Problem mit den suhosin Einstellungen.
    Zum Glück bin ich bei Host Europe.
    Nach einem Anruf bei der kostenlosen Hotline (Freecall) und einer Wartezeit von unter 2 Minuten wurden die suhosin Begrenzungen problemlos nach oben gestellt.
    Die "Riesentabelle" gibt es unter http://www.derteleberater.de/preisvergleiche/dsl-flatrates

    Danke für diese tolle Plugin.

    Liebe Grüße

    Michael

  22. TobiasBg
    Member
    Posted 4 years ago #

    Hi Michael,

    danke für dein Feedback.
    Schön zu hören, dass es bei dir so problemlos lief! Ich wünschte, alle Hoster wären so :-)

    Gruß
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Topic