Skip to content

installing flarum with plesk

Solved Configure
78 2 38.9k 1
  • @Hari No. Plesk typically installs PHP in /opt/plesk/php/7.4/bin so what is the output of /opt/plesk/php/7.4/bin/php -v ?

    Should be

    PHP 7.4.28 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd.
        with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
    

    Therefore, PHP 8 should be in /opt/plesk/php/8.0/bin, so you should also get output from /opt/plesk/php/8.0/bin/php -v as below

    PHP 8.0.16 (cli) (built: Feb 18 2022 07:57:20) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.16, Copyright (c) Zend Technologies
        with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies
    

    This means that because your environment variable is missing, you have to specify the full path to PHP 8, so instead of just php, you need /opt/plesk/php/8.0/bin/php

    Welcome to Plesk 😕

    wrote on last edited by
    #25
  • wrote on last edited by
    #26

    @Hari sorry - that should be /opt/plesk/php/8.0/bin/php. Previous post corrected.

  • @Hari sorry - that should be /opt/plesk/php/8.0/bin/php. Previous post corrected.

    wrote on last edited by Hari
    #27

    @phenomlab i installed Plesk directly from DO app area… it’s free up to 2-3 domains.

    after running opt command the screen got stuck

  • @phenomlab i installed Plesk directly from DO app area… it’s free up to 2-3 domains.

    after running opt command the screen got stuck

    wrote on last edited by
    #28

    @Hari That’s expected because you are now running PHP as a daemon 🙂 Kill it by pressing CTRL + C (sometimes CTRL + Z or CTRL + X), then issue the correct command of /opt/plesk/php/8.0/bin/php -v which should spit out the version used in CLI.

  • @Hari That’s expected because you are now running PHP as a daemon 🙂 Kill it by pressing CTRL + C (sometimes CTRL + Z or CTRL + X), then issue the correct command of /opt/plesk/php/8.0/bin/php -v which should spit out the version used in CLI.

    wrote on last edited by
    #29
  • wrote on last edited by
    #30

    @Hari There you go…!

  • @Hari There you go…!

    wrote on last edited by
    #31

    @phenomlab ok, now when i went in the domain folder and try i am getting an error

    6d1fbd06-e88e-47f6-b35a-6a46f8380331-image.png

  • @Hari There you go…!

    wrote on last edited by
    #32

    @Hari so if you wanted to run a particular PHP file, or command, you’d have to use /opt/plesk/php/8.0/bin/php flarum cache:clear for example.

    Now you know why I hate Plesk

  • @phenomlab ok, now when i went in the domain folder and try i am getting an error

    6d1fbd06-e88e-47f6-b35a-6a46f8380331-image.png

    wrote on last edited by
    #33

    @Hari said in installing flarum with plesk:

    @phenomlab ok, now when i went in the domain folder and try i am getting an error

    6d1fbd06-e88e-47f6-b35a-6a46f8380331-image.png

    Yes, you have to understand that this expected. You cannot just run php and expect it to work like that in Plesk, because it won’t.

  • @Hari said in installing flarum with plesk:

    @phenomlab ok, now when i went in the domain folder and try i am getting an error

    6d1fbd06-e88e-47f6-b35a-6a46f8380331-image.png

    Yes, you have to understand that this expected. You cannot just run php and expect it to work like that in Plesk, because it won’t.

    wrote on last edited by
    #34

    @phenomlab ohoo, in that case, i can not run flarum commands when i am in the domain folder

    do i need to create any bash or some kind of profile for that?

    or shall i just try to install by giving exact path of my domain folder while installing flarum from root

  • @Hari said in installing flarum with plesk:

    @phenomlab ok, now when i went in the domain folder and try i am getting an error

    6d1fbd06-e88e-47f6-b35a-6a46f8380331-image.png

    Yes, you have to understand that this expected. You cannot just run php and expect it to work like that in Plesk, because it won’t.

    wrote on last edited by
    #35

    @phenomlab Seeing as this is a testing box, you could try apt install php8.0-cli and see where that takes you, but I’m guessing it’s not the silver bullet you are looking for.

  • @phenomlab ohoo, in that case, i can not run flarum commands when i am in the domain folder

    do i need to create any bash or some kind of profile for that?

    or shall i just try to install by giving exact path of my domain folder while installing flarum from root

    wrote on last edited by
    #36

    @Hari

    in that case, i can not run flarum commands when i am in the domain folder

    Yes, you can, but you have to specify the full path to PHP each time.

  • @phenomlab ohoo, in that case, i can not run flarum commands when i am in the domain folder

    do i need to create any bash or some kind of profile for that?

    or shall i just try to install by giving exact path of my domain folder while installing flarum from root

    wrote on last edited by
    #37

    @Hari said in installing flarum with plesk:

    flarum from root

    Don’t ever do that. Bad for security. You might as well set 777 on all files and folders 😕

  • @Hari

    in that case, i can not run flarum commands when i am in the domain folder

    Yes, you can, but you have to specify the full path to PHP each time.

    wrote on last edited by
    #38

    @phenomlab 😢 plesk plesk … lalala

    @phenomlab said in installing flarum with plesk:

    @phenomlab Seeing as this is a testing box, you could try apt install php8.0-cli and see where that takes you, but I’m guessing it’s not the silver bullet you are looking for.

    ad937ab6-f1d9-484f-98f1-43a2661b1b64-image.png

  • @phenomlab 😢 plesk plesk … lalala

    @phenomlab said in installing flarum with plesk:

    @phenomlab Seeing as this is a testing box, you could try apt install php8.0-cli and see where that takes you, but I’m guessing it’s not the silver bullet you are looking for.

    ad937ab6-f1d9-484f-98f1-43a2661b1b64-image.png

    wrote on last edited by
    #39

    @Hari that should in fact work !

  • @Hari said in installing flarum with plesk:

    flarum from root

    Don’t ever do that. Bad for security. You might as well set 777 on all files and folders 😕

    wrote on last edited by
    #40

    @phenomlab that is the problem, its better to use pocket hold and install and update extensions using the Plesk panel.

    but the only problem is installing Redis … is there any way to create user for domain in Plesk and set his CLI to php8 and composer version to 2

    as mentioned in docs Plesk is not using php8 cli this is weird

  • @Hari that should in fact work !

    wrote on last edited by
    #41

    @phenomlab will it work everytime i login or its only valid for this session?

  • @phenomlab will it work everytime i login or its only valid for this session?

    wrote on last edited by
    #42

    @Hari the full path ? Yes.

  • @phenomlab that is the problem, its better to use pocket hold and install and update extensions using the Plesk panel.

    but the only problem is installing Redis … is there any way to create user for domain in Plesk and set his CLI to php8 and composer version to 2

    as mentioned in docs Plesk is not using php8 cli this is weird

    wrote on last edited by
    #43

    @Hari yes. Take my advice and avoid Plesk. It’s sh**. Can’t be much plainer than that.

  • @Hari the full path ? Yes.

    wrote on last edited by
    #44

    @phenomlab the php 8 CLI


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics