Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Andy Schmidt

    (@andy-schmidt)

    Thanks for taking the time and responding.

    So how do I go about submitting this documentation error?

    PS: NAUI? PADI? SSI? BSAC? …

    @dmishra – I don’t know how you ended up on THIS thread. But if you have a question that is about “edwiser”, “moodle” etc, then I suggest you contact THEIR support resources because THERE will be experienced users who have succeeded at what your are attempting.

    Or, you could start a NEW topic here at the WordPress support site, but with a telling subject line that has a chance to be noticed by other users of “edwiser” and “moodle”.

    THIS thread is about a very specific error message in WordPress. Hijacking it for mainly non-related questions will prevent your question from being noticed by competent others.

    @brimfulof @stevenmartis – Gents, thanks for confirming this was behind your troubles. According to the source code the table name mismatch seems the most likely scenario.

    I do realize, others have not been as lucky – but I haven’t been able to get a backup to one of their tables to track down how their situation differs.

    What did you CHANGE on the site/server/… before it stopped working? Can you undo that change?

    Did you check the individual records in the wp_options table?

    Dear Geir,

    If you are intimate with PHP and MySQL, you could just invest the time and step through the code and see where ELSE that message is raised. I had found the table name mismatch as being the cause when I had tracked down the problem in the WordPress code last time, thus had no reason to look beyond that.

    Otherwise, I hope that someone will be able to point you to paid WordPress or third-party service option.

    If everything else fails, you could take a MySQL backup of your WordPress database. I could attempt to restore it on one of my test systems and see if I can reproduce your wp-admin problem on my end without needing any of your plug-ins, uploads, media files etc. However,… I am tied down with really tight commitments for weeks to come – so I’m desperately hoping that someone else will be able to step up.

    @ericstaytrue, glad these hints helped you. It’s an unexpected dependency that trips up people all the time.
    And let me state my apologies to those who still couldn’t make it work and were hoping for one-on-one assistance. Unfortunately, the only way to diagnose this further would be by cross-checking the various references in the live MySQL tables of your system.

    geirosset: In cases like this, you have to be very exact with you information because we can’t guess if you are omitting things for convenience or if they are truly missing, thus wrong, in your system.

    What does your your wp-config actually state as the prefix parameter? Because if $table_prefix truly is “syd_” instead of “syd_wp_” then the table names would be “syd_user_roles”, not “syd_wp_user_roles” etc.

    Once you CORRECTLY match up your table prefixes with the wp-config settings, then the NEXT step is to bring this in line with the information in your wp_usermeta table and in your wp_options (or whatever the correct table names are in your system).

    THOSE two tables have records that normally would start with “wp_” (the default table prefix) – so those rows would have to be changed to match whatever correct value to match your ACTUAL table names AND your $table_prefix.

    PS: Also, you didn’t explain when this started breaking? What is that you changed/installed etc. that caused your site to fail for the first time? Why not undo it?

    • This reply was modified 9 years, 3 months ago by Andy Schmidt.

    Eric, this is due to a bug in the Windows implementation of native PHP “mail()” function. It works in previous PHP versions, but was introduced with PHP 7. A simple on-line test will demonstrate that behavior:

    <?php
    $result = mail( “[email protected]”, “test subject”, “test content”, “From: [email protected]\r\n” );
    ?>

    I opened a bug report with PHP so that this gets fixed. Kindly report that you were experiencing the same problem:
    https://bugs.php.net/bug.php?id=74005

    Although not likely the problem for THIS user, this particular message will occur when someone “consolidates” various WordPress projects into a single MySQL schema, and in the process CHANGES the table prefix in the wp-config and renames the tables to match the new table prefix (e.g. from “wp_…” to “mywp_…”.

    There is a very unexpected dependency of the table prefix in a handful of records in the wp_usermeta table and one in the wp_options. Fortunately, it’s very easy to fix. Just look for a key starting with “wp_” (the default table prefix) and then change those rows to the keys matching the new table prefix in your wp-config, e.g. “mywp_”.

    Basically, your “admin” user has “login” permission, but those records in wp_usermeta and wp_options are the ones that give that logged-in user permission to manipulate the data stored in a particular set of tables. It’s likely a carry-over from the MultiSite implementation.

    Andy Schmidt

    (@andy-schmidt)

    Yes, with WP 3.9.1, the plug-in causes the blog to display just a white screen (the WP stupidity that is supposed to indicate to the end user, among a gazillion other things) “Problem instantiating plug-ins”.

    I suppose no one at WP has ever heard of try/catch blocks?

    Anyway, this plug-in is attempting to load:
    /wp-includes/js/tinymce/plugins/spellchecker/…
    which does not/no longer exists.

    After hacking the database and disabling this plug-in, WP comes back online. Alternatively, you could remove the plugin’s sub-folder from wp-content/plugins/.

    This plug-in should be removed from the WP site (or updated to work with 3.9.1).

    Takayuki Miyoshi, thank you for contributing your plug-in. Do you have plans to include the provided patch in your official code to address the current portability problem / operating system dependence?

    Contact Form 7 internally uses anothe plug-in “really simple captcha”. There is a well known problem with portability / operating system dependence.

    The problem is documented here and a functional patch IS available.

    It would be good to incorporate that patch in Contact Form 7.

    The reason for the tens of thousands of files is documented here – and patch is available.

    Any plans to make this patch part of the official code, as it would make the plug-in platform independent!

    As has been reported by several users, the current code can eventually result in a “denial of service” scenario when tens of thousands of files start accumulating within a few weeks – and the server starts consuming extensive amount of time every 60 seconds, attempting to iterate through and to (always unsuccessfully) delete those tens of thousands of files individually.

    Assuming that the default file_modes were chosen for a good reason, then (at minimum) a chmod to 0777 is needed prior to any unlink for it to succeed. (Ideally, appropriate error-handling would also be addeded for unlink returning “false”, to report that the necessary cleanup is failing!)

    The underlying problems are:

    • The class defaults “$this->file_mode = 0444” and “$this->answer_file_mode = 0440” result in a chmod that explicitly restricts access to these files for nothing but “reading”.
    • The “remove()” and “cleanup()” methods attempt to unlink (delete) those files – even though had been restricted to “read” access by the class default. Depending on the implementation of the underlying operating system, deleting a file that is restricted to “read-only” will fail.
    • The “cleanup()” method uses @unlink – so it suppresses any PHP error logging that might have alerted to the problem, AND, it does not handle the “false” return code from the unlink – and thus ignores that condition that cleanup never succeeds.

    The result can be a “denial of service” problem when tens of thousands of files start accumulating within a few weeks – and the server starts consuming extensive amount of time every 60 seconds, attempting to iterate through (and always unsuccessfully) to delete those tens of thousands of individual files.

    Assuming that the default file_modes were chosen for a good reason, then (at minimum) a chmod to 0777 is needed prior to any unlink for it to succeed. Ideally, appropriate error-handling would also be addeded, rather that ignoring them.

    A functional patch has been contributed – hopefully it will be implemented soon as this has been a recurring report by several users.

Viewing 15 replies - 1 through 15 (of 15 total)