System Requirements
Nutshell
System requirements are not yet solidified, but probably are not too different from what is listed here.
Nutshell requirements: LADP (Linux, Apache, Database, PHP)
Apache 2.x
You can probably use almost any web server that supports PHP, as far as I know nothing about my PHP code is Apache specific, but I do not test on anything else.
mod_rewrite
The software uses apache mod_rewrite to call the controller script. If you are using a different server, you will need to find a way to get similar functionallity.
Database
This is a database driven web application. I use MySQL but the code is (hopefully) written to easily work with a variety of databases.
PHP 5.2.x
You might be able to get away with PHP 5.1.x but you are really better off with the 5.2.x branch. Untested in the new 5.3 branch.
PHP Binary Modules
The following PHP binary modules are used by DOMBlogger
libxml2 Support
Either your PHP needs to be linked against libxml2 at compile
time or you need to have a libxml2 dynamic module installed. If you
look at the output of phpinfo() you should see
something like this:
XML support details from phpinfo()
dom
| DOM/XML | enabled |
| DOM/XML API Version | 20031129 |
| libxml Version | 2.6.26 |
| HTML Support | enabled |
| XPath Support | enabled |
| XPointer Support | enabled |
| Schema Support | enabled |
| RelaxNG Support | enabled |
With most Linux distributions, XML support is a separate package
and often not installed during a standard server install. The
package containing the necessary module will likely be named
something along the lines of php-xml. Most commercial
hosting companies will already have this installed. If they do not,
they probably will install it on request.
PHP Tidy
PHP Tidy is a PHP wrapper to the HTML Tidy library.
When you have the module installed, the output of
phpinfo() should have something similar to this:
Tidy support details from phpinfo()
tidy
| Tidy support | enabled |
|---|---|
| libTidy Release | 14 June 2007 |
| Extension Version | 2.0 ($Id: tidy.c 272374 2008-12-31 11:17:49Z sebastian $) |
| Directive | Local Value | Master Value |
|---|---|---|
| tidy.clean_output | no value | no value |
| tidy.default_config | no value | no value |
With most Linux distributions, Tidy support is a separate
package and often not installed during a standard server install.
The package containing the necessary module will likely be named
something along the lines of php-tidy. Most commercial
hosting companies will already have this installed. If they do not,
they probably will install it on request.
Do not install the tidy package from PECL. It is for PHP 4 only. Tidy was moved into core PHP for PHP 5.
PECL BBCode
BBCode parsing is done with the binary PECL BBCode module.
BBCode support details from
phpinfo()
bbcode
| BBCode support | enabled |
|---|---|
| BBCode Version Support | 1.0.2 |
| BBCode Library Version | 2.0 |
| BBCode Max Stack Size | Dynamic |
| BBCode Max Elements | No Limit |
| This extension makes use of Bstrlib available at http://bstrlib.sf.net |
APC Cache
While not strictly required, it is recommended that you install the current stable APC Cache module. This is usually available pre-packaged for most binary distributions of PHP.
There does seem to be a conflict between APC and MDB2. To remedy
the situation set apc.cache_by_default=0 in the APC
configuration file. This is unfortunate, but not that big of an
issue. There probably is a way to configure APC to leave the
affected files alone and cache the rest by default, I have not
looked into it yet.
APC is used through wrapper functions in DOMBlogger, allowing the web application to continue functions in the event that you need to disable it or are on a shared server where there are security concerns with APC. It does however really speed things up, use it if you can.
PHP Pear Packages
This software takes advantage of several PHP Pear packages. I recommend using Pear to manage Pear packages rather than pre-packaged (IE RPM or DEB), sometimes the version of packages in repositories are a little stale.
MDB2 and a Database Driver
DOMBlogger uses Pear MDB2 to talk to the database. The advantage of this is that MDB2 has drivers for many databases, so you can use whatever database floats your boat and even switch databases in the future.
To install MDB2:
pear install MDB2 MDB2_Driver_mysql
Of course, replace MDB2_Driver_mysql with the MDB2
driver for the database of your choice. You will also need the
binary PHP module for the chosen database.
HTML Purifier
You need the latest version. An older version will not work with the configuration used here. To install HTML Purifier:
pear channel-discover htmlpurifier.org pear install hp/HTMLPurifier
Once you have installed HTMLPurifier, you need to make sure the
web server has write permission to the HTMLPurifier cache. Read the
official
instructions, but to summarize, the web server needs write
permission to the Serializer directory. Assuming your web server
runs as user apache and your base pear install is at
/usr/share/pear you would run the following commands
(as root):
pushd /usr/share/pear/HTMLPurifier/DefinitionCache/ chown -R apache:apache Serializer
Optional Text_Highlighter
This is a rather neat Pear package that provides syntax highlighting for many types of programming languages. Currently this is only used by the blog. You do not need to install it if your blog is not going to be used for geeky kind of posts where syntax highlighting is desired. It provides no other benefit.
The package is considered beta, and does have bugs that sometimes rear their ugly head and cause issues that need to be worked around. To install:
pear install Text_Highlighter-beta
The -beta at the end is needed because Pear
(default configuration anyway) does not like to install beta
quality packages without making the user is full aware that the
package is beta quality.
My Development System
DOMBlogger is developed using the following software environment:
- Linux (CentOS 5.4)
- Apache 2.2.3 (Stock CentOS)
- MySQL 5.0.77 (Stock CentOS)
- PHP 5.2.12 (Custom Package)
If you run into issues and your software is not at same level, try updating.