Skip to content

Issues getting Flarum to work on new host

Solved Configure
65 4 29.6k 1
  • wrote on last edited by phenomlab
    #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?

  • 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” 🙂


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
  • Error certification on virtualmin/Nginx

    Solved Linux cert virtualmin nginx
    17
    2
    0 Votes
    17 Posts
    7k Views
    phenomlab
    @DownPW anytime
  • 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/
  • 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]
  • 24 Votes
    29 Posts
    15k Views
    crazycells
    @DownPW it is the second post of this thread.
  • how to use CF tunnels with Virtualmin?

    Solved Configure cf tunnel cloudflare virtualmin
    10
    3 Votes
    10 Posts
    4k Views
    phenomlab
    @Hari DDoS protection is not just a switch, or one component. It’s a collection of different and often disparate technologies that when grouped together form the basis of a combined toolset that can be used in defence. Typically these consist of IDS (Instrusion Detection System) and IPS (Intrusion Prevention System) components that detect irregularities in network traffic, and will take decisive action based on predefined rulesets, or in the case of more modern systems, AI and ML. Traditional “traffic shaping” technology is also deployed, so if an attack cannot be easily identified as malicious, the bandwidth available to that connection is severely limited to nothing more than a trickle rather than a full flow. Years ago, ISP’s used traffic shaping (also called “policers”) as an effective means of stopping applications such as BearShare, eDonkey, Napster, and other P2P based sharing systems from functioning correctly - essentially reducing the “appeal” of distributing and seeding illegal downloads. This was essentially the ISP’s way of saying “stop what you are doing please” without actually pulling the plug. These days, DDoS attacks are designed to overwhelm - not assume control of - webservers and other public facing components. It’s rare for small entities to be attacked unless there is some form of political agenda driven by your site or product. A classic example is governmental institutions or lawmakers who effectively are classed as “enforcers” and those who disagree are effectively making a statement in the form of Denial of Service. DDoS protection is effectively the responsibility of the hosting provider, but you shouldn’t just assume that they will protect you or your site. Their responsibility stops at their infrastructure, so it’s then up to you too decide how you full the gap in between your host and the website. Typically, you’d leverage something like Imunify360 which you can get for Plesk (and something I’d strongly recommend) but it’s not free, and is a paid (not expensive per month) subscription. If you want to use VirtualMin then there are a variety of tools readily available out of the box such as firewalls and fail2ban.
  • installing flarum with plesk

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