Magento 2 : Error 500 after installing Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?White admin login screen on magento 2Magento 2 not working on apache2, php7 and ubuntuError after running compile and upgrade cmd lineProceeding to an exception page after save new categoryMagento 2: Calling Custom File on Root Gives RuntimeExceptionBannerslider not compatible with Magento 2.1?Magento Module creation gives errorFatal error: Uncaught RuntimeException:Uncaught RuntimeException: Can't create directoryCannot add products in admin panel. “Permission denied” exception error message

What would be the ideal power source for a cybernetic eye?

Why are there no cargo aircraft with "flying wing" design?

I need to find the potential function of a vector field.

do i need a schengen visa for a direct flight to amsterdam?

Dominant seventh chord in the major scale contains diminished triad of the seventh?

Why did the IBM 650 use bi-quinary?

How to motivate offshore teams and trust them to deliver?

How to do this path/lattice with tikz

How do I keep my slimes from escaping their pens?

Diagram with tikz

Determinant is linear as a function of each of the rows of the matrix.

What does the "x" in "x86" represent?

Using et al. for a last / senior author rather than for a first author

How to bypass password on Windows XP account?

Why is black pepper both grey and black?

What is this single-engine low-wing propeller plane?

What is the longest distance a 13th-level monk can jump while attacking on the same turn?

Why was the term "discrete" used in discrete logarithm?

What is the musical term for a note that continously plays through a melody?

If Jon Snow became King of the Seven Kingdoms what would his regnal number be?

How to deal with a team lead who never gives me credit?

How much radiation do nuclear physics experiments expose researchers to nowadays?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Is there a concise way to say "all of the X, one of each"?



Magento 2 : Error 500 after installing



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?White admin login screen on magento 2Magento 2 not working on apache2, php7 and ubuntuError after running compile and upgrade cmd lineProceeding to an exception page after save new categoryMagento 2: Calling Custom File on Root Gives RuntimeExceptionBannerslider not compatible with Magento 2.1?Magento Module creation gives errorFatal error: Uncaught RuntimeException:Uncaught RuntimeException: Can't create directoryCannot add products in admin panel. “Permission denied” exception error message



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















[Ubuntu 18.04 / Apache 2.4 / PHP 7.2.17 / Magento 2.3.1]



After successful installing, magento show blank page. I found following error in apache error.log:




[php7:error] [pid 29252] [client 127.0.0.1:45454] PHP Fatal error:
Uncaught RuntimeException: Can't create directory
/var/www/html/magento/generated/code/Magento/Framework/App/ResourceConnection/.nClass
MagentoFrameworkAppResourceConnectionProxy generation error:
The requested class did not generate properly, because the 'generated'
directory permission is read-only. If --- after running the
'bin/magento setup:di:compile' CLI command when the 'generated'
directory permission is set to write --- the requested class did not
generate properly, then you must add the generated class object to the
signature of the related construct method, only. in
/var/www/html/magento/vendor/magento/framework/Code/Generator.php:135nStack
trace:n#0
/var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
MagentoFrameworkCodeGenerator->generateClass('Magento\Framewo...')n#1
[internal function]:
MagentoFrameworkCodeGeneratorAutoloader->load('Magento\Framewo...')n#2
[internal function]: spl_autoload_call('Magento\Framewo...')n#3
/var/www/html/magento/vendor/mag in
/var/www/html/magento/vendor/magento/framework/Code/Generator.php on
line 135




I have set chmod -R 777 /var/www/html/magento/generated.
But it's showing the same error.
Can you help?










share|improve this question









New contributor




mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    2















    [Ubuntu 18.04 / Apache 2.4 / PHP 7.2.17 / Magento 2.3.1]



    After successful installing, magento show blank page. I found following error in apache error.log:




    [php7:error] [pid 29252] [client 127.0.0.1:45454] PHP Fatal error:
    Uncaught RuntimeException: Can't create directory
    /var/www/html/magento/generated/code/Magento/Framework/App/ResourceConnection/.nClass
    MagentoFrameworkAppResourceConnectionProxy generation error:
    The requested class did not generate properly, because the 'generated'
    directory permission is read-only. If --- after running the
    'bin/magento setup:di:compile' CLI command when the 'generated'
    directory permission is set to write --- the requested class did not
    generate properly, then you must add the generated class object to the
    signature of the related construct method, only. in
    /var/www/html/magento/vendor/magento/framework/Code/Generator.php:135nStack
    trace:n#0
    /var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
    MagentoFrameworkCodeGenerator->generateClass('Magento\Framewo...')n#1
    [internal function]:
    MagentoFrameworkCodeGeneratorAutoloader->load('Magento\Framewo...')n#2
    [internal function]: spl_autoload_call('Magento\Framewo...')n#3
    /var/www/html/magento/vendor/mag in
    /var/www/html/magento/vendor/magento/framework/Code/Generator.php on
    line 135




    I have set chmod -R 777 /var/www/html/magento/generated.
    But it's showing the same error.
    Can you help?










    share|improve this question









    New contributor




    mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      2












      2








      2


      1






      [Ubuntu 18.04 / Apache 2.4 / PHP 7.2.17 / Magento 2.3.1]



      After successful installing, magento show blank page. I found following error in apache error.log:




      [php7:error] [pid 29252] [client 127.0.0.1:45454] PHP Fatal error:
      Uncaught RuntimeException: Can't create directory
      /var/www/html/magento/generated/code/Magento/Framework/App/ResourceConnection/.nClass
      MagentoFrameworkAppResourceConnectionProxy generation error:
      The requested class did not generate properly, because the 'generated'
      directory permission is read-only. If --- after running the
      'bin/magento setup:di:compile' CLI command when the 'generated'
      directory permission is set to write --- the requested class did not
      generate properly, then you must add the generated class object to the
      signature of the related construct method, only. in
      /var/www/html/magento/vendor/magento/framework/Code/Generator.php:135nStack
      trace:n#0
      /var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
      MagentoFrameworkCodeGenerator->generateClass('Magento\Framewo...')n#1
      [internal function]:
      MagentoFrameworkCodeGeneratorAutoloader->load('Magento\Framewo...')n#2
      [internal function]: spl_autoload_call('Magento\Framewo...')n#3
      /var/www/html/magento/vendor/mag in
      /var/www/html/magento/vendor/magento/framework/Code/Generator.php on
      line 135




      I have set chmod -R 777 /var/www/html/magento/generated.
      But it's showing the same error.
      Can you help?










      share|improve this question









      New contributor




      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      [Ubuntu 18.04 / Apache 2.4 / PHP 7.2.17 / Magento 2.3.1]



      After successful installing, magento show blank page. I found following error in apache error.log:




      [php7:error] [pid 29252] [client 127.0.0.1:45454] PHP Fatal error:
      Uncaught RuntimeException: Can't create directory
      /var/www/html/magento/generated/code/Magento/Framework/App/ResourceConnection/.nClass
      MagentoFrameworkAppResourceConnectionProxy generation error:
      The requested class did not generate properly, because the 'generated'
      directory permission is read-only. If --- after running the
      'bin/magento setup:di:compile' CLI command when the 'generated'
      directory permission is set to write --- the requested class did not
      generate properly, then you must add the generated class object to the
      signature of the related construct method, only. in
      /var/www/html/magento/vendor/magento/framework/Code/Generator.php:135nStack
      trace:n#0
      /var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
      MagentoFrameworkCodeGenerator->generateClass('Magento\Framewo...')n#1
      [internal function]:
      MagentoFrameworkCodeGeneratorAutoloader->load('Magento\Framewo...')n#2
      [internal function]: spl_autoload_call('Magento\Framewo...')n#3
      /var/www/html/magento/vendor/mag in
      /var/www/html/magento/vendor/magento/framework/Code/Generator.php on
      line 135




      I have set chmod -R 777 /var/www/html/magento/generated.
      But it's showing the same error.
      Can you help?







      magento2 permissions file-permissions magento2.3.1






      share|improve this question









      New contributor




      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited yesterday









      Vivek Kumar

      2,6392730




      2,6392730






      New contributor




      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      mashuxamashuxa

      132




      132




      New contributor




      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      mashuxa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          1














          You have to give permissions to var pub and generated directories. cd into your magento installation and run following command;



          chmod -R 777 var pub generated


          you may also need to run setup upgarade and deploy static files so run following commands too ;



          php bin/magento s:up && php bin/magento s:s:d -f && chmod 777 -R var pub generated





          share|improve this answer























          • Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

            – mashuxa
            yesterday












          • you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

            – Vivek Kumar
            yesterday












          • Also please accept the answer if it helped

            – Vivek Kumar
            yesterday











          • Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

            – mashuxa
            yesterday











          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
          );



          );






          mashuxa is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270020%2fmagento-2-error-500-after-installing%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









          1














          You have to give permissions to var pub and generated directories. cd into your magento installation and run following command;



          chmod -R 777 var pub generated


          you may also need to run setup upgarade and deploy static files so run following commands too ;



          php bin/magento s:up && php bin/magento s:s:d -f && chmod 777 -R var pub generated





          share|improve this answer























          • Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

            – mashuxa
            yesterday












          • you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

            – Vivek Kumar
            yesterday












          • Also please accept the answer if it helped

            – Vivek Kumar
            yesterday











          • Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

            – mashuxa
            yesterday















          1














          You have to give permissions to var pub and generated directories. cd into your magento installation and run following command;



          chmod -R 777 var pub generated


          you may also need to run setup upgarade and deploy static files so run following commands too ;



          php bin/magento s:up && php bin/magento s:s:d -f && chmod 777 -R var pub generated





          share|improve this answer























          • Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

            – mashuxa
            yesterday












          • you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

            – Vivek Kumar
            yesterday












          • Also please accept the answer if it helped

            – Vivek Kumar
            yesterday











          • Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

            – mashuxa
            yesterday













          1












          1








          1







          You have to give permissions to var pub and generated directories. cd into your magento installation and run following command;



          chmod -R 777 var pub generated


          you may also need to run setup upgarade and deploy static files so run following commands too ;



          php bin/magento s:up && php bin/magento s:s:d -f && chmod 777 -R var pub generated





          share|improve this answer













          You have to give permissions to var pub and generated directories. cd into your magento installation and run following command;



          chmod -R 777 var pub generated


          you may also need to run setup upgarade and deploy static files so run following commands too ;



          php bin/magento s:up && php bin/magento s:s:d -f && chmod 777 -R var pub generated






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Vivek KumarVivek Kumar

          2,6392730




          2,6392730












          • Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

            – mashuxa
            yesterday












          • you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

            – Vivek Kumar
            yesterday












          • Also please accept the answer if it helped

            – Vivek Kumar
            yesterday











          • Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

            – mashuxa
            yesterday

















          • Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

            – mashuxa
            yesterday












          • you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

            – Vivek Kumar
            yesterday












          • Also please accept the answer if it helped

            – Vivek Kumar
            yesterday











          • Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

            – mashuxa
            yesterday
















          Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

          – mashuxa
          yesterday






          Thank you very much. But now I have new error: There has been an error processing your request /var/www/html/magento/var/report {"0":"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'","1":"<pre>#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460]n#3 Zend_Db_Adapter_Abstract->query('SELECT `store_we...', array()) called at...

          – mashuxa
          yesterday














          you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

          – Vivek Kumar
          yesterday






          you may not have connected to your db correctly. Enter your db user credentials and correct db in magento_root/app/etc/env.php

          – Vivek Kumar
          yesterday














          Also please accept the answer if it helped

          – Vivek Kumar
          yesterday





          Also please accept the answer if it helped

          – Vivek Kumar
          yesterday













          Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

          – mashuxa
          yesterday





          Thank you very much. It works. Also problem was related with root user's password. I created new user with strong password and magento started!

          – mashuxa
          yesterday










          mashuxa is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          mashuxa is a new contributor. Be nice, and check out our Code of Conduct.












          mashuxa is a new contributor. Be nice, and check out our Code of Conduct.











          mashuxa is a new contributor. Be nice, and check out our Code of Conduct.














          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270020%2fmagento-2-error-500-after-installing%23new-answer', 'question_page');

          );

          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







          Popular posts from this blog

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?