Sunday, July 7, 2013

Decent hosting for Lampcms

My Question on Support site for LampCMS project

Hello everybody.

Sometimes people ask me to recommend a good hosting options to host Lampcms.
Just want to share my personal experience with the iweb.com hosting.

About 7 months ago I switched from softlayer to iweb.com because iweb had a much better deal on a dedicated server. I got a dedicated server for $89.00 a month. It has 8Gigs ram and 2 hard drivers about 300 gigs each.

This is enough to a very high traffic Q&A site including having MongoDB installed and Nginx or Lighttpd or Apache server. Since support.lampcms.com gets very low traffic, I can also host other sites on the same server. I actually let my son host minecraft server on it too, so he does not have to pay for any minecraft hosting.

Anyway, I was skeptical at first about iweb, the reviews were mixed - some good, some bad. But now after 7 months of continues uptime I can honestly say that iweb is a pretty good host.

Recently I had an issue where I could not get extra ip addresses to work on the server. I mean they gave me 1 primary and 4 additional addresses when I signed up. I only was using one, but when I tried to start using other ips they were just now working. So I opened a support ticket and turns out they gave me wrong ip address blocks. After some investigation they just gave me different ips and they work.

I was surprised when I was a charge of $18 for their 15 minutes of support time. I thought I did not have to pay for this since the issue was entirely their fault.

So I emailed them and they replied the next day saying that they are agreeing with me and credited my account.

I think they did the right thing.

So now I can feel good about recommending iweb as a good choice for hosting lampcms sites. You get dedicated server, you have to install everything yourself - it only comes with CentOS linux. Make sure you get 64 bit Linux. Then use YUM installer to quickly install MongoDB, Lighttpd.

Then use yum to install libxml and any other library you may need to build your php. Then download the php source and build it yourself using the usual configure, make, make install.

The bottom line is you can get a really nice server for under $100/month. They are running specials from time to time so you can get a server for like $59/month

It is cheaper that Amazon cloud EC2

By the way, the www.lampcms.com is hosted on Google App Engine and it written in JSP and some custom Java Servlet that I wrote. The reason for that is because App Engine is free for small low-traffic sites and it case I have to move supportl.lampcms.com to another server again at least I will not have to move the www.lampcms.com site - it sits comfortably on GAE.
The small custom servlet I wrote just reads the contents of the lampcms.zip file and reads the version file to figure out what is the latest release date and release version to show on download pages.
Another servlet is for streaming the phptest.php so it is downloaded by browser as a file and not just show the source code in the browser.

The rest of the pages are just basic JSP pages, basically just html, no dynamic logic there at all.

PS. I plan to try to install Lampcms on AWS EC2 (the free version of cause), and also I like the OpenShift cloud options, they have a free version of small instance that I think will be enough for hosting a small Q&A site. I'll share my experience with these after I make Lampcms site to run on these cloud hosts.


What about you? Do you have any hosting company that you can recommend for inexpensive dedicated server that can be used for hosting LampCMS site?

Click here to post your reply


My answer to "Adding/changing categories on existing questions"

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


This feature is now available. I added the ability to change category when editing the question. The changes are in the github and also in the latest release on http://www.lampcms.com/download.htm

Thursday, July 4, 2013

My answer to "Adding/changing categories on existing questions"

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


Currently no way to change category. I added the support for categories much later than other features were already written. I guess I just overlooked that one possibility that category may need to be changed.

I''ll add it to feature request now and will work on it shortly.

Saturday, June 29, 2013

My answer to "Adding/replacing Logo in the header"

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


First thing I would recommend is to run your site in debug mode.
When running in debug mode the names of all the templates used in generation of the page are added to html source as html comments.
So just run the site in debug mode, open a page and view source html in the browser. You will see the full path to template files. Then just open the template file and you will be able to edit it.

My answer to "How to completely delete a user"

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


Completely deleting user in production is a really bad idea.
First of all if you delete a user from the database the questions and answers from that user will still be in the database, the name of user and possibly an avatar will still be shown next to user's posts but link to profile will point to deleted account.
Link to a deleted account is not really a problem.

The problem is that you don't want someone else to later register with the same username that used to belong to deleted user.

This will just create confusion. Imagine you had a user that was so annoying that you deleted his or her account. First of all you don't want the same user to be able to just re-register with the same account.

Second you don't want someone else to just register with the account that used to belong to some really bad user.

Having said that, I agree that sometimes there could be a case when a user really wants his or her information to be completely removed from your database. I have not yet designed a way to completely delete a user in such a way that noone can re-register with the same email address or same username.

I think there should be a feature like this where user can be completely deleted but the hash of the email address will remain in the database. This way the user is deleted but same email address cannot be used again to just re-register. We can also store the timestamp where the email address was deleted. We will also need to keep the username in the database so than noone else can register with the same username.

I think this can be a good feature.

Right now if you want to completely delete user the best way is to manually delete from Mongo database using either mongo shell or some tool like robomongo or mongoVUE.

Tuesday, June 18, 2013

My answer to "Most Voted and Most Active questions doesn't work"

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


The thing about these "Most votes" tabs is that the results are calculated from "the last 7 days"
This basically means "Most voted in the last 7 days"
I just voted up one of the questions and it started appearing in the "Most voted" tabs.

The reason for using the results from 7 days is because if you use the "all time" most voted, then usually there will be several very higly voted questions that will end up always appearing at the top of most voted, even if the questions are from a year ago.

On a fairly popular website with decent amount of voting activity the 7-days period is a good thing but if it's not what you want then you will need to tweak the code because I did not make this period configurable.

I will try to add this configuration to the next version.

Tuesday, June 11, 2013

My answer to "Is Registry->Viewer->save() calling \Lampcms\Mongo\Doc save()?"

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


Yes, Viewer is the User object.
We call it Viewer to indicate that it represents the User who is currently viewing the page. It can be logged in user or a non-logged in guest user.

The reason for calling the user "Viewer" is to differentiate it from just any registered user. For example when you viewing someone's profile or when you following/unfollowing another user we would refer to that other user as "User" but you are a "Viewer" which is also a user.

I did not invent this terminology. I first saw it on some Google's API and I liked the idea.


Anyway, a Viewer is a User and User extends MongoDoc.

If you need help in debugging something you can always add new logging line anywhere in the script.

For example
d("new password is: ".$this->newPassword);

The d() function means debug-level logging. It will work only in debug mode and only when you configured the logging (path to log) in !config.ini properly.