• Resolved Razorfrog Web Design

    (@razorfrog)


    I’ve installed the plugin on 10 sites with mixed results:

    • 4 on Kinsta – Working
    • 4 on WPEngine – Not working
    • 1 on Gridpane – Working
    • 1 on Runcloud – Working

    The WPEngine sites just show an empty stats and graph with 0 visitors. Trying to troubleshoot and I found this topic mentioning wp-content/uploads/pageviews.php and I do not see that file on the WPEngine sites. I also see a 500 error on the Network tab for /wp-admin/admin-ajax.php?action=koko_analytics_collect.

    Should I make that file manually? Might that help? Not sure what else to try. Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support Lap

    (@lapzor)

    Do you have a security plugin on that site that is blocking access to the wp-admin folder?

    Is it a test site with a low amount of visitors?

    Are you able to go into the PHP error log to see the full underlying error for that error 500 code?

    ?Thanks for letting me know.

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    Planning to dig into it further in the next few days. For the 4 sites:

    Do you have a security plugin on that site that is blocking access to the wp-admin folder?
    No.

    Is it a test site with a low amount of visitors?
    No. GA is showing 500-3500 over the last week.

    Are you able to go into the PHP error log to see the full underlying error for that error 500 code?
    No errors are showing in the PHP error logs.

    Plugin Support Lap

    (@lapzor)

    Hi,

    Thanks for the answers. That is very strange that the browser console shows an error 500 is returned but your log doesn’t show the error! Could you maybe double check that / reproduce the error a few times and check the Apache/PHP log again?

    Thanks!

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    It’s definitely not there. Testing and confirmed on four sites. Have you verified that the plugin works with WPEngine before?

    Plugin Support Lap

    (@lapzor)

    No, I don’t think we have. I will ask Danny to take a look at this, he will reply here later.

    Plugin Support Lap

    (@lapzor)

    Hi,

    I spoke with Dany about this. It could be a file permission related error.
    Can you check if /wp-content/uploads/pageviews.php has at least read+write permission (755) and your PHP scripts can write to it?

    Or if that file doesn’t exist, check the permissions on your uploads folder.

    Hope that helps. If you have any questions, please let me know!

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    Site 1 – approx 300 visits per week
    pageviews.php did not exist, I manually created it just now. File disappears / is deleted after a few minutes.

    Site 2 – approx 2500 visits per week
    pageviews.php did not exist, I manually created it just now. File disappears / is deleted after a few minutes.

    Site 3 – approx 150 visits per week
    pageviews.php did not exist, I manually created it just now. File disappears / is deleted after a few minutes.

    Site 4 – low traffic, let’s ignore.

    Does that help?

    Plugin Support Lap

    (@lapzor)

    The PHP user should have permission to create and write to the file. Can you make sure that is the case?

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    Yes, permission to create/edit/delete the file. Can I give you access to a staging site I set up running just the plugin? Let me know where I can send those credentials.

    Plugin Support Lap

    (@lapzor)

    Hi,

    I’m afraid we currently can’t make a lot of time to test/debug that for you as it seems to be an issue specific to your unique setup.

    You can send us a login on support @ mc4wp.com but I can’t say when exactly we will be able to login let alone guarantee any solution as we will only have limited time to look into this for you.

    However, we are thinking to include a warning on the dashboard when the plugin is not able to write the file with a detailed error message, that may help for cases such as yours.

    Hope that helps. If you have any questions, please let me know!

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    This isn’t just my single site though, this is an incompatibility with a major managed WordPress host.

    I’ll send login details today. I’d appreciate you taking a look.

    Plugin Support Lap

    (@lapzor)

    You may want to contact your host to ask if it’s something they can fix, since it’s managed hosting. Maybe they automatically delete any “suspicious” files and see this as a suspicious files since it’s a PHP file in the uploads folder?

    Let me know what they reply. Thanks!

    Thread Starter Razorfrog Web Design

    (@razorfrog)

    I spent two hours with them yesterday troubleshooting. No luck. Their security system isn’t deleting the file.

    Just set up a brand new install with only the koko plugin. Immediately shows the 500 error in the console: https://rfdev0320.wpengine.com/

    I’ve emailed login details.

    baphometslayer

    (@baphometslayer)

    The issue here is that when you’re not logged in to the site, incoming requests are going to their READ-ONLY apache port(Since NGINX is used as a gateway in front of Apache).

    Since those requests cannot modify files, they get a permissions error which ultimately leads to the 500 error. Enabling WordPress debugging should have generated the relevant error for that.

    @lapzor – The following NGINX rule should address this problem on the wpengine platform;

    if ($request_uri ~ ‘\?action=koko_analytics’) {
    set $is_trusted 1;
    }

    If there are any other actions via args that the plugin might be doing, there’s likely a need for a rule to do the same for those URIs as well.

    Plugin Support Lap

    (@lapzor)

    @baphometslayer thank you so much for jumping on this thread! So it seems it was WP engine security system after all I suppose?

    Great solution! Thanks for sharing.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Not working on WPEngine’ is closed to new replies.