Discover Centmin Mod today
Register Now

WHMCS Howto

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Jota, Oct 20, 2014.

  1. Jota

    Jota Member

    78
    18
    8
    Oct 9, 2014
    Barcelona
    Ratings:
    +20
    Local Time:
    5:34 PM
    Helo, any interesting Howto for installing WHMCS ?
    I saw one post link but doesn't work :(

    thanks :)

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:34 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    unfortunately not, Centmin Mod is provided as is, so specific Nginx configs are up to end users themselves :)
     
  3. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:34 PM
    1.91
    10.0.19
    @Jota I have WHMCS installed and running on centminmod works a treat and has made my install of WHMCS site a lot quicker than using apache. The install is basically the same as the apache install. There are around 6 maybe a couple more rewrite rules you need to add to the vhost to get the announcements etc... working. I can supply those if you need them.

    You will also need to install ioncube. Theres a script on the forums that @eva2000 has put together for this.

    Hope that helps (y)
     
  4. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:34 PM
    Mainline
    10.2
    How about adding new costumers? Adding new domain? Is it handle by WHMCS also? :)
     
  5. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:34 PM
    1.91
    10.0.19
    I use it for my main WHMCS install for clients which uses a module to my main solus master. I don't use it for web hosting. Cant help on that front :woot:
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:34 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. Jota

    Jota Member

    78
    18
    8
    Oct 9, 2014
    Barcelona
    Ratings:
    +20
    Local Time:
    5:34 PM
    Very interesting Steve ! I already installed it in a 512MBs SSD VPS with cPanel (15 days trial), softaculous, a little of optimization and It works pretty fast. Also, I have the nice auto-upgrate option enabled in Softaculous ..... I was to lazy to work on this and also needed to do it fast.

    Anyway, for the next time, can u send me those rewrite rules please? thanks a lot ! :)
     
  8. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:34 PM
    1.91
    10.0.19
    @Jota

    Good news :) I shall post them here as they may be handy to other users - the rewrite rules you would need for the announcements to work. These would need to be added to the "nginx vhost" for the WHMCS install

    # Announcements
    rewrite ^/announcements/([0-9]+)/[a-zA-Z0-9-]+.html$ /./announcements.php?id=$1 last;
    rewrite ^/announcements$ /./announcements.php last;

    # Downloads
    rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last;
    rewrite ^/downloads$ /./downloads.php last;

    # Knowledgebase
    rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9-]+.html$ /./knowledgebase.php?action=displayarticle&id=$1 last;
    rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /./knowledgebase.php?action=displaycat&catid=$1 last;
    rewrite ^/knowledgebase$ /./knowledgebase.php last;

    Steve:geek:
     
  9. xaitmi

    xaitmi Member

    35
    3
    8
    Jan 18, 2015
    Ratings:
    +3
    Local Time:
    10:34 AM
    When you installed WHMCS did you encounter this error? I opened a ticket with WHMCS about it as the error page said to do so.

    This was a fresh WHMCS install.

    File: upgrade362.sql
    Line 3 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaccounts'
    Line 4 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaccounts'
    Line 5 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaccounts'
    Line 6 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaccounts'
    Line 9 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbladdons'
    Line 11 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbladminlog'
    Line 12 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbladminperms'
    Line 14 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbladmins'
    Line 16 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaffiliates'
    Line 17 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaffiliates'
    Line 18 - Incorrect table definition; there can be only one auto column and it must be defined as a key
    Line 21 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaffiliatesaccounts'
    Line 23 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaffiliateshistory'
    Line 25 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblaffiliatespending'
    Line 27 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblannouncements'
    Line 29 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblbannedemails'
    Line 31 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblbannedips'
    Line 33 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblbrowserlinks'
    Line 35 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcalendar'
    Line 37 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcancelrequests'
    Line 39 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblclients'
    Line 40 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblclients'
    Line 41 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblconfiguration'
    Line 42 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcontacts'
    Line 44 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcontacts'
    Line 47 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcustomfields'
    Line 49 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblcustomfieldsvalues'
    Line 51 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomainpricing'
    Line 52 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomainpricing'
    Line 54 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomains'
    Line 55 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomains'
    Line 56 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomains'
    Line 57 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomains'
    Line 59 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldomainsadditionalfields'
    Line 61 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldownloadcats'
    Line 63 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbldownloads'
    Line 66 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblemails'
    Line 68 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblemailtemplates'
    Line 69 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblemailtemplates'
    Line 71 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblfraud'
    Line 76 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 77 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 78 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 79 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 80 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 81 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 82 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhosting'
    Line 85 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhostingaddons'
    Line 86 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhostingaddons'
    Line 87 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhostingaddons'
    Line 89 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblhostingconfigoptions'
    Line 94 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblinvoices'
    Line 98 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblknowledgebasecats'
    Line 100 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbllinks'
    Line 102 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblnotes'
    Line 104 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblorders'
    Line 105 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblorders'
    Line 106 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblorders'
    Line 107 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblorders'
    Line 109 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblpaymentgateways'
    Line 110 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblpaymentgateways'
    Line 114 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblproductconfigoptionssub'
    Line 115 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblproductgroups'
    Line 118 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblproducts'
    Line 119 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblproducts'
    Line 121 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblpromotions'
    Line 123 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblregistrars'
    Line 126 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltax'
    Line 129 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblticketdepartments'
    Line 131 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblticketlog'
    Line 134 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblticketnotes'
    Line 136 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblticketpredefinedcats'
    Line 139 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblticketreplies'
    Line 141 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltickets'
    Line 142 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltickets'
    Line 143 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltickets'
    Line 144 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltickets'
    Line 148 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tbltodolist'
    Line 150 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblupgrades'
    Line 151 - INDEX command denied to user 'SQLUSERNAME'@'localhost' for table 'tblupgrades'


    Strange part is , my user has the INDEX privilege. I used the mysqladmin shell based addon to create my user and database
    mysqladmin_shell.sh Shell based Addon | Centmin Mod Community

    --

    MariaDB [mysql]> show grants for 'SQLUSERNAME'@'localhost';
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | Grants for billing@localhost |
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'billing'@'localhost' IDENTIFIED BY PASSWORD '*REMOVED*' |
    | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE ON `whmcs`.* TO 'SQLUSERNAME'@'localhost' |
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
     
  10. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:34 PM
    1.91
    10.0.19
    By looking at the denied messages, I would say the DB user doesn't have the the correct access to your whmcs database.
    Remove the user and add it using the below code

    Code:
    GRANT ALL PRIVILEGES ON databasename.* TO "databaseuser"@"localhost" IDENTIFIED BY "password";
    
    Then run
    
    FLUSH PRIVILEGES;
     
  11. xaitmi

    xaitmi Member

    35
    3
    8
    Jan 18, 2015
    Ratings:
    +3
    Local Time:
    10:34 AM
    That fixed it. Thanks
     
  12. mgaidia

    mgaidia New Member

    23
    11
    3
    Dec 4, 2014
    Austria
    Ratings:
    +12
    Local Time:
    4:34 PM
    1.7.9
    5.5.41
    Hello Steve,

    Are these rules related to a redirection loop ?
     
  13. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:34 PM
    1.91
    10.0.19
    Hello,

    These rules are to get the announcements, knowledge base and downloads working other wise if I remember correctly those sections will 404.

    Any redirection loops could be an issue with your vhost for the domain, I would suspect.
     
    Last edited: Jan 25, 2015
  14. mgaidia

    mgaidia New Member

    23
    11
    3
    Dec 4, 2014
    Austria
    Ratings:
    +12
    Local Time:
    4:34 PM
    1.7.9
    5.5.41
    Are you using ssl on your whmcs setup ? I am asking because I am having an issue with mine as you can see here:
    whmcs, ss and redirect loop | Centmin Mod Community