4

I have a small bug and have no clue where or how to debug. I have one cron task which runs on production but stops or stuck always on one method. On local env it works like a charm, but on prod not. Here is my code:

$stores = Mage::app()->getStores();
        foreach ($stores as $store) {
            if ($store->getIsActive()) {

                Mage::log("store ID " . $store->getId() . ": " . $store->getCode(), null, 'myextension.log');

                // call update check
                Mage::log( "before runUpdateCheck()", null, 'myextension.log');

                $update_done = Mage::helper('privacypolicy/service')->runUpdateCheck($store);
                Mage::log( "after runUpdateCheck()", null, 'myextension.log');


                if ($update_done AND ! $updated) {
                    $updated = true;
                }
            }

            Mage::log('Cron: Update check finished', null, 'myextension.log');
        }

So it works until $update_done = Mage::helper('privacypolicy/service')->runUpdateCheck($store);

Then nothing happened. Tried to add logging into this method. Nothing happened.

As I mentioned above - on local it works fine. Have no idea how to fix it on prod.

  • 1
    Check your php version. – Sohel Rana Feb 23 at 16:57
  • @SohelRana PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37) – Oleg Feb 24 at 15:57
  • Did you check php error_log? – Sohel Rana Feb 24 at 16:16
  • @SohelRana of course. I've checked all logs which could tell me any info. They are doesn't contain any errors or issues related to this cron tast – Oleg Feb 24 at 16:23
  • @SohelRana just FYI. You were almost right about PHP version – Oleg Mar 12 at 9:44
0

solved this issue by myself. Problem was in PHP version. Before it was 5.5, updated to 7.2 and it solved this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.