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

Solved How to use one PHP binary for multi servers?

Discussion in 'Help' started by AlexWalker_, Jul 22, 2017.

  1. AlexWalker_

    AlexWalker_ Spider

    Messages:
    12
    GitHub:
    superalecs
    Hello, I want to use only one php binary for 3 servers, not 3 in the same VPS, anyone can help me how to do that?
    like this:
    - bin (PHP binary folder)
    - server1
    - server2
    - server3
    and not
    - server1 with bin
    - server2 with bin
    - server3 with bin

    I wish you'll understand
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Make php available system wide and just use php ias command or specify an absolute path to the php binaries inside your executable start file.
     
  3. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    You mean you want to use a single PHP binary for 3 pocketmine servers running on the same VPS, is that correct? If so, what @SalmonDE said above, or set the PHP paths to point at the same PHP installation in each start.sh, if you're using Linux. If you aren't also running a web server you could add the PHP binary's path to PATH instead, then you wouldn't need to specify any path for the php binary in the start.sh files.
     
    Last edited: Jul 23, 2017
  4. AlexWalker_

    AlexWalker_ Spider

    Messages:
    12
    GitHub:
    superalecs
    So what I need to edit in start.sh?
     
  5. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    Set the path to PHP here https://github.com/pmmp/PocketMine-MP/blob/master/start.sh#L25 and line 27 in all your start.sh scripts to point at the same binary. There's plenty of tutorials about paths on Google - if you have the folder structure you sketched above, you can just use ../bin/php7/bin/php and with the two dots that will look for the bin folder one level higher.
     
    Aericio, jasonwynn10 and EdwardHamHam like this.
  6. AlexWalker_

    AlexWalker_ Spider

    Messages:
    12
    GitHub:
    superalecs
    It works, Thank you very much!
     
  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.