cancel
Showing results for 
Search instead for 
Did you mean: 

http error 500 after disabling module from admin backend

SOLVED

http error 500 after disabling module from admin backend

Magento 2.2.3, Php 7, Ubuntu 16.04 x64

 

after disabling dotmailer module from magento backend I'm getting following notice on website

"This page isn’t working

exampledomain.com is currently unable to handle this request.

HTTP ERROR 500"

 

error.log.1 file shows following

Thu Apr 26 06:25:01.766562 2018] [mpm_prefork:notice] [pid 23903] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using exampledomain.com. Set the 'ServerName' directive globally to suppress this message

error.log file shows following 

[Thu Apr 26 06:25:02.042512 2018] [mpm_prefork:notice] [pid 23903] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Apr 26 06:25:02.042546 2018] [core:notice] [pid 23903] AH00094: Command line: '/usr/sbin/apache2'
1 ACCEPTED SOLUTION

Accepted Solutions

Re: http error 500 after disabling module from admin backend

Hello @w3_Shaheer

 

you need to do two think

1) create cache folder inside var folder 

2) give 0777 permission to var/cache

chmod 0777 -R var/cache

 

Hope it will help you if it will help you then give Kudo or accept as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

7 REPLIES 7

Re: http error 500 after disabling module from admin backend

Hi @w3_Shaheer

 

open your bootstrap.php file from your magento 2 root directory/app/bootstrap.php

 

remove # from ini_set('display_errors', 1); - then check your frontend !

 

Error will shown on the frontend , instead of 500 - so kindly post that error , so its helps us to troubleshoot the issue.

 

but possible chance to resolve the issue is , you need to  run php bin/magento setup:di:compile and php bin/magento setup:static-content:deploy -f command

 

then clear and flush the cache , so this might resolve this  issue.

if issue solved,Click Kudos & Accept as Solution

Re: http error 500 after disabling module from admin backend

Hi, @Manthan Dave thank you so much for your reply! 

 

website shows following errors

Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/var/cache/" is not writable in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/var...') #1 /var/www/html/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/var/www/html/v...') #2 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Factory.php(158): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true) #5 /var/www/html/vendor/magento/framework/App/Cache/Frontend/Pool.php(67): Magento\Framework\App\Cache\Frontend\Factory->create(Array) #6 /var/www/h in /var/www/html/vendor/magento/zendframework1/library/Zend/Cache.php on line 209

Re: http error 500 after disabling module from admin backend

@Manthan Dave if I allow 777 for cache dir website shows following notice 

There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 704475605204

and that log file present in /var/report shows 

{"0":"Warning: file_put_contents(\/var\/www\/html\/var\/cache\/\/mage-tags\/mage---792_COMPILED_CONFIG): failed to open stream: Permission denied in \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php on line 663","1":"#0 [internal function]: Magento\\Framework\\App\\ErrorHandler->handler(2, 'file_put_conten...', '\/var\/www\/html\/v...', 663, Array)\n#1 \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php(663): file_put_contents('\/var\/www\/html\/v...', '792_GLOBAL_ADMI...', 10)\n#2 \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php(179): Cm_Cache_Backend_File->_updateIdsTags(Array, Array, 'merge')\n#3 \/var\/www\/html\/vendor\/magento\/zendframework1\/library\/Zend\/Cache\/Core.php(390): Cm_Cache_Backend_File->save('a:3:{i:0;a:162:...', '792_GLOBAL_ADMI...', Array, NULL)\n#4 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Core.php(74): Zend_Cache_Core->save('a:3:{i:0;a:162:...', '792_GLOBAL_ADMI...', Array, NULL, 8)\n#5 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Adapter\/Zend.php(47): Magento\\Framework\\Cache\\Core->save('a:3:{i:0;a:162:...', 'GLOBAL|ADMINHTM...', Array, NULL)\n#6 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Adapter\\Zend->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#7 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/TagScope.php(51): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#8 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#9 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#10 \/var\/www\/html\/vendor\/magento\/framework\/App\/Cache\/Type\/AccessProxy.php(85): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#11 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\App\\Cache\\Type\\AccessProxy->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#12 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/TagScope.php(51): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('a:3:{i:0;a:162:...', 'global|adminhtm...', Array, NULL)\n#13 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/PluginList\/PluginList.php(324): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->save('a:3:{i:0;a:162:...', 'global|adminhtm...')\n#14 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/PluginList\/PluginList.php(266): Magento\\Framework\\Interception\\PluginList\\PluginList->_loadScopedData()\n#15 \/var\/www\/html\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php(22): Magento\\Framework\\Interception\\PluginList\\PluginList->getNext('Magento\\\\Framewo...', 'dispatch')\n#16 \/var\/www\/html\/vendor\/magento\/framework\/App\/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#17 \/var\/www\/html\/vendor\/magento\/framework\/App\/Bootstrap.php(256): Magento\\Framework\\App\\Http->launch()\n#18 \/var\/www\/html\/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#19 {main}","url":"\/adminpath","script_name":"\/index.php"}

Re: http error 500 after disabling module from admin backend

@Manthan Dave so I gave write permission to var/cache dir and I got 

There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 1247333171049

I checked the log record, it shows

