1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Getting PHP 7.2

Discussion in 'Help' started by Levi, Oct 7, 2017.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    I got the PHP 7.2 from genkins and I'm using it now but I'm getting this:

    CAL] Please initialize composer dependencies before running.
    Restarted 598 times
    [CRITICAL] Composer autoloader not found
    [CRITICAL] Please initialize composer dependencies before running.
    Restarted 599 times
    [CRITICAL] Composer autoloader not found
    [CRITICAL] Please initialize composer dependencies before running.

    I opened the new bin file and I see 2 composer, one is .phar
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    readthedocs!
    anyways, the fix is to execute the following command in the server dir:
    ./bin/composer install
    or alternatively ./bin/php7/bin/php ./bin/composer.phar
     
    Levi likes this.
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    I did

    Code:
    root@vps138039:/home/w# ./bin/composer install
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Composer could not find a composer.json file in /home/w
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    root@vps138039:/home/w#
    
     
  4. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    the server is not in /root why does it say
    Code:
    Do not run Composer as root/super user! See https://getcomposer.org/root for details?
     
  5. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Because you're still running as a root user! The directory doesn't matter, but you have to use another user, other than root.
     
  6. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    how?
     
  7. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    is it dangerous to use root user?
     
  8. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    Yes, with root you can even wipe all your data.
     
    Levi likes this.
  9. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Oh thanks. Is there some tutorial online to switch users but keeping datas?
     
  10. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Use the su - USERNAME command to switch users.
     
  11. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    will I lose or still keep the files from
    PHP:
    root
    user?
     
  12. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    You won't lose anything, it just switches the user account.
     
    Levi likes this.
  13. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    thanks :)
     
  14. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Code:
    root@vps138039:~# su - hi
    No passwd entry for user 'hi'
    root@vps138039:~#
    
     
  15. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Are you sure there a user called hi?
     
  16. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    oh no, how do I create a new user?
     
  17. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    That's only temperarly! You should logout and then login to another user.
    Code:
    adduser username
     
    Levi likes this.
  18. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Well when I added a new user and logged out from root and logged back in using the new user, there was something with permission when I tried to startup the server
     
  19. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Code:
    ouch('/home/pe/server...')
    #2 phar:///home/pe/PocketMine-MP.phar/src/pocketmine/PocketMine.php(197): pocketmine\utils\MainLogger->__construct('/home/pe/server...')
    #3 /home/pe/PocketMine-MP.phar(1): require('phar:///home/pe...')
    #4 {main}
      thrown in phar:///home/pe/PocketMine-MP.phar/src/pocketmine/utils/MainLogger.php on line 54
    Restarted 202 times
    
    Fatal error: Uncaught ErrorException: touch(): Utime failed: Permission denied in phar:///home/pe/PocketMine-MP.phar/src/pocketmine/utils/MainLogger.php:54
    Stack trace:
    #0 [internal function]: pocketmine\{closure}(2, 'touch(): Utime ...', 'phar:///home/pe...', 54, Array)
    #1 phar:///home/pe/PocketMine-MP.phar/src/pocketmine/utils/MainLogger.php(54): touch('/home/pe/server...')
    #2 phar:///home/pe/PocketMine-MP.phar/src/pocketmine/PocketMine.php(197): pocketmine\utils\MainLogger->__construct('/home/pe/server...')
    #3 /home/pe/PocketMine-MP.phar(1): require('phar:///home/pe...')
    #4 {main}
      thrown in phar:///home/pe/PocketMine-MP.phar/src/pocketmine/utils/MainLogger.php on line 54
    Restarted 203 times
    
    
     
  20. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Ok, forget it, switch back to root user (su -) and enter pwd. Then cd into the server directory and do ls there. It looks like your composer.json is missing. You could also just use a phar.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.