Warning

These documentation pages are currently under construction and their structure is not ready yet.

As soon as a sufficient number of pages is present, the site navigation will be shown.

Requirements

Necessary software packages

PhPeace runs on most Linux distributions.

The required software packages are:

  • Apache web server
  • MySQL database server
  • PHP scripting engine
  • Curl
  • Imagemagick

Some additional packages may be required in order to use specific PhPeace functionalities, as discussed below.

Apache

The recommended Apache version is 2.2.
You can run PhPeace on Apache series 1.3 and 2.0, but they're not supported neither documented.

Two virtual hosts with separate hostnames are required.
You need one virtual host for the public address of the portal, the other one for its administrative interface.
The following convention are used:

  • www.mydomain.org as the hostname of the portal
  • admin.mydomain.org as the hostname of the administrative interface

You can use different domains for both virtual hosts.

Apache needs to support PHP 7 module. More details about PHP configuration are specified in the PHP section below.

PhPeace supports Apache's module mod_rewrite to rewrite URLs on the fly, however it needs to be installed then enabled, together with mod_proxy and its submodules.

If you plan to run one or both virtual hosts under SSL, make sure that your Apache installation supports it and that you have obtained the SSL certificates for the relevant hostnames from a certification authority.

The separation in different hostnames permits various deployment scenarios, such as using a dedicated server for administrative tasks and a set of frontend servers for the portal.
Security settings and logging can also be kept separate.
However these particular deployment alternatives are not documented yet.

MySQL

The recommended version of MySQL is 5.1
You can run PhPeace on different versions, such as 5.0 and 5.5, but they are not officially supported.
You can also run PhPeace on MySQL Cluster, but that's not documented here yet.
The default storage engine is MyISAM for all tables.

PhPeace uses utf8 encoding for its database, which is supported since MySQL 4.1.
However your MySQL configuration may still default to latin1. This does not represent a problem but you just have to remember to explicitly set the utf8 charset on all manual operations that you are going to perform on the database.

If you are installing MySQL from scratch, remember to secure your installation setting a proper password for the root user.

PHP

The recommended version is PHP 7.2.

PhPeace is shipped with a number of maintenance command-line scripts that make use of the CLI version of PHP (i.e. its executable binary). Although this is not strictly required, you should check that it's available in your system (just run php from the command-line)

The following PHP libraries are required:

  • xsl
  • curl
  • ctype
  • iconv
  • mbstring
  • soap
  • json

Not all PHP binaries are distributed with these libraries, so you may have to install additional modules or re-compile PHP. Further details are provided in the OS-specific sections below.

Furthermore PhPeace uses Archive_TAR library, which is now part of the default PEAR package.

If you want to use in-memory caching in order to improve performance you have to install APC (Alternative PHP Cache), which is available via PECL or as a separate package.
Similarly you may want to install the uploadprogress extension to display the upload progress bar, which is available via PECL.

CURL

PhPeace needs to run a periodic scheduler to execute background activities.
This is usually done via browsing a specific page in the admin interface which doesn't enforce any authentication but simply checks if the IP of the originating request is allowed.

The easier way to implement this scheduler is to setup a cron job to run every 15 minutes or so.
This cron job executes a shell script to browse PhPeace scheduler page and the common way to achieve this under Linux is to use the curl command, which is present on most distributions.

There are of course alternatives such as lynx or links2.

ImageMagick

All uploaded images are converted to a set of pre-defined sizes using the command-line tool ImageMagick. You don't have to install all binaries and libraries for ImageMagick, but given the variety of graphic formats you better install the default package coming with your Linux distribution.

Optional packages

Some additional software packages may be required in case you want to use specific PhPeace functionalities.

Video/Audio encoding

PhPeace can encode video and audio files uploaded in any format to FLV (Flash Video) and MP3 so that they can be streamed using the embedded JW Player.

Encoding is done by ffmpeg, a popular command-line encoder available on most Linux distributions.
The default PhPeace audio format is MP3: given that it is a proprietary library, it's not available in all Linux distributions and it may require manual installation.

Indexing of binary formats (doc and pdf)

PhPeace indexer processes all database content to make it searchable by portal users.
Content in binay files, such as PDF and Microsoft Word documents, can be indexed too but this requires the installation of specific software packages to extract text.

By default, both indexing functionalities (PDF and Doc) are off.

For PDF indexing you need to install the pdftotext executable which is part of the Xpdf software suite. On most Linux distributions pdftotext is included in the poppler-utils package.

For Microsoft Word documents (up to 2003 version) indexing, the antiword package must be installed.

Powered by PhPeace 2.6.5