Wednesday, November 6, 2013

My answer to "WAMP + Mongo"

This is my answer to a Question on Support site for LampCMS project


I have wamp + mongo running on my local PC. That's basically my development environment.
You install them separately.
Download Mongodb for Windows, install it, then start it from command line by just launching the mongod from bin directory from the command prompt. Do not just click on mongod file - you must instead open command prompt, cd into the directory where mongod file is located and start it by just typing mongod
Do not close the prompt - just keep it opened for as long as you want your mongo server to run.

You may need to pre-create the c:/data/db directory on your computer. That's where mongo stores database files by default.

Read instructions just to be sure:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/


Then configure your WAMP server using sample config file in Lampcms distribution. In Lampcms in config/!config.ini edit the 'server' setting in MONGO section, like this:
server = "mongodb://127.0.0.1:27017"

That should work for your local mongodb server.

Tuesday, November 5, 2013

My answer to "Mongo DB question in Config"

This is my answer to a Question on Support site for LampCMS project


I will look into that. What I can suggest is to add the 3rd server to your replica set.
From what I understand about mongo replication is that the members of replicate set vote to elect the new primary when old primary goes down.

Read this documentation.

http://docs.mongodb.org/manual/core/replica-set-elections/

From the documentation:

"If you have a three-member replica set, where every member has one vote, the set can elect a primary as long as two members can connect to each other. If two members are unavailable, the remaining member remains a secondary because it cannot connect to a majority of the set's members. If the remaining member is a primary and two members become unavailable, the primary steps down and becomes and secondary."



Friday, October 25, 2013

My answer to "SMF Import"

This is my answer to a Question on Support site for LampCMS project


What do you mean by mergin profile with facebook/twitter? Lampcms already has option for users to connect their FB and Twitter accounts so Questions can be posted to FB/Twitter at the same time you ask a question.

Also links to user's Facebook, Twitter, LinkedIn, Blogger are added to user's profile when they connect their social accounts to Lampcms account.

And of cause once connected you can login with Twitter/FB, Google, LinkedIn login.

Friday, September 27, 2013

My answer to "How to Start the Forum ?"

This is my answer to a Question on Support site for LampCMS project


This means your php installation does not have the 'gd' extension. Do you know how to install or enable the 'gd' extension? It's used for creating the "captcha" image which is used on the registration page.

Friday, September 20, 2013

My answer to "Search Doesn't appear to be searching Titles"

This is my answer to a Question on Support site for LampCMS project


Fist about title search: try searching "searching titles" on this site. You will find this question, confirming that searching by title works.

Second: comments are not added to search index, so searching in comment does not work. This can be changed but will require tweaking indexer and search.

At this time search is powered by MySQL Full text search feature. One thing about MySQL full text search is that it will exclude documents from search results if the results are not unique enough. For example if you have just 3 questions in your new database and 2 of the questiosn have "building widgets" in the title, then searching for 'building widgets' will not return any results because MySQL will consider the results to be too common. I think document must appear in the index in less than 50% of documents to be returned in results.

Read this document:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html

Especially this paragraph:
"The search result is empty because the word "MySQL" is present in at least 50% of the rows. As such, it is effectively treated as a stopword. "

My answer to "lighttpd subdirectory example"

This is my answer to a Question on Support site for LampCMS project


I use lighttpd for hosting this support site and for development I use WAMP at home. So I know it works on Apache and Lighttpd. I have not tried on Nginx myself, just never had time to setup Nginx.

The lighttpd.conf sample file is included with Lampcms distribution, just give it a try. Of cause you must setup php using FPM

Here are some details about FPM
http://php.net/manual/en/install.fpm.php

Saturday, September 7, 2013

My answer to "ACL file for disabling anonymous users to see content"

This is my answer to a Question on Support site for LampCMS project


The viewing of questions and answers is not currently protected by ACL.

What will not logged in user see on the home page? Is user suppose to see list of questions but then clicking on a questions will show some sort of permission error?

If that's what you want you can add this line to the Lampcms/controllers/Viewquestion.php
right about the "protected function main()" line


protected $membersOnly = true;