PHP Configuration
From MapbenderWiki
PHP Configuration
You might have to make some adjustments to the file php.ini. Changes in the php.ini also become operative only after restarting the Apache web server ! If you use Suhosin have a look at the Suhosin configuration too.
1. During the test and installation phase of Mapbender it can be helpful log php-errors. Configure the file php.ini as follows:
error_reporting = E_ALL & ~E_NOTICE log_errors = On error_log = "/var/log/php.log"
2. Check the following details in php.ini allow_url_fopen parameter:
extension_dir = (path to extensions-directory) allow_url_fopen = On
4. Mapbender manages access authorization in SESSIONS. Check the following details:
session.save_handler = files session.save_path = (Path to SESSIONS-Directory). (Check authorisation!) session.use_cookies = 1
5. Further details of session management should be customized according to server load (see 'garbage collection' in php.ini)
6. With regard to other modules the extension gd2 should be included in the installation and configuration process.
extension=php_gd2.dll (Windows) extension=gd.so (Linux)
On a Debian-System you find this lib in /usr/lib/libgd.so. If it is not installed you can do that using the command (or use Synaptic Packet Manager or similar / This information might be out of date for Ubuntu 9.04):
# apt-get install lbgd2-dev
7. To run Mapbender a PostgreSQL database is required. You have to check the availability of the required extension in the php.ini file:
extension=php_pgsql.dll (Windows) extension=pgsql.so (Linux)
8. Mapbender needs php_gettext and php_mbstring
extension=php_gettext.dll (Windows) extension=php_mbstring.dll (Windows)
9. short_open_tag
short_open_tag = OFF
10. Mapbender requires simplexml and dom for XML parsing. If not installed, this will lead to some hard-to-find bugs, because PHP fails to throw exceptions! These modules should be already installed if you are using a Linux distribution, but if you compile PHP yourself you need to include these as well
11. set PHP variable max_input_vars (add variable)
max_input_vars = 5000 (default is 1000 which may be not enough for WMS with many layers)
see also http://php.net/manual/en/info.configuration.php
Furthermore check, whether the database information in ./conf/mapbender.conf is correct.