{"0":"Warning: file_put_contents(\/var\/www\/html\/var\/cache\/\/mage-tags\/mage---792_TRANSLATE): failed to open stream: Permission denied in \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php on line 663","1":"#0 [internal function]: Magento\\Framework\\App\\ErrorHandler->handler(2, 'file_put_conten...', '\/var\/www\/html\/v...', 663, Array)\n#1 \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php(663): file_put_contents('\/var\/www\/html\/v...', '792_TRANSLATE_E...', 10)\n#2 \/var\/www\/html\/vendor\/colinmollenhour\/cache-backend-file\/File.php(179): Cm_Cache_Backend_File->_updateIdsTags(Array, Array, 'merge')\n#3 \/var\/www\/html\/vendor\/magento\/zendframework1\/library\/Zend\/Cache\/Core.php(390): Cm_Cache_Backend_File->save('{\"123\":\"123\",\"T...', '792_TRANSLATE_E...', Array, false)\n#4 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Core.php(74): Zend_Cache_Core->save('{\"123\":\"123\",\"T...', '792_TRANSLATE_E...', Array, false, 8)\n#5 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Adapter\/Zend.php(47): Magento\\Framework\\Cache\\Core->save('{\"123\":\"123\",\"T...', 'TRANSLATE_EN_US...', Array, false)\n#6 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Adapter\\Zend->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#7 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/TagScope.php(51): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#8 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#9 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#10 \/var\/www\/html\/vendor\/magento\/framework\/App\/Cache\/Type\/AccessProxy.php(85): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#11 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/Bare.php(75): Magento\\Framework\\App\\Cache\\Type\\AccessProxy->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#12 \/var\/www\/html\/vendor\/magento\/framework\/Cache\/Frontend\/Decorator\/TagScope.php(51): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#13 \/var\/www\/html\/vendor\/magento\/framework\/Translate.php(501): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->save('{\"123\":\"123\",\"T...', 'translate_en_US...', Array, false)\n#14 \/var\/www\/html\/vendor\/magento\/framework\/Translate.php(211): Magento\\Framework\\Translate->_saveCache()\n#15 \/var\/www\/html\/vendor\/magento\/framework\/App\/Area.php(244): Magento\\Framework\\Translate->loadData('frontend', false)\n#16 \/var\/www\/html\/vendor\/magento\/framework\/App\/Area.php(215): Magento\\Framework\\App\\Area->_initTranslate()\n#17 \/var\/www\/html\/vendor\/magento\/framework\/App\/Area.php(142): Magento\\Framework\\App\\Area->_loadPart('translate')\n#18 \/var\/www\/html\/vendor\/magento\/framework\/View\/DesignLoader.php(55): Magento\\Framework\\App\\Area->load('translate')\n#19 \/var\/www\/html\/vendor\/magento\/framework\/App\/Action\/Plugin\/Design.php(48): Magento\\Framework\\View\\DesignLoader->load()\n#20 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(121): Magento\\Framework\\App\\Action\\Plugin\\Design->beforeDispatch(Object(Magento\\Cms\\Controller\\Index\\Index\\Interceptor), Object(Magento\\Framework\\App\\Request\\Http))\n#21 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#22 \/var\/www\/html\/generated\/code\/Magento\/Cms\/Controller\/Index\/Index\/Interceptor.php(39): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->___callPlugins('dispatch', Array, Array)\n#23 \/var\/www\/html\/vendor\/magento\/framework\/App\/FrontController.php(55): Magento\\Cms\\Controller\\Index\\Index\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#24 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#25 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)\n#26 \/var\/www\/html\/vendor\/magento\/module-store\/App\/FrontController\/Plugin\/RequestPreprocessor.php(94): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#27 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(135): Magento\\Store\\App\\FrontController\\Plugin\\RequestPreprocessor->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#28 \/var\/www\/html\/vendor\/magento\/module-page-cache\/Model\/App\/FrontController\/BuiltinPlugin.php(73): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#29 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(135): Magento\\PageCache\\Model\\App\\FrontController\\BuiltinPlugin->aroundDispatch(Object(Magento\\Framework\\App\\FrontController\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#30 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#31 \/var\/www\/html\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, NULL)\n#32 \/var\/www\/html\/vendor\/magento\/framework\/App\/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#33 \/var\/www\/html\/vendor\/magento\/framework\/App\/Bootstrap.php(256): Magento\\Framework\\App\\Http->launch()\n#34 \/var\/www\/html\/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#35 {main}","url":"\/","script_name":"\/index.php"}

Re: http error 500 after disabling module from admin backend

Hello @w3_Shaheer

 

you need to do two think

1) create cache folder inside var folder 

2) give 0777 permission to var/cache

chmod 0777 -R var/cache

 

Hope it will help you if it will help you then give Kudo or accept as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: http error 500 after disabling module from admin backend

@Sunil Patel thank you so much! cache folder was already present I did not create a new one, I simply ran "chmod 0777 -R var/cache" and my website is back, it changed cache folder owner/group to root. Now what I noticed is that many of my directories and files have different owner/group some have www-data others have root and few have argento which is a user with sudo privileges. Is there an easy way to fix permissions and owner/group of all directories and files? 

thanks again! you made my day! Smiley Very Happy

Re: http error 500 after disabling module from admin backend

Hi @w3_Shaheer

 

different owner/group some have www-data others have root  - Its because of you have change ownership using root user.

 

when you are running any magento command , for magento directory , you always need to run those command using deployment user/argento user , never run those commands as an root user.

 

so now if you wanted to fix this - logged in with your argento user not root user and change ownership , of file and folders then it will be fix.

 

Always run magento command with sudo user - in your case it is argento

 

 

 

if issue solved,Click Kudos & Accept as Solution