How to Install PHP from Source
This installation example for Unix/Linux installs dependency support for Midgard CMS. Make sure Expat, zlib (comes with OpenBSD) and iconv are installed before proceeding. I have added additional configuration for MySQL (so the correct MySQL libraries are used), Microsoft SQL Server, apxs, XML, exif, dba and mbstring. Refer to the PHP configurator for details (# ./configure –help).
# ./configure –with-mysql=/usr/local –with-mssql=/usr/local –with-apxs –with-xml –with-zlib-dir=/usr/lib –with-expat –with-config-file-path=/var/www/conf –with-iconv=/usr/local/bin/iconv -–with-exif –-with-dba –-with-mbstring
# make
# make install
# make clean
# cp php.ini-recommended /var/www/conf/php.ini
Review/edit /var/www/conf/php.ini (path may vary) file to match your requirements. To meet the requirements of Midgard CMS you will require to do the following.
Add extension=midgard.so into your php.ini file.
Add the extensions path to extension_dir. Type “php-config –extension-dirâ€. Place the returned path into your php.ini file.
Ensure the file_uploads=on.
Ensure the short_open_tag=on.

