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
  • Fedora Server + Virtualmin

    Chitchat fedora server linux virtualmin
    1
    1 Votes
    1 Posts
    319 Views
    No one has replied
  • 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.
  • 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!
  • MailGun Not Working NodeBB

    Solved Configure mail mailgun
    6
    1 Votes
    6 Posts
    2k Views
    cagatay
    @phenomlab did it i did not create smtp user on mailgun. everything is working now. [image: 6cc6061f-ed5d-41f6-8eb7-5d98f98b3706-image.png]
  • iFramely self host help

    Solved Configure iframely hosting
    10
    9 Votes
    10 Posts
    4k Views
    phenomlab
    @DownPW https://sudonix.com/topic/331/how-to-install-a-self-hosted-instance-of-iframely-for-use-with-nodebb
  • auto create flarum new discussions in wordpress

    Configure flarum wordpress
    2
    1 Votes
    2 Posts
    1k Views
    phenomlab
    @Hari I think you’re referring to this https://sudonix.com/topic/170/creating-posts-from-rss-feeds-in-flarum However, this code was never designed to work with WordPress, but you could leverage the WP-CLI to do something similar without too much effort.
  • installing flarum with plesk

    Solved Configure flarum
    78
    26 Votes
    78 Posts
    39k Views
    Hari
    @phenomlab thanks a lot, have a nice day
  • 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/