Magento 2.2.2: problem with php bin/magento setup:di:compile












0















when I try to compile after setup:upgrade



It displays for me blank page with error in log file:



main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist  


I used this code too to display errors in index.php



ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}


The home page now display the following error



Array
(
[type] => 8192
[message] => Function mcrypt_module_close() is deprecated
[file] => C:xampphtdocsmagentovendormagentoframeworkEncryptionCrypt.php
[line] => 112
)


Any suggestion?



Thanks,










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Refer this link to enable error in Magento2.

    – Pratik Oza
    Jan 11 '18 at 19:03
















0















when I try to compile after setup:upgrade



It displays for me blank page with error in log file:



main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist  


I used this code too to display errors in index.php



ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}


The home page now display the following error



Array
(
[type] => 8192
[message] => Function mcrypt_module_close() is deprecated
[file] => C:xampphtdocsmagentovendormagentoframeworkEncryptionCrypt.php
[line] => 112
)


Any suggestion?



Thanks,










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Refer this link to enable error in Magento2.

    – Pratik Oza
    Jan 11 '18 at 19:03














0












0








0








when I try to compile after setup:upgrade



It displays for me blank page with error in log file:



main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist  


I used this code too to display errors in index.php



ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}


The home page now display the following error



Array
(
[type] => 8192
[message] => Function mcrypt_module_close() is deprecated
[file] => C:xampphtdocsmagentovendormagentoframeworkEncryptionCrypt.php
[line] => 112
)


Any suggestion?



Thanks,










share|improve this question
















when I try to compile after setup:upgrade



It displays for me blank page with error in log file:



main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist  


I used this code too to display errors in index.php



ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}


The home page now display the following error



Array
(
[type] => 8192
[message] => Function mcrypt_module_close() is deprecated
[file] => C:xampphtdocsmagentovendormagentoframeworkEncryptionCrypt.php
[line] => 112
)


Any suggestion?



Thanks,







magento2.2.2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 11 '18 at 20:59









Keyur Shah

13k23864




13k23864










asked Jan 11 '18 at 18:52









Mohamed ElkashefMohamed Elkashef

132




132





bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Refer this link to enable error in Magento2.

    – Pratik Oza
    Jan 11 '18 at 19:03



















  • Refer this link to enable error in Magento2.

    – Pratik Oza
    Jan 11 '18 at 19:03

















Refer this link to enable error in Magento2.

– Pratik Oza
Jan 11 '18 at 19:03





Refer this link to enable error in Magento2.

– Pratik Oza
Jan 11 '18 at 19:03










1 Answer
1






active

oldest

votes


















0














I Have been searching a lot since no body helped me.



and the below solution worked with me



The Solution as follows:



Note I use Ubuntu 17 and I'm on localhost



first need to edit apache2 configuration.



use any editor to edit the this file path



etc/apache2/apache.conf


Replace the following lines:



<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>


to:



<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>


restart apache:



sudo service apache2 restart


the problem after compile php bin/magento setup:di:compile
and php bin/magento setup:static-content:deploy
the folder /var magento deploy files and folders can't be accessed.



so need to do the following:



Make sure you are in the following directory.



/var/www/magento


then use the following Command:



sudo chmod 777 -R var


and this



sudo chmod 777 -R pub


Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure
the proper permissions for the files and folders. permisions with 777 can do security issue.






share|improve this answer























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


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f209128%2fmagento-2-2-2-problem-with-php-bin-magento-setupdicompile%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









    0














    I Have been searching a lot since no body helped me.



    and the below solution worked with me



    The Solution as follows:



    Note I use Ubuntu 17 and I'm on localhost



    first need to edit apache2 configuration.



    use any editor to edit the this file path



    etc/apache2/apache.conf


    Replace the following lines:



    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>


    to:



    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>


    restart apache:



    sudo service apache2 restart


    the problem after compile php bin/magento setup:di:compile
    and php bin/magento setup:static-content:deploy
    the folder /var magento deploy files and folders can't be accessed.



    so need to do the following:



    Make sure you are in the following directory.



    /var/www/magento


    then use the following Command:



    sudo chmod 777 -R var


    and this



    sudo chmod 777 -R pub


    Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure
    the proper permissions for the files and folders. permisions with 777 can do security issue.






    share|improve this answer




























      0














      I Have been searching a lot since no body helped me.



      and the below solution worked with me



      The Solution as follows:



      Note I use Ubuntu 17 and I'm on localhost



      first need to edit apache2 configuration.



      use any editor to edit the this file path



      etc/apache2/apache.conf


      Replace the following lines:



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride None
      Require all granted
      </Directory>


      to:



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
      </Directory>


      restart apache:



      sudo service apache2 restart


      the problem after compile php bin/magento setup:di:compile
      and php bin/magento setup:static-content:deploy
      the folder /var magento deploy files and folders can't be accessed.



      so need to do the following:



      Make sure you are in the following directory.



      /var/www/magento


      then use the following Command:



      sudo chmod 777 -R var


      and this



      sudo chmod 777 -R pub


      Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure
      the proper permissions for the files and folders. permisions with 777 can do security issue.






      share|improve this answer


























        0












        0








        0







        I Have been searching a lot since no body helped me.



        and the below solution worked with me



        The Solution as follows:



        Note I use Ubuntu 17 and I'm on localhost



        first need to edit apache2 configuration.



        use any editor to edit the this file path



        etc/apache2/apache.conf


        Replace the following lines:



        <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        </Directory>


        to:



        <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        </Directory>


        restart apache:



        sudo service apache2 restart


        the problem after compile php bin/magento setup:di:compile
        and php bin/magento setup:static-content:deploy
        the folder /var magento deploy files and folders can't be accessed.



        so need to do the following:



        Make sure you are in the following directory.



        /var/www/magento


        then use the following Command:



        sudo chmod 777 -R var


        and this



        sudo chmod 777 -R pub


        Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure
        the proper permissions for the files and folders. permisions with 777 can do security issue.






        share|improve this answer













        I Have been searching a lot since no body helped me.



        and the below solution worked with me



        The Solution as follows:



        Note I use Ubuntu 17 and I'm on localhost



        first need to edit apache2 configuration.



        use any editor to edit the this file path



        etc/apache2/apache.conf


        Replace the following lines:



        <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        </Directory>


        to:



        <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        </Directory>


        restart apache:



        sudo service apache2 restart


        the problem after compile php bin/magento setup:di:compile
        and php bin/magento setup:static-content:deploy
        the folder /var magento deploy files and folders can't be accessed.



        so need to do the following:



        Make sure you are in the following directory.



        /var/www/magento


        then use the following Command:



        sudo chmod 777 -R var


        and this



        sudo chmod 777 -R pub


        Note: I don't know the right permissions for those two folders and I don't care cause i'm in localhost if you are in published website make sure
        the proper permissions for the files and folders. permisions with 777 can do security issue.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 13 '18 at 0:34









        Mohamed ElkashefMohamed Elkashef

        132




        132






























            draft saved

            draft discarded




















































            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%2f209128%2fmagento-2-2-2-problem-with-php-bin-magento-setupdicompile%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

            What other Star Trek series did the main TNG cast show up in?

            Berlina muro

            Berlina aerponto