Skip to content

installing flarum with plesk

Solved Configure
  • i know as Plesk is not a great software but i want to give it a try.

    while i am trying to install flarum i am getting a few errors, could you suggest how can i install flarum

    i am doing this to experience what complications i may face using flarum in a different environments

    please do not ask me to go to flarum and ask for support, to be honest, they do not know anything about server installation, though few people know they are not so active on flarum

    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# composer create-project flarum/
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]? yes
    Creating a "flarum/" project at "./"
    
                                                                              
      [InvalidArgumentException]                                              
      Project directory "/var/www/vhosts/flatest.tk/httpdocs/" is not empty.  
                                                                              
    
    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
    
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# composer create-project flarum/.
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]? yes
    Creating a "flarum/." project at "./"
    
                                                                               
      [InvalidArgumentException]                                               
      Project directory "/var/www/vhosts/flatest.tk/httpdocs/." is not empty.  
                                                                               
    
    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
    
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# composer create-project flarum/ .
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]? yes
    Creating a "flarum/" project at "./"
    
                                                                               
      [InvalidArgumentException]                                               
      Project directory "/var/www/vhosts/flatest.tk/httpdocs/." is not empty.  
                                                                               
    
    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
    
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# composer create-project flarum/flarum
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]? yes
    Creating a "flarum/flarum" project at "./flarum"
    Installing flarum/flarum (v1.2.0)
      - Downloading flarum/flarum (v1.2.0)
      - Installing flarum/flarum (v1.2.0): Extracting archive
    Created project in /var/www/vhosts/flatest.tk/httpdocs/flarum
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - s9e/text-formatter[2.3.6, ..., 2.11.0] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
        - flarum/core v1.2.0 requires s9e/text-formatter ^2.3.6 -> satisfiable by s9e/text-formatter[2.3.6, ..., 2.11.0].
        - Root composer.json requires flarum/core ^1.2 -> satisfiable by flarum/core[v1.2.0].
    
    To enable extensions, verify that they are enabled in your .ini files:
        - /etc/php/7.4/cli/php.ini
        - /etc/php/7.4/cli/conf.d/10-opcache.ini
        - /etc/php/7.4/cli/conf.d/10-pdo.ini
        - /etc/php/7.4/cli/conf.d/20-calendar.ini
        - /etc/php/7.4/cli/conf.d/20-ctype.ini
        - /etc/php/7.4/cli/conf.d/20-exif.ini
        - /etc/php/7.4/cli/conf.d/20-ffi.ini
        - /etc/php/7.4/cli/conf.d/20-fileinfo.ini
        - /etc/php/7.4/cli/conf.d/20-ftp.ini
        - /etc/php/7.4/cli/conf.d/20-gettext.ini
        - /etc/php/7.4/cli/conf.d/20-iconv.ini
        - /etc/php/7.4/cli/conf.d/20-json.ini
        - /etc/php/7.4/cli/conf.d/20-phar.ini
        - /etc/php/7.4/cli/conf.d/20-posix.ini
        - /etc/php/7.4/cli/conf.d/20-readline.ini
        - /etc/php/7.4/cli/conf.d/20-shmop.ini
        - /etc/php/7.4/cli/conf.d/20-sockets.ini
        - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini
        - /etc/php/7.4/cli/conf.d/20-sysvsem.ini
        - /etc/php/7.4/cli/conf.d/20-sysvshm.ini
        - /etc/php/7.4/cli/conf.d/20-tokenizer.ini
    You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
    Alternatively, you can run Composer with `--ignore-platform-req=ext-dom` to temporarily ignore these required extensions.
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# php flarum info
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs# composer require s9e/text-formatter
    Do not run Composer as root/super user! See https://getcomposer.org/root for details
    Continue as root/super user [yes]? yes
    
    Installation failed, deleting ./composer.json.
    
                                                                                                                              
      [RuntimeException]                                                                                                      
      No composer.json present in the current directory (./composer.json), this may be the cause of the following exception.  
                                                                                                                              
    
                                                                                                                            
      [InvalidArgumentException]                                                                                            
      Package s9e/text-formatter has requirements incompatible with your PHP version, PHP extensions and Composer version:  
        - s9e/text-formatter 2.11.0 requires ext-dom * but it is not present.                                               
                                                                                                                            
    
    require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
    
    root@amazing-hellman:/var/www/vhosts/flatest.tk/httpdocs#
    
  • now i understood, the great plesk index.html file not letting to load the flarum after deleting it flarum got loaded without doing any Nginx or apache settings

  • @Hari Hi, it’s not that i do not want to continue this conversation here , i just found something meanwhile i don’t want to disturb you sir so i have deleted temporarily 🙂

    somehow i figured out proper way to install plesk is really confusing during the initial setup

    i have used pcokethold to download and install

    https://github.com/UvUno/pockethold

    https://discuss.flarum.org/d/25320-plesk-installing-guide/

    just now i have installed flarum using Plesk i am searching to change nginx setting 😄 but it’s pretty hard still searching where to define flarum path

    where and how do i find this file in plesk?

    d9a7370c-5bd9-4865-88ac-bea7c659d915-image.png

    edit: looks like i need to use SHFTP or FTP to view these file. unable to view in plesk file manager

    11e96bb3-e731-48e8-8f7c-4979dc9ecbb1-image.png

    @phenomlab

  • 😢 still trying to edit nginx file

    170dea61-1e85-4bf1-845d-295fa2d5f0aa-image.png

  • @Hari the reason why you get that message is because the target directory isn’t empty. Remove all contents, and try again.

  • @phenomlab should i need to try to access from root or my domain directory?

    how to check my plesk is using ngix or apache?

  • i have installed it but for some reason, DNS is not getting updated

    flarumtest.tk i will check this later after 24hr

    deleted old domain flatest.tk

  • @Hari Flarum will 100% work on Plesk, but as I alluded to in a previous thread, it’s not a simple exercise. Installing Flarum using Pocket Hold isn’t necessary as you should be able to complete the entire installation process using SSH without issue.

    Plesk will use Apache and also leverage NGINX as a reverse proxy. For some time, I ran a Flarum installation using Plesk, but it’s very limiting in the sense that you have very little control over NGINX itself.

  • @phenomlab I completely agree, as i can see how complicated it is. i just want to test, explore and learn

    it’s not detecting flarum i need to include flarum path, i did not understand earlier suggestions at the same time bit confused too, could you rephrase and tell me where can i go and do changes?

  • now i understood, the great plesk index.html file not letting to load the flarum after deleting it flarum got loaded without doing any Nginx or apache settings

  • Hariundefined Hari has marked this topic as solved on
  • Hariundefined Hari has marked this topic as unsolved on
  • finally got it running but i am getting these errors how to fix them?

    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# php flarum info
    PHP Fatal error:  Uncaught PDOException: could not find driver in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
    Stack trace:
    #0 /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(40): PDO->__construct()
    #1 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct()
    #2 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection()
    #3 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/MySqlConnector.php(24): Illuminate\Database\Connectors\Connector->createConnection()
    #4 /var/www/vhosts/test.tk/httpdocs/vendor/illuminate/database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector->connect()
    #5 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connector in /var/www/vhosts/test.tk/httpdocs/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php on line 18
    root@amazing-hellman:/var/www/vhosts/test.tk/httpdocs# 
    
  • @Hari That looks like the php-mysql extension is not installed, or not loaded for the PHP version you are using.

  • i want to learn these things

    • change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    • instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    • update composer to v2 for my domain via SSH.

    @phenomlab said in installing flarum with plesk:

    @Hari Flarum will 100% work on Plesk, but as I alluded to in a previous thread, it’s not a simple exercise. Installing Flarum using Pocket Hold isn’t necessary as you should be able to complete the entire installation process using SSH without issue.

    i don’t know the reason but i am unable to install any extensions or flarum using SSH that is the reason i had to use pocket hold

  • Hariundefined Hari has marked this topic as solved on
  • @Hari My responses below

    change PHP version to 8 at the server level and also for my domain in Plesk using SSH

    PHP 8.x has been available in Plesk since October 2021. There’s no need to change this using SSH, and it’s actually not recommended. The entire point of Plesk is to manage this using the portal - see below

    https://support.plesk.com/hc/en-us/articles/115000769793

    instead of maria DB i want to use MySQL as default, how can i do that? is it really possible? without a docker or any other things (since i am getting those SQL errors as shown in the earlier reply want to switch to MySQL from MariaDB)

    Possible, yes - although it’s usually the other way round in the sense that people want to replace MySQL with MariaDB

    https://www.plesk.com/blog/product-technology/mysql-vs-mariadb/

    update composer to v2 for my domain via SSH.

    You should take the same route as is advertised here

    https://getcomposer.org/download/

  • @phenomlab oh i see in that case i think my old backup is causing the issues regarding MySQL and PHP versions. i will try fresh installation now.

  • @Hari Ok. Let me know.

  • @phenomlab

    i have installed and set my project settings to PHP 8 but CLI is not updating to 8.0

    f0ec177a-355a-4321-9095-1e8a5889dc31-image.png

    should i try this?

    https://talk.plesk.com/threads/set-default-php-version-for-command-line.345940/

    407d76d6-2f86-4303-a2f9-0e9fdbc16b4c-image.png

  • @Hari What version of Plesk do you have ? You should be able to install this using the links I posted earlier ?

  • @phenomlab

    Plesk Obsidian Version 18.0.41

    acfd0388-0760-4f77-826d-38d063b053ac-image.png

    domain settings

    596f60af-adaa-4e8a-bf52-45c6608812fa-image.png

  • @Hari What’s the output of php -v from CLI ?


Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation💗