Magento fails to create logfiles after installing patch SUPEE-11086Security Patch SUPEE-11086 - Possible issues?Mage::log() not working on new Magento update (1.9.4.1)Shipping Templates Zend PDF Generator Permissions DeniedMagento System and Exception Log not workingMagento : Logging BrokenMagento 1 - Logging only works in backendSecurity Patch SUPEE-11086 - Possible issues?SUPEE-11086 Missing patches for magento versionsSUPEE-11086 hunk FAILEDPatch SUPEE 11086Install patch SUPEE-11086SUPEE-11086 magento 1.9.3.7
What is the command to reset a PC without deleting any files
Is this relativistic mass?
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
Can I find out the caloric content of bread by dehydrating it?
Are white and non-white police officers equally likely to kill black suspects?
"My colleague's body is amazing"
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
Are objects structures and/or vice versa?
Is it wise to focus on putting odd beats on left when playing double bass drums?
Why do we use polarized capacitors?
What is the offset in a seaplane's hull?
What is GPS' 19 year rollover and does it present a cybersecurity issue?
Why airport relocation isn't done gradually?
Email Account under attack (really) - anything I can do?
Is domain driven design an anti-SQL pattern?
"listening to me about as much as you're listening to this pole here"
Copycat chess is back
Is every set a filtered colimit of finite sets?
Symmetry in quantum mechanics
Crop image to path created in TikZ?
What do you call words made from common English words?
Is this food a bread or a loaf?
Is there a name of the flying bionic bird?
Does a dangling wire really electrocute me if I'm standing in water?
Magento fails to create logfiles after installing patch SUPEE-11086
Security Patch SUPEE-11086 - Possible issues?Mage::log() not working on new Magento update (1.9.4.1)Shipping Templates Zend PDF Generator Permissions DeniedMagento System and Exception Log not workingMagento : Logging BrokenMagento 1 - Logging only works in backendSecurity Patch SUPEE-11086 - Possible issues?SUPEE-11086 Missing patches for magento versionsSUPEE-11086 hunk FAILEDPatch SUPEE 11086Install patch SUPEE-11086SUPEE-11086 magento 1.9.3.7
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I noticed that magento does not create any new logfiles after installing SUPEE-11086.
I tried it like this: Mage::log('test', null, 'test123.log', true);
I tried to debug the static log function in app/Mage.php
and figured out that the code enters the return here:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is a comparism of the code before the patch and after it:
I even changed permissions of the whole var folder to 777 recursively with chmod -R 777 var/
Did anyone noticed this behaviour and found a solution yet?
magento-1.9 log bug supee-11086
add a comment |
I noticed that magento does not create any new logfiles after installing SUPEE-11086.
I tried it like this: Mage::log('test', null, 'test123.log', true);
I tried to debug the static log function in app/Mage.php
and figured out that the code enters the return here:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is a comparism of the code before the patch and after it:
I even changed permissions of the whole var folder to 777 recursively with chmod -R 777 var/
Did anyone noticed this behaviour and found a solution yet?
magento-1.9 log bug supee-11086
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00
add a comment |
I noticed that magento does not create any new logfiles after installing SUPEE-11086.
I tried it like this: Mage::log('test', null, 'test123.log', true);
I tried to debug the static log function in app/Mage.php
and figured out that the code enters the return here:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is a comparism of the code before the patch and after it:
I even changed permissions of the whole var folder to 777 recursively with chmod -R 777 var/
Did anyone noticed this behaviour and found a solution yet?
magento-1.9 log bug supee-11086
I noticed that magento does not create any new logfiles after installing SUPEE-11086.
I tried it like this: Mage::log('test', null, 'test123.log', true);
I tried to debug the static log function in app/Mage.php
and figured out that the code enters the return here:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is a comparism of the code before the patch and after it:
I even changed permissions of the whole var folder to 777 recursively with chmod -R 777 var/
Did anyone noticed this behaviour and found a solution yet?
magento-1.9 log bug supee-11086
magento-1.9 log bug supee-11086
edited Apr 5 at 8:49
Black
asked Apr 5 at 8:31
BlackBlack
419320
419320
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00
add a comment |
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00
add a comment |
1 Answer
1
active
oldest
votes
Problem is following code snippet:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is checked the file before created. If your log file already exist inside log folder then everything will be fine. If not then this logic will not work. So move this logic after file creation with simple modification, like:
if (!is_dir($logDir))
mkdir($logDir);
chmod($logDir, 0750);
if (!file_exists($logFile))
file_put_contents($logFile, '');
chmod($logFile, 0640);
if (!$logValidator->isValid($logDir . DS . $file))
if (file_exists($logFile))
unlink($logFile);
return;
So the full method will be:
public static function log($message, $level = null, $file = '', $forceLog = false)
if (!self::getConfig())
return;
try
$logActive = self::getStoreConfig('dev/log/active');
if (empty($file))
$file = self::getStoreConfig('dev/log/file');
catch (Exception $e)
$logActive = true;
if (!self::$_isDeveloperMode && !$logActive && !$forceLog)
return;
static $loggers = array();
$level = is_null($level) ? Zend_Log::DEBUG : $level;
$file = empty($file) ?
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
$_allowedFileExtensions = explode(
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
$logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';
try is_object($message))
$message = print_r($message, true);
$message = addcslashes($message, '<?');
$loggers[$file]->log($message, $level);
catch (Exception $e)
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268891%2fmagento-fails-to-create-logfiles-after-installing-patch-supee-11086%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Problem is following code snippet:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is checked the file before created. If your log file already exist inside log folder then everything will be fine. If not then this logic will not work. So move this logic after file creation with simple modification, like:
if (!is_dir($logDir))
mkdir($logDir);
chmod($logDir, 0750);
if (!file_exists($logFile))
file_put_contents($logFile, '');
chmod($logFile, 0640);
if (!$logValidator->isValid($logDir . DS . $file))
if (file_exists($logFile))
unlink($logFile);
return;
So the full method will be:
public static function log($message, $level = null, $file = '', $forceLog = false)
if (!self::getConfig())
return;
try
$logActive = self::getStoreConfig('dev/log/active');
if (empty($file))
$file = self::getStoreConfig('dev/log/file');
catch (Exception $e)
$logActive = true;
if (!self::$_isDeveloperMode && !$logActive && !$forceLog)
return;
static $loggers = array();
$level = is_null($level) ? Zend_Log::DEBUG : $level;
$file = empty($file) ?
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
$_allowedFileExtensions = explode(
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
$logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';
try is_object($message))
$message = print_r($message, true);
$message = addcslashes($message, '<?');
$loggers[$file]->log($message, $level);
catch (Exception $e)
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
add a comment |
Problem is following code snippet:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is checked the file before created. If your log file already exist inside log folder then everything will be fine. If not then this logic will not work. So move this logic after file creation with simple modification, like:
if (!is_dir($logDir))
mkdir($logDir);
chmod($logDir, 0750);
if (!file_exists($logFile))
file_put_contents($logFile, '');
chmod($logFile, 0640);
if (!$logValidator->isValid($logDir . DS . $file))
if (file_exists($logFile))
unlink($logFile);
return;
So the full method will be:
public static function log($message, $level = null, $file = '', $forceLog = false)
if (!self::getConfig())
return;
try
$logActive = self::getStoreConfig('dev/log/active');
if (empty($file))
$file = self::getStoreConfig('dev/log/file');
catch (Exception $e)
$logActive = true;
if (!self::$_isDeveloperMode && !$logActive && !$forceLog)
return;
static $loggers = array();
$level = is_null($level) ? Zend_Log::DEBUG : $level;
$file = empty($file) ?
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
$_allowedFileExtensions = explode(
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
$logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';
try is_object($message))
$message = print_r($message, true);
$message = addcslashes($message, '<?');
$loggers[$file]->log($message, $level);
catch (Exception $e)
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
add a comment |
Problem is following code snippet:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is checked the file before created. If your log file already exist inside log folder then everything will be fine. If not then this logic will not work. So move this logic after file creation with simple modification, like:
if (!is_dir($logDir))
mkdir($logDir);
chmod($logDir, 0750);
if (!file_exists($logFile))
file_put_contents($logFile, '');
chmod($logFile, 0640);
if (!$logValidator->isValid($logDir . DS . $file))
if (file_exists($logFile))
unlink($logFile);
return;
So the full method will be:
public static function log($message, $level = null, $file = '', $forceLog = false)
if (!self::getConfig())
return;
try
$logActive = self::getStoreConfig('dev/log/active');
if (empty($file))
$file = self::getStoreConfig('dev/log/file');
catch (Exception $e)
$logActive = true;
if (!self::$_isDeveloperMode && !$logActive && !$forceLog)
return;
static $loggers = array();
$level = is_null($level) ? Zend_Log::DEBUG : $level;
$file = empty($file) ?
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
$_allowedFileExtensions = explode(
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
$logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';
try is_object($message))
$message = print_r($message, true);
$message = addcslashes($message, '<?');
$loggers[$file]->log($message, $level);
catch (Exception $e)
Problem is following code snippet:
if (!$logValidator->isValid($logDir . DS . $file))
return;
This is checked the file before created. If your log file already exist inside log folder then everything will be fine. If not then this logic will not work. So move this logic after file creation with simple modification, like:
if (!is_dir($logDir))
mkdir($logDir);
chmod($logDir, 0750);
if (!file_exists($logFile))
file_put_contents($logFile, '');
chmod($logFile, 0640);
if (!$logValidator->isValid($logDir . DS . $file))
if (file_exists($logFile))
unlink($logFile);
return;
So the full method will be:
public static function log($message, $level = null, $file = '', $forceLog = false)
if (!self::getConfig())
return;
try
$logActive = self::getStoreConfig('dev/log/active');
if (empty($file))
$file = self::getStoreConfig('dev/log/file');
catch (Exception $e)
$logActive = true;
if (!self::$_isDeveloperMode && !$logActive && !$forceLog)
return;
static $loggers = array();
$level = is_null($level) ? Zend_Log::DEBUG : $level;
$file = empty($file) ?
(string) self::getConfig()->getNode('dev/log/file', Mage_Core_Model_Store::DEFAULT_CODE) : basename($file);
// Validate file extension before save. Allowed file extensions: log, txt, html, csv
$_allowedFileExtensions = explode(
',',
(string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE)
);
$logValidator = new Zend_Validate_File_Extension($_allowedFileExtensions);
$logDir = self::getBaseDir('var') . DS . 'log';
try is_object($message))
$message = print_r($message, true);
$message = addcslashes($message, '<?');
$loggers[$file]->log($message, $level);
catch (Exception $e)
edited Apr 5 at 11:03
answered Apr 5 at 10:57
Sohel RanaSohel Rana
23.1k34461
23.1k34461
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
add a comment |
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
Thx! Will try it on monday.
– Black
Apr 5 at 14:35
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268891%2fmagento-fails-to-create-logfiles-after-installing-patch-supee-11086%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please refer to these links to see if it is useful magento.stackexchange.com/questions/267490/… magento.stackexchange.com/questions/268229/…
– Raj Mohan R
Apr 5 at 9:00