{"id":3683,"date":"2017-08-08T11:28:21","date_gmt":"2017-08-08T17:28:21","guid":{"rendered":"https:\/\/www.whitefirdesign.com\/blog\/?p=3683"},"modified":"2017-08-08T11:28:21","modified_gmt":"2017-08-08T17:28:21","slug":"fixing-opencart-login-failure-due-to-missing-logs-directory","status":"publish","type":"post","link":"https:\/\/www.whitefirdesign.com\/blog\/2017\/08\/08\/fixing-opencart-login-failure-due-to-missing-logs-directory\/","title":{"rendered":"Fixing OpenCart Login Failure Due to Missing Logs Directory"},"content":{"rendered":"<div>We recently had someone come to us for <a href=\"\/services\/opencart-support.html\">OpenCart support<\/a>\u00a0after out of the blue they were unable to login to the admin area of OpenCart anymore. When they tried to log in with the correct credentials they were getting the following messages and nothing else:<\/div>\n<blockquote>\n<div><b>Warning<\/b>: fopen([redacted]\/system\/logs\/openbay.log): failed to open stream: No such file or directory in <b>[redacted]\/system\/library\/log.php<\/b>\u00a0on line\u00a0<b>6<\/b><b>Warning<\/b>: Cannot modify header information &#8211; headers already sent by (output started at [redacted]\/admin\/index.php:85) in <b>[redacted[\/system\/library\/response.php<\/b>\u00a0on line\u00a0<b>12<\/b><\/div>\n<\/blockquote>\n<p>Similar messages were being shown on other pages on the website.<\/p>\n<p>The first warning shown indicated that there was a failure to open a file at \/system\/logs\/openbay.log. When we started looking into things we noticed that there was no directory at \/system\/logs\/, which was the defined location for the logs directory in the config.php file for OpenCart. After creating that directory the warning messages were gone and the website&#8217;s owner was able to successfully able to log in.<\/p>\n<p>It is isn&#8217;t clear why the issue propped up at the time it did because the file that was unable to be written to was created but empty after the directory was created, so it didn&#8217;t seem like there was something that suddenly need to be written to that hadn&#8217;t before.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently had someone come to us for OpenCart support\u00a0after out of the blue they were unable to login to the admin area of OpenCart anymore. When they tried to log in with the correct credentials they were getting the following messages and nothing else: Warning: fopen([redacted]\/system\/logs\/openbay.log): failed to open stream: No such file or &hellip; <a href=\"https:\/\/www.whitefirdesign.com\/blog\/2017\/08\/08\/fixing-opencart-login-failure-due-to-missing-logs-directory\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fixing OpenCart Login Failure Due to Missing Logs Directory&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150],"tags":[],"class_list":["post-3683","post","type-post","status-publish","format-standard","hentry","category-opencart-issues"],"_links":{"self":[{"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/posts\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/comments?post=3683"}],"version-history":[{"count":2,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/posts\/3683\/revisions"}],"predecessor-version":[{"id":3688,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/posts\/3683\/revisions\/3688"}],"wp:attachment":[{"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/media?parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/categories?post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whitefirdesign.com\/blog\/wp-json\/wp\/v2\/tags?post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}