PHP Laravel – do not run composer as root/super user! see https://getcomposer.org/root for details – Solved

Rate this post

PHP Laravel – Do not run Composer as root/super user! – Solved
https://www.itsolutionstuff.com/post/php-laravel-do-not-run-composer-as-root-super-user-solvedexample.html

do not run composer as root/super user! see https://getcomposer.org/root for details – Problem – composer root with creating laravel project – do not run Composer as root/super user – “Do not run Composer as root/super user!”

do not run composer as root/super user! see https://getcomposer.org/root for details

Issue:
Do not run Composer as root/super user! See https://getcomposer.org/root for details Installing laravel/laravel (v5.5.28) – Installing laravel/laravel (v5.5.28): Loading from cache Created project in /mnt/c/xampp/htdocs/laravel

Read Also:  Paypal Recurring Payments PHP REST API Example

composer create-project --ignore-platform-reqs --prefer-dist laravel/laravel pakainfo_v1

Solution:

The “Do not run Composer as root/super user!” is only a warning. You are trying to run it in /home/pakainfo_v1 but perhaps your laravel web project is in /var/www/html/pakainfo_v1 (depending on your OS as well as web server config)

you required to simply allow some permission to super user for composer command like bellow.

export COMPOSER_ALLOW_SUPERUSER=1; composer show;

Free Live Chat for Any Issue

Don’t miss : Mysql Connect To Remote Database

Read Also:  How to Schedule Cron Jobs in laravel?

after that you can run or execute composer and it works fine:

run composer

composer

Download

I hope you get an idea about do not run composer as root/super user!.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.