Join the community today
Become a Member

Jamroom

Discussion in 'Blogs & CMS usage' started by Jimmy, Nov 28, 2015.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    I'm about to figure out the vhost file for Jamroom. Jamroom is one of the best CMSs in my opinion. The script is over 12 years old and has a development team which is one of the best I've seen.

    They've recently released Jamroom v5 which was a total re-write of the codebase.

    Cross Posted on Jamroom.net
    Jamroom And Nginx Centmin Mod LEMP Stack - The Jamroom Network | Jamroom

    Main Site: Community Web Content Management System | Jamroom
    Documentation: Documentation - The Jamroom Network | Jamroom
    Modules: Jamroom 5 Modules | Jamroom

    CUSTOM CONFIG FILE FOR CENTMINMOD JAMROOM HERE
    Jamroom 5+ Nginx configuration file for use with Centminmod. · GitHub

    Some of the things I like about Jamroom:

    1. Modular. You can create a module for just about anything you want.
    2. Documentation: They've taken the time to write good docs and provide excellent info videos.
    3. Mobile backend / front-end: I haven't found many scripts which have modules for entire mobile back-ends - Jamroom has it. Proxima | Jamroom
    4. Cloud: Need to scale your install over 2, 5, 25, 2000 servers, you can do it easily with Jamroom. Jamroom Cloud | Jamroom
    5. Profile Domains: map domain names to specific profiles in your Jamroom.
    6. Modules for just about everything: forum, store, support center, documentation, audio, video, etc. Since everything is modular, it's easy to create a new features by creating a new modules based on an existing module.
    7. Smarty.
    8. Updates: Update the entire script remotely from the backend of your site (or upload) your choice.
    9. FREE. Yup, the core is free. Tons of modules are FREE. There are paid modules, but you can get up and running with pretty much the free stuff.

    Excellent support. They are always willing to answer even the dumbest questions and not make you feel like an idiot for asking the question.


    Check it out, I don't work for them, but I'm a big fan. Once I get the vhost file finished, I'll post it here. They run all Apache but are looking forward to someone testing Jamroom out on Nginx.
     
    Last edited: Feb 15, 2016
  2. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    I'm having some issues getting things up and running with Jamroom. I was wondering if anyone could help me with the conf file.

    The htaccess file is pretty straight forward. Everything is routed though a file called router.php. When everything is uploaded to the server and you enter in the base address, it should send everything through the router leading to the install.php file located in the root of the directory.

    Here is the htaccess file
    Code:
    # Jamroom 5 Apache .htaccess file
    DirectoryIndex index.html index.php sitemap.xml modules/jrCore/router.php
    
    Options +FollowSymLinks
    Options -MultiViews -Indexes
    
    # Use ETags
    <IfModule mod_headers.c>
    Header unset ETag
    FileETag None
    # Expires for CSS, JS and Images
    <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Expires "Thu, 15 Apr 2018 20:00:00 GMT"
    </FilesMatch>
    </IfModule>
    
    # Compress everything we can
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript text/javascript-x application/javascript
    </IfModule>
    
    # All requests through the router
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ modules/jrCore/router.php?_uri=$1 [NC,L]
    </IfModule>
    I created a conf file based off the one I was working on for IPB. I stripped out most everything that isn't IPB related. I have just this location below. I would figure that it would send everything through the router.php file and allow me to install.
    Code:
       
    location / {
    
    # block common exploits, sql injections etc
    include /usr/local/nginx/conf/block.conf;
    
    # Enables directory listings when index file not found
    # autoindex  on;
    
    # Shows file listing times as local time
    autoindex_localtime on;
    
    try_files  $uri $uri/  $uri/modules/jrCore/router.php?_uri=$args;
    
    }
    Basically, this is what happens:
    • When I hit the main site, 10.0.0.123 in this case, it gives me a 403 error.
    • If I access the install.php file directly via 10.0.0.123/install.php I get the installer screen.

    When I go to 10.0.0.123 is should send me directly to the installer, I shouldn't have to access the install.php file directly.

    I tried another location block, but when I use that Nginx fails to start.

    Code:
    location ^(.*)$ {
        try_files   $uri/modules/jrCore/router.php?_uri=$args;
    }
    I also tried using what is below in the / location block with no luck.
    Code:
    modules/jrCore/router.php?_uri=$1
    I figured it would be pretty simple to set this up, but it's proving a little challenging. If anyone has any suggestions. Please let me know.

    If you want to test it out, you can download the software for free by clicking the "Download for your Server" button on the main page of jamroom.net

    Thanks!
     
  3. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    I appears that if I take the $uri/ out it works.

    Code:
    location / {
    
            # block common exploits, sql injections etc
            include /usr/local/nginx/conf/block.conf;
    
            # Enables directory listings when index file not found
            # autoindex  on;
    
            # Shows file listing times as local time
            autoindex_localtime on;
    
            try_files  $uri $uri/modules/jrCore/router.php?_uri=$args;
    
        }
    Now I'm having an error with the database. ARRR!!!!
     
  4. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    Was having some issues with the last location block. The above worked for the main site, but internal pages didn't work. Ended up with what's below... which appears to work.

    Code:
        location / {
    
            # block common exploits, sql injections etc
            include /usr/local/nginx/conf/block.conf;
    
            # Enables directory listings when index file not found
            # autoindex  on;
    
            # Shows file listing times as local time
            autoindex_localtime on;
    
            try_files  $uri $uri/modules/jrCore/router.php;
         
            rewrite ^(.*)$ /modules/jrCore/router.php?_uri=$1;
    
        }
    Any comments, opinions, or corrections would be greatly appreciated. :D
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    never used Jamroom but that's for sharing your progress and configuration. I am sure it will be beneficial to any user who wants to look at Jamroom :D
     
  6. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    What is your opinion of the location block? I've never had to insert a "rewrite". I was looking over the Nginx official docs and from what I read I can use that. I just wish I had more experience converting htaccess files to nginx configurations.

    Now I'm getting an error with the program writing to the database. I have no idea what the issue is here and there aren't really any developers at Jamroom who use Nginx.... they're all Apache. I'm thinking it might be the way that I have Centminmod setup. So, I'm going to create a new VM today and see if I can get it working on a fresh install.

    Wish me luck!

    If you get a chance @eva2000 you should check out JR. It's a really nice piece of software. It's been around for quite awhile. The JR5 total re-write of the software is one of the best, forward thinking designs I've seen in awhile.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    unfortunately not much free time so JR has to wait.. as such rewrite rule I wouldn't have the foggyist as how JR would use or uses it heh
     
  8. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    @eva2000 is there anything you can think of that would prevent a PHP script from creating InnoDB tables? Seems when I install Jamroom it's only creating the MyISAM tables. The developer runs MariaDB on their servers w/ Apache (with no problems) and noticed in my thread on the Jamroom forum that my install is only creating the MyISAM tables during the install. I'm pretty much using stock Centminmod. Figured I would throw the question your way and see if you know of any setting that I might need to change in Centminmod.

    Thanks for any help you can provide!
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Getting Started Guide step 11

    early MariaDB 5.5 installs had this, MariaDB 10 with 123.08 stable and higher switched to enable InnoDB by default
     
  10. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    That's what I thought. Since it's a fresh install of Centminmod and after looking in the my.cnf I see that InnoDB is enabled. The darn script won't create the InnoDB tables during install. Can't get past that error.
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what's the specific error you are seeing ? MariaDB will only create the mysql engine type that the PHP script and it's defined schema is told to do. So provided default-storage-engine = InnoDB is set, and your PHP script tells mysql to create InnoDB tables, it should do so. This happens only for new tables created since enabling default-storage-engine = InnoDB but not for existing tables already created with MyISAM. You need to convert those MyISAM tables to InnoDB.
     
  12. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    The only error I'm seeing is that that tables aren't available when I look at the front end of the site. I looked at the mysqld.log file and it's not showing any specific errors, was there another log file I should look at?

    Would there be any reason my user doesn't have rights to create the InnoDB tables? Below is what I'm using to grant priv.

    Code:
    GRANT ALL PRIVILEGES ON jr5. * TO 'peachpum'@'localhost';
    
    Here is the JR thread if you want to see my conversation with that dev (if you're curious).
    Nginx Install Dbase Error - The Jamroom Network | Jamroom
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Are all successfully created mysql tables using InnoDB or MyISAM ? are all Jamroom tables suppose to be MyISAM or InnoDB only or a mix of them ? the test command line creation of database table in your thread that succeeds, doesn't show if it's MyISAM or InnoDB after creation ? Unfortunately, no idea why some tables get created and some skipped as it is not usually something on server config side as long as InnoDB default storage engine is properly verified to be set via default-storage-engine = InnoDB
     
  14. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    Right now the script is creating all the MyISAM tables... no problem. The script on install is not creating the InnoDB tables - it's like it's skipping them. The tests Brian (JR lead developer and creator) gave me to run, which all ran with success on both the root and the user being logged in, were InnoDB tables.

    Yes, Jamroom is using mixed MyISAM and InnoDB.
     
    Last edited: Dec 21, 2015
  15. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    FYI - Looks like a user who was installing on their apache machine has the same issue. Seems to be a PHP session error.

    Code:
    PHP Fatal error: Call to undefined function jrUser_session_start() in /home/admin/web/dev-networks.com/public_html/modules/jrCore/router.php on line 90
    Code:
    (2015-12-21T21:55:53+00:00.0.92047900 : 0)-(mem: 9699328)-(pid: 15159)-(ip: 12.34.56.78)-(uri: mysite.com/install.php?action=install)
    Array
    (
        [error] => Query Error: Specified key was too long; max key length is 767 bytes
        [_post] =>
        [query] => CREATE TABLE jr_jrcore_item_key (`_item_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', `key` VARCHAR(128) NOT NULL DEFAULT '', `index` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', `value` VARCHAR(512) NOT NULL DEFAULT '', PRIMARY KEY (`key`,`_item_id`,`index`), INDEX `_item_id` (`_item_id`), INDEX `index` (`index`), INDEX `value` (`value`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci
    )
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod out of box /etc/my.cnf templates should of taken care of that in /etc/my.cnf with
    Code:
    innodb_large_prefix=1
    MySQL :: MySQL 5.6 Reference Manual :: 14.11 InnoDB Startup Options and System Variables
    As to PHP session error could be related to igbinary ? what is your php session handler ?
     
  17. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    I actually tried both, igbinary and php. I have to use php as the session handler for IPB and it defaults to igbinary.
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    What are you using for opcaching ? APC, Xcache or Zend Opcache ?

    output for
    Code:
    php -i | grep session
    php version ?
     
  19. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:40 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you can find igbinary.ini settings file via
    Code:
    php --ini
    edit it at /etc/centminmod/php.d/igbinary.ini

    comment out
    Code:
    session.serialize_handler=igbinary
    to become
    Code:
    ;session.serialize_handler=igbinary
    restart php-fpm
    Code:
    fpmrestart
     
  20. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    2:40 AM
    I'm using Zend Opcache / PHP 5.6.16 for these tests. I actually had to change the session handler before for IPB.

    I believe it's an issue in Jamroom which is cleared up in the newest beta version. I'm about to run a test with that version. If that test fails I'll try to change the handler.