View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006029 | OXID eShop (all versions) | 4. ------ eShop Core ------- | public | 2015-01-22 14:12 | 2017-07-04 10:44 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 4.9.2 / 5.2.2 | ||||
Fixed in Version | 6.0.0-rc.2 | ||||
Summary | 0006029: The shop framework tries to set cookies when it is called via CLI | ||||
Description | When calling the shop framework by a cronjob, it is called via CLI. So in this case the shop shouldn't set (or try to set) cookies. | ||||
Steps To Reproduce | See "Additional Information". Execute the script by calling it from the console: $ php cron.php Be sure that warnings are displayed or at least saved to a log file. | ||||
Additional Information | File: bin/cron.php<?php require_once dirname(__FILE__) . '/../bootstrap.php'; // initializes singleton config class $myConfig = oxRegistry::getConfig(); // executing maintenance tasks.. //oxNew('oxmaintenance')->execute(); $oxidOfAnExampleOrder = 'ef5ddc74afbb8dd549fd5c5fd3bc9828'; echo 'This will cause the Error: "PHP Warning: Cannot modify header information - headers already sent by"'; $order = oxNew('oxorder'); if ($order->load($oxidOfAnExampleOrder)) { $order->oxorder__oxtrackcode = new oxField('foobar'); $order->save(); $mail = oxNew('oxemail'); $mail->sendSendedNowMail($order); } // closing page, writing cache and so on.. $myConfig->pageClose(); echo 'Last output.' . PHP_EOL; | ||||
Tags | Cookies, Cron Jobs | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||