How to solve this error on live server for laravel? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Composer update troubleLaravel blank page on live serverLaravel composer update error: Nothing to install or updateLaravel composer autoload file errorcomposer require spatie/laravel-backupLaravel - Is there a way one would create a Laravel project via composer without php-jsonLaravel package's composer requireLaravel package:discover resolveLaravel Update / install composer packageComposer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

Why do we bend a book to keep it straight?

Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source

What are the out-of-universe reasons for the references to Toby Maguire-era Spider-Man in ITSV

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

Closed form of recurrent arithmetic series summation

Chinese Seal on silk painting - what does it mean?

What's the meaning of "fortified infraction restraint"?

Is the Standard Deduction better than Itemized when both are the same amount?

Trademark violation for app?

old style "caution" boxes

Using audio cues to encourage good posture

How to convince students of the implication truth values?

How could we fake a moon landing now?

Why didn't Eitri join the fight?

For a new assistant professor in CS, how to build/manage a publication pipeline

Is CEO the profession with the most psychopaths?

Crossing US/Canada Border for less than 24 hours

How do pianists reach extremely loud dynamics?

When the Haste spell ends on a creature, do attackers have advantage against that creature?

Is it cost-effective to upgrade an old-ish Giant Escape R3 commuter bike with entry-level branded parts (wheels, drivetrain)?

What does this Jacques Hadamard quote mean?

Can an alien society believe that their star system is the universe?

Maximum summed powersets with non-adjacent items

Around usage results



How to solve this error on live server for laravel?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Composer update troubleLaravel blank page on live serverLaravel composer update error: Nothing to install or updateLaravel composer autoload file errorcomposer require spatie/laravel-backupLaravel - Is there a way one would create a Laravel project via composer without php-jsonLaravel package's composer requireLaravel package:discover resolveLaravel Update / install composer packageComposer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








3















I have installed this package success locally composer require spatie/laravel-image-optimizer, but when I tried to install on the live server I got this errors



