You can download the phptest.php file, upload to your server and access it with a browser. It will tell you if your server meets the minimal requirements to run our program. This is the easiest way to run the pre-installation test.
We run our sites on Linux CentOS 64 bit version.
Important disclaimer here:
You will need a 64-bit machine if you want to run this
program in production.
This is because MongoDB has limitation of
database size on 32-bit machines.
You can certainly use it on 32-bit machine but you will be limited to a database of only about 2.5 Gigs, which may not be enough for busy sites that plan on growing.
MongoDB uses more disk space than a tranditional database like MySQL, so make sure to have plenty of disk space available.
Also, you should take advantage of MongoDB sharding and spread your data among multiple servers.
This is optional, but recommended for very busy sites in order to improve performance and add fault tolerance.
php 5.3 or later (We use namespaces, closures, anonymous functions – all the latest and greatest that php 5.3 has to offer)
We hight recommend to use at least php 5.3.3 because it comes with php-fpm, which is the preferred way to run not just this program, but also all php scripts you have.
This is the most efficient way and can outperform the Apache with mod_php by as much as 10 times. Yes, you can run thousands requests per second with it, not possible with mod_php
MongoDB database (main storage back-end)
MySQL 5.X database (optional, but Similar Questions feature will not work without it)
The reason for this is that MongoDB does not have a full text search feature and we need it in order to find ‘similar’ questions as well as using it for the search feature)
We use MySQL only for it’s full text search and only to index/search question titles.
This way we don’t have to require any type of external search engine like Solr.
There is still an option to search by tags, which uses user-supplied tags to find questions that contain
“Any” or “All” tags matching search query. (under development)
Required php extensions:
- mbstring (This project uses php mbstring to offer the top notch first class UTF8 support for all input, including support for UTF8 Tags, Titles, User Names, Questions, Answers)
Optional php modules:
- curl (for communicating to external APIs like Facebook and FriendConnect)
- GD (for generating Captcha images and resizing avatars) Without GD the Captcha feature will be automatically disabled
- oauth (for working with Twitter API)
- pdo (only if using MySQL for search feature)
- pdo_mysql (only if using MySQL for search feature)
APC (it’s is not installed by default with php 5.3, we highly recommend you use it to speed up the loading of php classes by as much as 500%.
All you have to do is just make sure that apc extension is enabled, it will then be able to cache all of the core classes of our program in the compiled state)
tidy (for sanitizing input in case input is in html format)
The preferred way to use php is by using php fpm, which is distributed with php 5.3
Running php in fastcgi mode, under the control of php-fpm will also enable the very powerful
function fastcgi_finish_request(), which we use throught the site in order to speed up the page
rendering and defer the execution to non web related functions such as API calls and email sending
till after the page has been rendered and connection has been closed by the web server.
We use Lighttpd, but it also perfectly fine to use Apache or Nginx
Even when using Apache, it’s best to NOT use the mod_php, but instead run php
as fastcgi, controlled by php-fpm and use Apache for serving static files like images, css and js files.
If you still prefer the old-school mod_php way, that’s fine, our program will happily work with with it.
Any email server will do. We use Postfix.
The Geolocation database from MaxMind (you can download a free version or paid version,
Choose Binary Format of GeoLite City)
We use it to map ip to location.
It helps in spam filtering and also can be used to add locations of posters’ to the map using Google Maps API or to just display the flag of poster’s country.
You notice that memcache is not required. This is because MongoDB itself behaves like a caching server.
Since documents are stored in rich document format, all ‘SELECT’ queries are extremely simple and fast. There are never any table joins, and in most cases only primary key is used.
We do have the Cache class to cache some data like results or IP to Location lookups, and our Cache class uses MongoDB also, so there is no need to additional cache engine like memcache.
If you have any questions, please feel free to ask on our support Q and A site
All questions are welcome!