• I get these errors / warnings / responses when executing a Search and Replace.
    A preview works.
    It doesn’t do the replacement.

    I have used the plugin for two other clients and it has worked great, thank you! I will get them to send a donation.
    ==========
    Response to Replace: I checked and the files seem to be in the right place. I don’t see a safe-search-replace-data folder in any of the clients’ files, even the ones that work.
    —-

    /public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php

    Warning: file_put_contents(/home/zzz/public_html/wp-content/plugins/safe-search-replace/../safe-search-replace-data/1380056337.undo) [function.file-put-contents]: failed to open stream: No such file or directory in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 54

    Warning: file_put_contents(/home/zzz/public_html/wp-content/plugins/safe-search-replace/../safe-search-replace-data/1380056337) [function.file-put-contents]: failed to open stream: No such file or directory in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 54

    Successfully created task with undo option

    Fatal error: Class ‘mysqli’ not found in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/TaskExecuter.php on line 6

    =======
    “Undo Recent Tasks”

    Undo Recent Tasks

    Warning: scandir(/home/zzz/public_html/wp-content/plugins/safe-search-replace/../safe-search-replace-data) [function.scandir]: failed to open dir: No such file or directory in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 73

    Warning: scandir() [function.scandir]: (errno 2): No such file or directory in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 73

    Warning: rsort() expects parameter 1 to be array, boolean given in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 74

    Warning: Invalid argument supplied for foreach() in /home/zzz/public_html/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 76
    There are no recent tasks

    https://www.ads-software.com/plugins/safe-search-replace/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jamespro

    (@jamespro)

    Also, I am using a WordPress Network for this site.

    I plan to change back to single site version after this version gets launched.

    Thread Starter jamespro

    (@jamespro)

    Here is more info from a DIFFERENT WEBSITE, where I just tried it for testing, that has worked in the past.

    This one DID work. But still got errors, and no undo option.

    NOTE: NOT a Network/Multisite (unlike the first example with the problem)

    =============
    Replace:

    Found 21 results

    Warning: file_put_contents(/home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/../safe-search-replace-data/1380058011.undo) [function.file-put-contents]: failed to open stream: No such file or directory in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 54

    Warning: file_put_contents(/home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/../safe-search-replace-data/1380058011) [function.file-put-contents]: failed to open stream: No such file or directory in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 54
    Successfully created task with undo option

    Successfully executed task

    =========
    AND

    Undo Recent Tasks

    Warning: scandir(/home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/../safe-search-replace-data) [function.scandir]: failed to open dir: No such file or directory in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 77

    Warning: scandir() [function.scandir]: (errno 2): No such file or directory in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 77

    Warning: rsort() expects parameter 1 to be array, boolean given in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 78

    Warning: Invalid argument supplied for foreach() in /home3/SITE2/public_html/dev/wp/wp-content/plugins/safe-search-replace/Ssr/Task.php on line 80

    There are no recent tasks

    FIXED

    Go to plugins/safe-search-replace/Ssr.php

    Change line 11 from…

    define ('SSR_PATH_DATA', dirname(__FILE__).'/../safe-search-replace-data');

    to…

    define ('SSR_PATH_DATA', dirname(dirname(__FILE__)).'/safe-search-replace-data');

    The issue is that the ../ isn’t an accepted method of directory traversal, using dirname() twice is much more reliable way of fetching the parent directory.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Safe Search Replace (SSR) – Not replacing – warnings from PHP’ is closed to new replies.