no@zz607:/var/www/html$ composer require spatie/laravel-image- 
optimizer
Using version ^1.4 for spatie/laravel-image-optimizer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 544395264) (tried to
allocate 20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321

Fatal error: Out of memory (allocated 544395264) (tried to allocate
20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321


server info
enter image description here










share|improve this question
























  • this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

    – محمد مصطفي
    Mar 8 at 19:14












  • What is the OS and PHP version ?

    – Bulfaitelo
    Mar 8 at 20:04












  • PHP 7.2 GNU/Linux

    – محمد مصطفي
    Mar 8 at 20:10











  • You enabled swapfile ? you using apache or nginx?

    – Bulfaitelo
    Mar 8 at 20:13












  • how do i check it?

    – محمد مصطفي
    Mar 8 at 20:14

















3















I have installed this package success locally composer require spatie/laravel-image-optimizer, but when I tried to install on the live server I got this errors



no@zz607:/var/www/html$ composer require spatie/laravel-image- 
optimizer
Using version ^1.4 for spatie/laravel-image-optimizer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 544395264) (tried to
allocate 20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321

Fatal error: Out of memory (allocated 544395264) (tried to allocate
20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321


server info
enter image description here










share|improve this question
























  • this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

    – محمد مصطفي
    Mar 8 at 19:14












  • What is the OS and PHP version ?

    – Bulfaitelo
    Mar 8 at 20:04












  • PHP 7.2 GNU/Linux

    – محمد مصطفي
    Mar 8 at 20:10











  • You enabled swapfile ? you using apache or nginx?

    – Bulfaitelo
    Mar 8 at 20:13












  • how do i check it?

    – محمد مصطفي
    Mar 8 at 20:14













3












3








3








I have installed this package success locally composer require spatie/laravel-image-optimizer, but when I tried to install on the live server I got this errors



no@zz607:/var/www/html$ composer require spatie/laravel-image- 
optimizer
Using version ^1.4 for spatie/laravel-image-optimizer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 544395264) (tried to
allocate 20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321

Fatal error: Out of memory (allocated 544395264) (tried to allocate
20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321


server info
enter image description here










share|improve this question
















I have installed this package success locally composer require spatie/laravel-image-optimizer, but when I tried to install on the live server I got this errors



no@zz607:/var/www/html$ composer require spatie/laravel-image- 
optimizer
Using version ^1.4 for spatie/laravel-image-optimizer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 544395264) (tried to
allocate 20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321

Fatal error: Out of memory (allocated 544395264) (tried to allocate
20480 bytes) in
/usr/share/php/Composer/Repository/ComposerRepository.php on line 321


server info
enter image description here







laravel composer-php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 20:23







محمد مصطفي

















asked Mar 8 at 19:05









محمد مصطفيمحمد مصطفي

317




317












  • this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

    – محمد مصطفي
    Mar 8 at 19:14












  • What is the OS and PHP version ?

    – Bulfaitelo
    Mar 8 at 20:04












  • PHP 7.2 GNU/Linux

    – محمد مصطفي
    Mar 8 at 20:10











  • You enabled swapfile ? you using apache or nginx?

    – Bulfaitelo
    Mar 8 at 20:13












  • how do i check it?

    – محمد مصطفي
    Mar 8 at 20:14

















  • this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

    – محمد مصطفي
    Mar 8 at 19:14












  • What is the OS and PHP version ?

    – Bulfaitelo
    Mar 8 at 20:04












  • PHP 7.2 GNU/Linux

    – محمد مصطفي
    Mar 8 at 20:10











  • You enabled swapfile ? you using apache or nginx?

    – Bulfaitelo
    Mar 8 at 20:13












  • how do i check it?

    – محمد مصطفي
    Mar 8 at 20:14
















this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

– محمد مصطفي
Mar 8 at 19:14






this my server info CPU: 1 vCore RAM: 1024 MB Storage: 25 GB SSD

– محمد مصطفي
Mar 8 at 19:14














What is the OS and PHP version ?

– Bulfaitelo
Mar 8 at 20:04






What is the OS and PHP version ?

– Bulfaitelo
Mar 8 at 20:04














PHP 7.2 GNU/Linux

– محمد مصطفي
Mar 8 at 20:10





PHP 7.2 GNU/Linux

– محمد مصطفي
Mar 8 at 20:10













You enabled swapfile ? you using apache or nginx?

– Bulfaitelo
Mar 8 at 20:13






You enabled swapfile ? you using apache or nginx?

– Bulfaitelo
Mar 8 at 20:13














how do i check it?

– محمد مصطفي
Mar 8 at 20:14





how do i check it?

– محمد مصطفي
Mar 8 at 20:14












2 Answers
2






active

oldest

votes


















2














Your problem is related to the probable fact of having only 1gb of RAM and not having memory swap, so let's create and enable it to take some time off at the time of composer execution.



Folow this steps:



1) Creating 1gb memory swapfile:



$ sudo fallocate -l 1G /swapfile

$ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576



This command created the /swapfile file with 1GB in size.




2) Configuring file to swap:



$ sudo chmod 600 /swapfile

$ sudo mkswap /swapfile


3) Enable swap:



$ sudo swapon /swapfile


To see result you can run free -m or see on htop



Example: $ sudo free -m



 total usada livre compart. buff/cache disponível
Mem.: 7664 1052 3436 56 3175 6259
Swap: 1024 0 1024


Example: $ sudo swapon --show



NAME TYPE SIZE USED PRIO
/swapfile file 1G 0B -2


Test please.






share|improve this answer

























  • no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

    – محمد مصطفي
    Mar 8 at 20:53











  • i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

    – محمد مصطفي
    Mar 8 at 20:54











  • @محمدمصطفي sory, test again

    – Bulfaitelo
    Mar 8 at 21:13











  • I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

    – محمد مصطفي
    Mar 9 at 4:56











  • Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

    – محمد مصطفي
    Mar 9 at 4:56


















1














You should not call composer require or composer update on production server - you should run it locally, verify that everything works fine, and commit generated composer.lock with your project. Then on production server you need to run only composer install --no-dev - it will install all non-dev dependencies defined in lock file. composer install is much faster and uses fraction of RAM required by composer require or composer update, so it should work fine even on server with low memory. It also gives you more control on version of libraries installed on production server, so you can test app more reliable.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fstackoverflow.com%2fquestions%2f55069471%2fhow-to-solve-this-error-on-live-server-for-laravel%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Your problem is related to the probable fact of having only 1gb of RAM and not having memory swap, so let's create and enable it to take some time off at the time of composer execution.



    Folow this steps:



    1) Creating 1gb memory swapfile:



    $ sudo fallocate -l 1G /swapfile

    $ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576



    This command created the /swapfile file with 1GB in size.




    2) Configuring file to swap:



    $ sudo chmod 600 /swapfile

    $ sudo mkswap /swapfile


    3) Enable swap:



    $ sudo swapon /swapfile


    To see result you can run free -m or see on htop



    Example: $ sudo free -m



     total usada livre compart. buff/cache disponível
    Mem.: 7664 1052 3436 56 3175 6259
    Swap: 1024 0 1024


    Example: $ sudo swapon --show



    NAME TYPE SIZE USED PRIO
    /swapfile file 1G 0B -2


    Test please.






    share|improve this answer

























    • no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

      – محمد مصطفي
      Mar 8 at 20:53











    • i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

      – محمد مصطفي
      Mar 8 at 20:54











    • @محمدمصطفي sory, test again

      – Bulfaitelo
      Mar 8 at 21:13











    • I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

      – محمد مصطفي
      Mar 9 at 4:56











    • Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

      – محمد مصطفي
      Mar 9 at 4:56















    2














    Your problem is related to the probable fact of having only 1gb of RAM and not having memory swap, so let's create and enable it to take some time off at the time of composer execution.



    Folow this steps:



    1) Creating 1gb memory swapfile:



    $ sudo fallocate -l 1G /swapfile

    $ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576



    This command created the /swapfile file with 1GB in size.




    2) Configuring file to swap:



    $ sudo chmod 600 /swapfile

    $ sudo mkswap /swapfile


    3) Enable swap:



    $ sudo swapon /swapfile


    To see result you can run free -m or see on htop



    Example: $ sudo free -m



     total usada livre compart. buff/cache disponível
    Mem.: 7664 1052 3436 56 3175 6259
    Swap: 1024 0 1024


    Example: $ sudo swapon --show



    NAME TYPE SIZE USED PRIO
    /swapfile file 1G 0B -2


    Test please.






    share|improve this answer

























    • no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

      – محمد مصطفي
      Mar 8 at 20:53











    • i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

      – محمد مصطفي
      Mar 8 at 20:54











    • @محمدمصطفي sory, test again

      – Bulfaitelo
      Mar 8 at 21:13











    • I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

      – محمد مصطفي
      Mar 9 at 4:56











    • Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

      – محمد مصطفي
      Mar 9 at 4:56













    2












    2








    2







    Your problem is related to the probable fact of having only 1gb of RAM and not having memory swap, so let's create and enable it to take some time off at the time of composer execution.



    Folow this steps:



    1) Creating 1gb memory swapfile:



    $ sudo fallocate -l 1G /swapfile

    $ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576



    This command created the /swapfile file with 1GB in size.




    2) Configuring file to swap:



    $ sudo chmod 600 /swapfile

    $ sudo mkswap /swapfile


    3) Enable swap:



    $ sudo swapon /swapfile


    To see result you can run free -m or see on htop



    Example: $ sudo free -m



     total usada livre compart. buff/cache disponível
    Mem.: 7664 1052 3436 56 3175 6259
    Swap: 1024 0 1024


    Example: $ sudo swapon --show



    NAME TYPE SIZE USED PRIO
    /swapfile file 1G 0B -2


    Test please.






    share|improve this answer















    Your problem is related to the probable fact of having only 1gb of RAM and not having memory swap, so let's create and enable it to take some time off at the time of composer execution.



    Folow this steps:



    1) Creating 1gb memory swapfile:



    $ sudo fallocate -l 1G /swapfile

    $ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576



    This command created the /swapfile file with 1GB in size.




    2) Configuring file to swap:



    $ sudo chmod 600 /swapfile

    $ sudo mkswap /swapfile


    3) Enable swap:



    $ sudo swapon /swapfile


    To see result you can run free -m or see on htop



    Example: $ sudo free -m



     total usada livre compart. buff/cache disponível
    Mem.: 7664 1052 3436 56 3175 6259
    Swap: 1024 0 1024


    Example: $ sudo swapon --show



    NAME TYPE SIZE USED PRIO
    /swapfile file 1G 0B -2


    Test please.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 8 at 21:19

























    answered Mar 8 at 20:44









    BulfaiteloBulfaitelo

    210214




    210214












    • no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

      – محمد مصطفي
      Mar 8 at 20:53











    • i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

      – محمد مصطفي
      Mar 8 at 20:54











    • @محمدمصطفي sory, test again

      – Bulfaitelo
      Mar 8 at 21:13











    • I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

      – محمد مصطفي
      Mar 9 at 4:56











    • Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

      – محمد مصطفي
      Mar 9 at 4:56

















    • no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

      – محمد مصطفي
      Mar 8 at 20:53











    • i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

      – محمد مصطفي
      Mar 8 at 20:54











    • @محمدمصطفي sory, test again

      – Bulfaitelo
      Mar 8 at 21:13











    • I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

      – محمد مصطفي
      Mar 9 at 4:56











    • Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

      – محمد مصطفي
      Mar 9 at 4:56
















    no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

    – محمد مصطفي
    Mar 8 at 20:53





    no@zz607:/var/www/html$ sudo dd if=/dev/zero of=/swapfile 1000000 bs=1024 dd: unrecognized operand ‘1000000’ Try 'dd --help' for more information.

    – محمد مصطفي
    Mar 8 at 20:53













    i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

    – محمد مصطفي
    Mar 8 at 20:54





    i have got this error while run dd if=/dev/zero of=/swapfile 1000000 bs=1024

    – محمد مصطفي
    Mar 8 at 20:54













    @محمدمصطفي sory, test again

    – Bulfaitelo
    Mar 8 at 21:13





    @محمدمصطفي sory, test again

    – Bulfaitelo
    Mar 8 at 21:13













    I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

    – محمد مصطفي
    Mar 9 at 4:56





    I have run all command, but i can't deploy anything I get this error, no@zz607:/var/www/html$ sudo git pull origin master Username for 'https://github.com': username99 Password for 'https://username99@github.com': remote: Enumerating objects: 7, done. remote: Counting objects: 100% (7/7), done. remote: Compressing objects: 100% (1/1), done. remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0 Unpacking objects: 100% (4/4), done. From https://github.com/aekraes/zuxweb * branch master -> FETCH_HEAD 69b12f4..b6ffb44 master -> origin/master

    – محمد مصطفي
    Mar 9 at 4:56













    Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

    – محمد مصطفي
    Mar 9 at 4:56





    Updating 6cdf9f2..b6ffb44 error: Your local changes to the following files would be overwritten by merge: composer.json Please commit your changes or stash them before you merge. Aborting

    – محمد مصطفي
    Mar 9 at 4:56













    1














    You should not call composer require or composer update on production server - you should run it locally, verify that everything works fine, and commit generated composer.lock with your project. Then on production server you need to run only composer install --no-dev - it will install all non-dev dependencies defined in lock file. composer install is much faster and uses fraction of RAM required by composer require or composer update, so it should work fine even on server with low memory. It also gives you more control on version of libraries installed on production server, so you can test app more reliable.






    share|improve this answer



























      1














      You should not call composer require or composer update on production server - you should run it locally, verify that everything works fine, and commit generated composer.lock with your project. Then on production server you need to run only composer install --no-dev - it will install all non-dev dependencies defined in lock file. composer install is much faster and uses fraction of RAM required by composer require or composer update, so it should work fine even on server with low memory. It also gives you more control on version of libraries installed on production server, so you can test app more reliable.






      share|improve this answer

























        1












        1








        1







        You should not call composer require or composer update on production server - you should run it locally, verify that everything works fine, and commit generated composer.lock with your project. Then on production server you need to run only composer install --no-dev - it will install all non-dev dependencies defined in lock file. composer install is much faster and uses fraction of RAM required by composer require or composer update, so it should work fine even on server with low memory. It also gives you more control on version of libraries installed on production server, so you can test app more reliable.






        share|improve this answer













        You should not call composer require or composer update on production server - you should run it locally, verify that everything works fine, and commit generated composer.lock with your project. Then on production server you need to run only composer install --no-dev - it will install all non-dev dependencies defined in lock file. composer install is much faster and uses fraction of RAM required by composer require or composer update, so it should work fine even on server with low memory. It also gives you more control on version of libraries installed on production server, so you can test app more reliable.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 9 at 6:44









        rob006rob006

        11.1k31436




        11.1k31436



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f55069471%2fhow-to-solve-this-error-on-live-server-for-laravel%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

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved