• Resolved Lethalmiko

    (@lethalmiko)


    I have experienced expired accounts still being able to access content after expiry. I set up a manual cronjob for WordPress that runs every 5 minutes. I am using WP Crontrol Plugin. However, the pmpro cron events disappeared from the list and I had to deactivate and reactivate the plugin to bring them back.

    when I run this URL below to manually expire, it throws up an error instead of a blank screen.

    https://yourwebsiteURL/wp-content/plugins/paid-memberships-pro/scheduled/expirememberships.php

    403
    Forbidden
    Access to this resource on the server is denied!

    Any ideas?

    I have Paid Memberships Pro Version 2.7.2

    • This topic was modified 3 years, 1 month ago by Lethalmiko.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @lethalmiko

    I’m sorry to hear about this issue you are facing. This sounds like your server may be blocking the cron task.

    Could you run the cron job manually via WP Crontrol and let me know if that fails?

    I recommend reaching out to your host if the above step doesn’t work so they may look into it for you and advise you with a way forward.

    Thread Starter Lethalmiko

    (@lethalmiko)

    Thanks for the reply.

    I did manually run the cron job via WP Crontrol before I posted my question and it does work, but my issue is that I want it to run automatically via a server cron job which I have already setup thus:

    */5 * * * * wget https://mydomain.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

    I also have a separate server cron job to visit the homepage every minute thus:

    */1 * * * * wget -q https://mydomain.com/ > /dev/null 2>&1

    In wp-config.php, I have put in:

    define(‘DISABLE_WP_CRON’, ‘true’);

    I have root access to the server and I tested the WordPress cron job and it does create a log file, meaning it works. ie:

    */1 * * * * wget https://mydomain.com/wp-cron.php?doing_wp_cron > /path-to-wordpress/test.log

    So my biggest issue is that the pmpro cron jobs listed in WP Crontrol just mysteriously disappeared from the list and had to be added back manually. I found that a hundred subscriber accounts were still active beyond their expiry dates because of this problem.

    • This reply was modified 3 years, 1 month ago by Lethalmiko.
    • This reply was modified 3 years, 1 month ago by Lethalmiko.
    Thread Starter Lethalmiko

    (@lethalmiko)

    And I also need to know why

    https://mydomain.com/wp-content/plugins/paid-memberships-pro/scheduled/expirememberships.php

    throws up a 403 Forbidden error. The error is there even if I run wget from the command line on the same server.

    My plan was to create a server cron job to be running that URL so that memberships are expired even if the prmpro cron jobs disappear as they did.

    • This reply was modified 3 years, 1 month ago by Lethalmiko.
    • This reply was modified 3 years, 1 month ago by Lethalmiko.
    Plugin Author Andrew Lima

    (@andrewza)

    Please can you reach out to your hosting provider regarding the 403 error, as this seems to be site specific.

    Cron Jobs disappearing mysteriously is often a host or another plugin that checks cron jobs activity and removes them if they feel they are using “too much” resources. We only add or remove these cron jobs on plugin activation and deactivation respectively.

    If you manage to find out the reason why your cron jobs were deleted randomly, please let me know as I’ve seen issues like this in the past but were never able to determine the true cause of this.

    Thread Starter Lethalmiko

    (@lethalmiko)

    I will revert if I discover anything new about the disappearing cron jobs. So far they are still there.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problems with expired accounts still working’ is closed to new replies.