ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Cron Retrieve ExpressionEngine.com Blacklist Not Writing to .htaccess After Template Name Change

November 07, 2010 6:38pm

Subscribe [5]
  • #1 / Nov 07, 2010 6:38pm

    Curtis Blackwell

    47 posts

    I’m having some trouble setting up blacklist cron. I had it working, but decided I wanted to add a “.” in front of the template name, and now it’s not working (yes, I tried changing it back). The current template group/template is utility/.cron (was utility/cron).

    • I do have my license number entered in Admin > General Configuration.
    • I have the Blacklist/Whitelist module, EE Cron, and Cron Retrieve EE Blacklist installed.
    • I am able to update my .htaccess by clicking submit underneath the field where I entered the server path to my .htaccess file in the module.
    • I have the following in a template: {exp:cron minute="0" hour="6" plugin="cron_blacklist"}{/exp:cron}

    I tried changing the time to a few minutes ahead of the then-current time and checking my .htaccess after that time had passed. I used minute=“20” hour=“15” for 3:20pm. I even tried minute=”*” hour=”*” (just as a test).


    License: Freelancer v2.1.1 | Build: 20101020
    Server is running PHP 5
    Using NSM .htaccess Generator

  • #2 / Nov 08, 2010 11:26am

    Sue Crocker

    26054 posts

    (yes, I tried changing it back).

    What happens if you create a new template and call it utility/cron2? Does *that* work?

  • #3 / Nov 08, 2010 8:09pm

    Curtis Blackwell

    47 posts

    No, that didn’t work.

    I created a PHP file to check the time on my server. Here’s the code:

    <?php echo date('G:ia'); ?>

    It shows 16:03pm right now, and it’s 6:03pm. I tried using the 16, but I’m not versed in cron, so I don’t know if the time works the same as PHP…

    Also tried this again:

    {!-- blacklist --}
    {exp:cron minute="*" hour="*" plugin="cron_blacklist"}{/exp:cron}

    Could DST have any play in this?

    Changed the template code back to:

    {!-- blacklist --}
    {exp:cron minute="0" hour="6" plugin="cron_blacklist"}{/exp:cron}

    I’ll report back when I have a chance tomorrow.

  • #4 / Nov 09, 2010 9:58am

    Sue Crocker

    26054 posts

    Curtis, also make sure your cron code is on a page that gets hit frequently.

    Let us know what you find out.

  • #5 / Nov 09, 2010 10:21am

    Curtis Blackwell

    47 posts

    oh, so the page does need to be hit.

    does it need to be hit at the time that it’s supposed to retrieve the blacklist?

  • #6 / Nov 09, 2010 5:34pm

    Ingmar

    29245 posts

    It works like that: when your page is hit “cron” checks to see if there are any tasks is has to carry out and does so if needed. If you hit a page after the specified date that will work, too, but you need to hit it in order to trigger the check in the first place. Makes sense?

  • #7 / Nov 09, 2010 7:45pm

    Curtis Blackwell

    47 posts

    I think so… but I tried visiting the template and it didn’t update .htaccess or record a hit in my template manager.

  • #8 / Nov 10, 2010 10:25am

    Sue Crocker

    26054 posts

    I think so… but I tried visiting the template and it didn’t update .htaccess or record a hit in my template manager.

    If you hit other pages, do the template manager hits count increment?

  • #9 / Nov 10, 2010 10:40am

    Curtis Blackwell

    47 posts

    No. All hit counts are 0.

    Not sure if this affects anything, but I do have the system off. I tried turning it on to see if that would increment the hits, but it didn’t.

  • #10 / Nov 11, 2010 4:43am

    John Henry Donovan

    12339 posts

    Curtis,

    Can you try with your .htaccess disabled and your extensions temporarily disabled? Use the large green button in the top right of the extension page as opposed to disabling extensions individually

  • #11 / Nov 11, 2010 11:30am

    Curtis Blackwell

    47 posts

    How can I disable my .htaccess? And what am I trying? To get the hits counted? Or should it create a separate .htaccess for the blacklist?

  • #12 / Nov 11, 2010 6:46pm

    Ingmar

    29245 posts

    You would have to delete or rename .htaccess in order to disable it.

  • #13 / Nov 11, 2010 7:53pm

    Curtis Blackwell

    47 posts

    I figured out this first bit, but I’m putting it here in case anyone else follows along and runs into this.
    Disabling my extensions gives me errors like this:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /SERVER_PATH/SYSTEM_PATH/expressionengine/third_party/nsm_body_class/pi.nsm_body_class.php on line 38

    Cause and Solution
    Still had tags referencing extensions in my templates. Removing/commenting-them-out should fix those.

    Unsolved issue
    I’m getting a blank white screen in my CP with my .htaccess disabled.

  • #14 / Nov 12, 2010 3:13am

    John Henry Donovan

    12339 posts

    Curtis,

    Ok can you enable your htaccess again please? Make sure it has correct permissions. Leave the extensions disabled for the moment.

    In your homepage template add the following updating it the time to run in the next minute or so

    {exp:cron minute="0" hour="5" plugin="cron_blacklist"}{/exp:cron}
  • #15 / Nov 12, 2010 8:18am

    Curtis Blackwell

    47 posts

    No luck.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases