Skip to content

Issues getting Flarum to work on new host

Solved Configure
65 4 29.6k 1
  • @phenomlab

    localhost/		https://ip/phpmyadmin/index.php?route=/server/sql
    Your SQL query has been executed successfully.
    
    show create table mysql.user;
    
    
    
    user	CREATE TABLE `user` (
      `Host` char(255) CHARACTER...
    

    as root i could not able to grant permission to a user

    cf1f3c2b-cf98-4755-bb5e-9f47d4211f93-image.png

    wrote on last edited by
    #6

    @Hari This doesn’t look right to me. Can you PM the server details plus a username and password I can use to access and take a look ?

  • @Hari This doesn’t look right to me. Can you PM the server details plus a username and password I can use to access and take a look ?

    wrote on last edited by Hari
    #7

    @phenomlab sure, i have deleted that user and created a new DB and user “askDO” shared logins via PM

    lol, meanwhile i am trying to install composer 😄

    root@ask public_html]# composer require blomastra/flarum-redis:*
    sh: 1: composer: not found
    [root@ask public_html]# mv composer.phar /usr/local/bin/composer
    mv: cannot stat 'composer.phar': No such file or directory
    [root@ask public_html]# php composer-setup.php --install-dir=bin --filename=composer
    Could not open input file: composer-setup.php
    [root@ask public_html]# php composer-setup.php --install-dir=bin --filename=composer
    Could not open input file: composer-setup.php
    [root@ask public_html]#
    
  • @phenomlab sure, i have deleted that user and created a new DB and user “askDO” shared logins via PM

    lol, meanwhile i am trying to install composer 😄

    root@ask public_html]# composer require blomastra/flarum-redis:*
    sh: 1: composer: not found
    [root@ask public_html]# mv composer.phar /usr/local/bin/composer
    mv: cannot stat 'composer.phar': No such file or directory
    [root@ask public_html]# php composer-setup.php --install-dir=bin --filename=composer
    Could not open input file: composer-setup.php
    [root@ask public_html]# php composer-setup.php --install-dir=bin --filename=composer
    Could not open input file: composer-setup.php
    [root@ask public_html]#
    
    wrote on last edited by
    #8

    @Hari said in how can i create a mysql user in virtualmin:

    sure, i have deleted that user and created a new DB and user “askDO” shared logins via PM

    Everything looks to be in order. The user askDO seems to have full access to that database. Is this now working ?

  • @Hari said in how can i create a mysql user in virtualmin:

    sure, i have deleted that user and created a new DB and user “askDO” shared logins via PM

    Everything looks to be in order. The user askDO seems to have full access to that database. Is this now working ?

    wrote on last edited by
    #9

    @phenomlab i have changed the domain in flarum config file to IP but it is not working, trying to install composer now

  • @phenomlab i have changed the domain in flarum config file to IP but it is not working, trying to install composer now

    wrote on last edited by
    #10

    @Hari checking

  • @phenomlab i have changed the domain in flarum config file to IP but it is not working, trying to install composer now

    wrote on last edited by
    #11

    @Hari It’s looking for a Redis install. Is this active ?

    [2022-02-16 11:57:15] flarum.ERROR: Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379]

  • @Hari It’s looking for a Redis install. Is this active ?

    [2022-02-16 11:57:15] flarum.ERROR: Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379]

    wrote on last edited by
    #12

    @phenomlab yes, after installing composer i am supposed to install redis

  • @phenomlab i have changed the domain in flarum config file to IP but it is not working, trying to install composer now

    wrote on last edited by phenomlab
    #13

    @Hari Did you install composer as per this guide ?

    https://getcomposer.org/download/

    Essentially, it’s this

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    
  • @Hari Did you install composer as per this guide ?

    https://getcomposer.org/download/

    Essentially, it’s this

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    
    wrote on last edited by
    #14

    @phenomlab yes,

    caa5c419-1e66-4c44-a62d-7b4b1ad4ff1e-image.png

  • wrote on last edited by phenomlab
    #15

    @Hari It’s not installed

    6ac11845-ecd3-47bc-8584-b4583fa6c582-image.png

    EDIT: Seems it is installed, but not correctly. You should be able to run this simply as composer. However, php composer.phar will work, but it’s clumsy to type…

  • @Hari It’s not installed

    6ac11845-ecd3-47bc-8584-b4583fa6c582-image.png

    EDIT: Seems it is installed, but not correctly. You should be able to run this simply as composer. However, php composer.phar will work, but it’s clumsy to type…

    wrote on last edited by Hari
    #16

    @phenomlab

    i followed these two guides

    php composer.phar

    https://getcomposer.org/download/
    https://getcomposer.org/doc/00-intro.md

    i think i installed it in multiple places root and public_html

    how can i fix it?

  • @phenomlab

    i followed these two guides

    php composer.phar

    https://getcomposer.org/download/
    https://getcomposer.org/doc/00-intro.md

    i think i installed it in multiple places root and public_html

    how can i fix it?

    wrote on last edited by
    #17

    @Hari Ok. Let me have a look at this for you.

  • wrote on last edited by phenomlab
    #18

    @Hari done. You should now be able to run composer directly as any user (preferably not root) inside the public_html directory.

    Essentially, it needs to be installed as php composer-setup.php --install-dir=/usr/bin --filename=composer

  • @Hari done. You should now be able to run composer directly as any user (preferably not root) inside the public_html directory.

    Essentially, it needs to be installed as php composer-setup.php --install-dir=/usr/bin --filename=composer

    wrote on last edited by
    #19

    @phenomlab sir, do i need to move any files now? or did you fix it ?

  • @phenomlab sir, do i need to move any files now? or did you fix it ?

    wrote on last edited by
    #20

    @Hari Fixed. No need to move anything. It should just “work” 🙂

  • wrote on last edited by phenomlab
    #21

    @Hari you can go ahead and use sudo apt install redis-server redis-tools to get Redis up and running now. After that, (hopefully) Flarum should boot.

  • @Hari you can go ahead and use sudo apt install redis-server redis-tools to get Redis up and running now. After that, (hopefully) Flarum should boot.

    wrote on last edited by Hari
    #22

    @phenomlab i should also setup cron jobs now searching

    a8d3cb68-e7e3-4176-aed6-33c0e2a65eda-image.png

  • @phenomlab i should also setup cron jobs now searching

    a8d3cb68-e7e3-4176-aed6-33c0e2a65eda-image.png

    wrote on last edited by phenomlab
    #23
  • wrote on last edited by Hari
    #24

    @phenomlab i have added cron job

    updated the config file but flarum is not running on IP
    when i disable redis its not loading inner pages

    c32c944d-3902-4758-85ad-425509ddac1d-image.png

  • @phenomlab i have added cron job

    updated the config file but flarum is not running on IP
    when i disable redis its not loading inner pages

    c32c944d-3902-4758-85ad-425509ddac1d-image.png

    wrote on last edited by
    #25

    @Hari That’s expected because you didn’t run sudo apt install redis-server redis-tools 🙂
    I’ve just done this, and the site now loads.


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
  • NodeBB: updating Admin details not working

    Solved Configure nodebb admin
    17
    3 Votes
    17 Posts
    5k Views
    phenomlab
    @mventures Ok. No issues
  • Virtualmin Setup DigitalOcean

    Solved Customisation virtualmin digitalocean
    26
    9 Votes
    26 Posts
    13k Views
    phenomlab
    @Hari said in Virtualmin Setup DigitalOcean: i have felt it is very hard to manage Virtualmin the settings are confusing It’s a bit of a learning curve, admittedly, but very powerful and easy to use provided you understand the implications of what you are doing. For example, moving a VirtualMin server to subserver and then back again without changing underlying components that rely on the correct placement of the server, of course it will no longer work.
  • installing flarum with plesk

    Solved Configure flarum
    78
    26 Votes
    78 Posts
    39k Views
    Hari
    @phenomlab thanks a lot, have a nice day
  • how to change flarum configuration from apache to nginx?

    Solved Configure flarum
    3
    0 Votes
    3 Posts
    1k Views
    phenomlab
    See https://sudonix.com/topic/226/issues-getting-flarum-to-work-on-new-host/28?_=1645013723672
  • SSl expired on virtualmin

    Solved Configure virtualmin ubun server ssl
    18
    3 Votes
    18 Posts
    7k Views
    phenomlab
    @justoverclock Not necessarily. You only need to use this if it fails from the Virtualmin window
  • Email issue (virturalmin)

    Solved Hosting virtualmin
    5
    0 Votes
    5 Posts
    2k Views
    JAC
    @gotwf said in Email issue (virturalmin): @jac Typically you want your domain’s MX records to point to FQDN server name, e.g. foo.example.eg % drill stockportcounty.fans mx ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 63911 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN MX ;; ANSWER SECTION: stockportcounty.fans. 600 IN MX 10 stockportcounty.fans. Yours do not. Although a bit more drillin’ and reverse lookup indicates thusly; % drill stockportcounty.fans ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 160 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN A ;; ANSWER SECTION: stockportcounty.fans. 600 IN A 65.108.63.35 ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 127 msec ;; SERVER: 204.8.232.207 ;; WHEN: Sun Oct 10 19:37:02 2021 ;; MSG SIZE rcvd: 54 <kvg@loon:~>% drill -x 65.108.63.35 ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 57802 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; 35.63.108.65.in-addr.arpa. IN PTR ;; ANSWER SECTION: 35.63.108.65.in-addr.arpa. 86400 IN PTR vps.stockportcounty.fans. I think you probably want your mx record to point to vps.stockportcountry.fans. It is important for forward and reverse lookups for MX records jive. Maybe you are looking like a spammer in that they do not? Edit: But at least you have a reverse record, many spammers do not, so that is a big red flag. Thanks for the advice, will look into it all later once back home.
  • Virtualmin Letsencrypt Renewal

    Solved Hosting
    13
    1 Votes
    13 Posts
    6k Views
    phenomlab
    @gotwf said in Virtualmin Letsencrypt Renewal: I favor KISS engineering Then I think you’ll be able to appreciate this https://content.sudonix.com/keep-it-simple-stupid/
  • help me configuring cron job for fof/sitemap - flarum

    Solved Configure
    36
    18 Votes
    36 Posts
    13k Views
    DownPW
    you are too fast