Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Cron Jobs Ouputting Meta Refresh Strings Rate Topic   - - - - -

  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11362 posts

Posted 11 July 2019 - 07:58 PM #1

More odd cron behaviors that may be related to the hosting environment.

Addons that are run in the admin context from by myself and Simtech Dev are generating output when run from cron of:

<meta http-equiv="Refresh" content="0;URL=https://modestiq.com/modestpanel.php?%2Fhome%2Fmodest20%2Fpublic_html%2Fmodestpanel_php=&amp;--dispatch=seo_pack_cron.apply&amp;--cron_password=multipass" />


<meta http-equiv="Refresh" content="0;URL=https://modestiq.com/modestpanel.php?_%2Fmodestpanel_php=&amp;--dispatch=ez_shopify_cron.update_stores&amp;--cron_password=multipass" />

The same commands run from the command line in an SSH window do not generate the meta refresh.


Something is causing cs-cart to do a fn_redirect() where the meta string is output.  A backtrace generated just before the fn_echo() of the meta tag is:

    [0] => Array
            [file] => /home/modest20/public_html/app/functions/fn.control.php
            [line] => 329
            [function] => fn_redirect
            [args] => Array
                    [0] => https://modestiq.com/modestpanel.php?_%2Fmodestpanel_php=&--dispatch=ez_shopify_cron.update_stores&--cron_password=multipass
    [1] => Array
            [file] => /home/modest20/public_html/modestpanel.php
            [line] => 27
            [function] => fn_dispatch
            [args] => Array
I found that 'CONSOLE' is not being defined.  Seems that Bootstrap.php has code to check if PHP_SAPI is set to 'cli' and if so, defines CONSOLE and then all the other stuff will work okay.  So I've asked the hosting company for a PHP command to use in cron that will behave the same as php executed from a shell prompt (but have very low expectations).
Anyone else seen and addressed this issue?  If I use ea-php72 instead of php, it generates a warning about tyring to do an ini_set but then also outputs the meta tag and exits...
So frustrating to have to debug this stuff....

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.