TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Issue with running Kohana 3.3 minion via cron
  • Hello everyone,

    I have no problem whatsoever running my minion task locally (in Windows) but when I attempt to run it via cron (on HostGator, running PHP 5.3) with the following command:

    php /home/username/public_html/domain.com/appname/index.php --task=Tester

    I get the following errors:

    [08-Jul-2013 13:33:01] PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/username/public_html/domain.com/appname/system/classes/Kohana/Log.php on line 141 [08-Jul-2013 13:33:01] PHP Fatal error: Undefined class constant 'Log::EMERGENCY' in /home/username/public_html/domain.com/appname/system/classes/Kohana/Kohana/Exception.php on line 140

    Looking at the code in question, it looks fine, not to mention the fact that if there was a syntax error in the core :) I'd expect it to fail locally as well.

    Has anyone seen this particular issue themselves and/or have any suggestions for how I should proceed?

    Thanks in advance, Devon

  • Are you sure you are running PHP 5.3 on cron? It's throwing unexpected T_FUNCTION at the start of the definition of closure (that's introduced on PHP 5.3).

    I presume, as per the following links, you need to specify the path: /opt/php53/bin/php

    http://forum.civicrm.org/index.php?topic=26334.0

    http://www.velvetblues.com/web-development-blog/cron-jobs-ssh-php-53-hostgator-shared-hosting/

  • enov,

    You're awesome!! Thank you so much - this was exactly the problem. I swear I searched like mad before posting this so I have no idea why I didn't find the articles you referenced..Again, I appreciate your (very swift) assistance!

    Take care, Devon

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion