Home Forums WordPress Plugins Hide My WP Custom PHP scripts and Hide My WP plugin

This topic is: resolved

This topic contains 9 replies, has 2 voices, and was last updated by  eGene 3 months, 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #21847
    eGene
    Post count: 10

    I need some custom functionality (not related to plugin) to run on cron. For that I have a php script which does what I want. It used to work before I installed hide_my_wp plugin. Now it renders 404 page when I do require(‘[my_path]/wp-load.php’); in my script. If I disable the plugin it works fine again. How do I bypass that?

    #21849
    Suman Maharjan
    Post count: 9115

    Hi, please disable/uncheck these options in HMWP General settings tab:

    – Hide PHP Files
    – Directory List

    Let us know!

    #21851
    eGene
    Post count: 10

    Both these options are disabled, no help.

    #21852
    eGene
    Post count: 10

    Correction. It actually works with those options disabled. I looked at a wrong place while verifying it. Thank you.

    #21854
    Suman Maharjan
    Post count: 9115

    Alright! Let us know if any issue.

    #22039
    eGene
    Post count: 10

    It started happening again. Those 2 checkboxes are unchecked and my cron script is still blocked.

    #22040
    eGene
    Post count: 10

    Also, Trust Network is disabled.

    #22044
    eGene
    Post count: 10

    I believe I found an error and it looks like the problem is in your code (load.php).

    $block_ip = false;
    if ($this->opt('blocked_ips') || ($this->opt('trust_network'))) {
        $rules = get_option('trust_network_rules');
        $banned_ips = array_merge(explode(',', $this->opt('blocked_ips')), explode(',', $rules['ip']));
        ....

    Here you can see that it would read and block IPs from trust_network_rules even when it’s disabled in case there is an IP added manually to blocked_ips field. This was my case. I think it should check $this->opt(‘trust_network’) again before reading from ‘trust_network_rules’.

    • This reply was modified 3 months, 2 weeks ago by  eGene.
    #22054
    Suman Maharjan
    Post count: 9115

    Hi, thanks for the detailed info, we’ll take note of it. I hope for now, removing the IPs from Trust Network section has solved the issue for you.

    #22064
    eGene
    Post count: 10

    It has solved the issue.

    • This reply was modified 3 months, 1 week ago by  eGene.
Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.