Cron Job suddenly stopped working - 406 error.

Discussion in 'Troubleshooting' started by chrome62, Feb 21, 2009.

  1. chrome62

    chrome62 Member

    Joined:
    Apr 22, 2008
    Messages:
    90
    I have two sites on a dedicated server using aMember.
    Yesterday, after working fine for over 2 years, I started getting cron job errors with a 406 error: See below:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head>
    <title>406 Not Acceptable</title>
    </head><body>
    <h1>Not Acceptable</h1>
    <p>An appropriate representation of the requested resource /member/cron.php could not be found on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> <hr>
    <address>Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 Server at www.mydomain.com Port 80</address> </body></html>


    I FTP'ed and the file is there at permission of 755.

    WTF?

    My web host said to contact the author.
    Huh?
    Sounds like a pass off.
  2. zenpig66

    zenpig66 aMember Pro Customer

    Joined:
    Jan 1, 2009
    Messages:
    72
    hm...it's more than likely an issue with your host. Since you are receiving 406's it's probably mod_security that is playing havoc with you.

    What I'd do is first try to run the cron in shell if you have access to to make sure it still runs at all and bug your host about any recent upgrades to apache2 or mod_security2..also have them look in the apache error logs for any clues.

    What method are you using to run the cron(get, curl, etc?) and have you tried another? If no other works you may want to try php -q 'http://domain.com/amember/cron.php' >/dev/null(or correct path you are using). It's not listed in the aMember manual and not sure if it will work but if it is a mod_security issue this could be a way around it.

    [edit]edited to add that I highly doubt the php method I mentioned will work with the aMembers cron.php file now that I take a closer look at how it works with the script. You can try /usr/local/bin/php -q /path to/amember/cron.php or php -q /path to/amember/cron.phpas well..make sure the path to php is correct for your server environment if not using simply php -q. I can run both from the command line and the error/debug file of aMember shows it as run fine. I think most likely mod_security is keeping you from access the server directory structure as defined in your cronjob and seeing it as an "attack". If you can simply call php to do it for you it could work.[/edit]
    [/edit]
  3. microlinx

    microlinx Member

    Joined:
    Oct 26, 2004
    Messages:
    268
    I agree with ZP, check mod_security.

Share This Page