Skip to content

Issues getting Flarum to work on new host

Solved Configure
65 4 29.6k 1
  • i have created a DB and imported DB but i could not find any user assigned to it in PHPmyadmin am i missing anything?

    wrote on last edited by
    #2
  • wrote on last edited by
    #3

    @phenomlab

    Failed to save user : SQL drop user if exists 'asku@ask.domain.com'@'localhost' failed : String 'asku@ask.domain.com' is too long for user name (should be no longer than 32)
    

    looks like my domain name is too big, never thought this will be an a issue 😄 how to handle this?

  • @phenomlab

    Failed to save user : SQL drop user if exists 'asku@ask.domain.com'@'localhost' failed : String 'asku@ask.domain.com' is too long for user name (should be no longer than 32)
    

    looks like my domain name is too big, never thought this will be an a issue 😄 how to handle this?

    wrote on last edited by
    #4

    @Hari Looks like you are attempting to rename the existing user ? I wouldn’t do that.

    Login to MySQL as root, and run

    show create table mysql.user

    What’s the output of that command ?

  • @Hari Looks like you are attempting to rename the existing user ? I wouldn’t do that.

    Login to MySQL as root, and run

    show create table mysql.user

    What’s the output of that command ?

    wrote on last edited by Hari
    #5

    @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

  • @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.


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
  • Getting Eror When Started NodeBB

    Solved Configure bug
    7
    1
    2 Votes
    7 Posts
    2k Views
    cagatay
    @phenomlab yes i did. i deleted one of plugin then it started to work normally.
  • Upgrade issues

    Solved Configure nodebb
    2
    1
    2 Votes
    2 Posts
    1k Views
    DownPW
    Use this code git fetch # Grab the latest code from the NodeBB repository git checkout v3.x git reset --hard origin/v3.x And you will have the latest version without specifying it https://docs.nodebb.org/configuring/upgrade/
  • NodeBB: updating Admin details not working

    Solved Configure nodebb admin
    17
    3 Votes
    17 Posts
    5k Views
    phenomlab
    @mventures Ok. No issues
  • NodeBB: Favicon upload issue

    Solved Configure nodebb favicon
    12
    1
    3 Votes
    12 Posts
    4k Views
    mventures
    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!
  • 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.
  • 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.
  • SASL LOGIN authentication failed: generic failure

    Moved Solved Linux
    5
    0 Votes
    5 Posts
    3k Views
    phenomlab
    @Ash3T I’m going to mark this post as solved as I’ve not heard from you in a while. Let me know if this isn’t the case and you need more help.
  • help me configuring cron job for fof/sitemap - flarum

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