Support » Plugin: WP OPcache » Turning on prepcompile php option causes error

  • Resolved cim

    (@cim)


    Could just be my setup, it does download the plugin, and this shows:

    
    Installation failed: {"success":true,"data":{"install":"plugin","slug":"health-check","pluginName":"Health Check & Troubleshooting","activateUrl":"https:\/\/example.com\/wp-admin\/plugins.php?_wpnonce=f708c7b209&action=activate&plugin=health-check\/health-check.php"}}
    
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author nierdz

    (@mnttech)

    Hey, sorry, just saw this thread

    Did you find any solution to this problem ?
    If not, could you post logs related to this please ? (on your server)

    I have the same problem too.

    Plugin Author nierdz

    (@mnttech)

    Could you paste some logs from your http server (probably nginx or apache) related to this error please ?
    Or add anything to help ?
    I can’t help I have no clue on what’s going on.

    EDIT: Do you have a plugin called health check ?

    • This reply was modified 1 year, 2 months ago by nierdz.

    Hi, sorry. Thought what I posted might give a clue. Turning on WP_DEBUG gave some insight. The plugin is downloaded fine but still throws an error.

    Installation failed: 
    {
      "success": true,
      "data": {
        "install": "plugin",
        "slug": "contact-form-7",
        "pluginName": "Contact Form 7",
        "debug": [
          "Downloading installation package from https:\\/\\/downloads.wordpress.org\\/plugin\\/contact-form-7.5.1.4.zip…",
          "The authenticity of contact-form-7.5.1.4.zip could not be verified as no signature was found.",
          "Unpacking the package…",
          "Installing the plugin…",
          "Plugin installed successfully."
        ],
        "activateUrl": "https:\\/\\/domain.tld\\/wp-admin\\/plugins.php?_wpnonce=0d180c78c8&action=activate&plugin=contact-form-7\\/wp-contact-form-7.php"
      }
    }

    Weird bug, I did more testing and turns out when disabling these options makes it work fine but then it also makes the plugin pointless. There are no PHP errors, no logs either /var/log and /wp-content directories.

    opcache.enable=0
    opcache.enable_cli=0

    php.ini = http://wpbin.io/4xalrk

    Could just be my setup, once again.

    • This reply was modified 1 year, 2 months ago by cim.
    • This reply was modified 1 year, 2 months ago by cim.
    Plugin Author nierdz

    (@mnttech)

    Error message is about contact form 7.
    Could you disable all your plugins and enable wp opcache again.
    If it works, enable one by one every other plugins and you’ll know which one is conflicted so I can try to reproduce your problem.

    This was a new install using my custom bash script in Docker. It doesn’t matter what plugin you add/install, the same error pops up.

    To reproduce:

    • Install your plugin
    • Turn on precompile option
    • Download any plugin

    Sorry couldn’t be much of a help as there is no PHP error written in logs.

    Plugin Author nierdz

    (@mnttech)

    I can’t reproduce this problem.
    Could you provide your Dockerfile and every files included in it please ? Is it on github ?
    I’ll take a look at what’s blocking here.

    Yes, here are some links:

    Dockerfile and assets: https://github.com/demyxco/demyx/tree/master/image/nginx-php-wordpress

    These scripts replaces default config files during instance creation
    nginx.conf: https://github.com/demyxco/demyx/blob/master/function/nginx.sh
    php-fpm: https://github.com/demyxco/demyx/blob/master/function/php-fpm.sh
    php.ini: https://github.com/demyxco/demyx/blob/master/function/php.sh

    This is then script that puts things together, aka the run script
    https://github.com/demyxco/demyx/blob/master/function/run.sh

    • This reply was modified 1 year, 2 months ago by cim.
    Plugin Author nierdz

    (@mnttech)

    Thanks, I finally was able to reproduce it. The two first options have to be activated to hit this bug.
    I’m on a vacation trip now so don’t have much time on laptop but I’ll update the plugin as soon as I found a solution to this problem.

    No rush, enjoy your vacation! I will now mark this as resolve.

    Thank you.

    Glad I found this.
    Also experiencing this bug on OpenLiteSpeed server.
    Plugin downloads but cannot activate automatically, just tells me “Updated Failed”.
    Disabling Precompile php files each time opcache is flushed aka “OPcache Prewarm” fixes this.

    Plugin Author nierdz

    (@mnttech)

    I finally removed this option in the last release cause I never found a way to fix this bug.
    Not really a big deal cause the moment WordPress is loaded again after a flush, all files are in OPcache.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Turning on prepcompile php option causes error’ is closed to new replies.