1. Installation

1.1. Prerequisite for Installing CartoWeb

CartoWeb depends on several sofware components needed for its proper working. Some are required and others optional, depending on what you intend to do.

Required software

PHP >= 5.0.3[1]
See http://www.php.net for more informations. You will need to have some features available in PHP
  • SOAP: This is required by CartoWeb as it uses SOAP webservices.
  • Gettext (optional): You need the Gettext module if you want to enable the Internationalisation in CartoWeb. See Chapter 14, Internationalization for configuration.


    If you are using the demo, you need to have Gettext support installed, as it uses Gettext by default.

  • Curl (optional): Some scripts (like i18n) need Curl to fetch files remotely.
Mapserver PHP MapScript (from MapServer >= 4.4)
See http://www.maptools.org/php_mapscript/ for more information and installation instructions.
PostgreSQL with PostGIS suppport (optional)
If you want spatial database support in CartoWeb you will need to install PostGIS of the PostgreSQL database. See http://postgis.refractions.net/ for more information.

1.2. Installation Instructions for Version 3.0.0

For version 3.0.0, the installer is not yet completely ready. These are instructions about how to install CartoWeb with this version. These notes are temporary and will be removed once the installer is totally fonctional.

Step by step guide:

  1. Download CartoWeb source from http://www.cartoweb.org/. It is recommended that you download the version with demo for a better user experience.
  2. Uncompress the archive somewhere in your path accessible by your Web server.
  3. Point your Web browser to the file located in htdocs/info.php, and check that the PHP information page displays correctly (meaning PHP is correctly setup) and that you have a section called MapScript in this page. If it is not the case, CartoWeb will not run correctly. You should install and setup PHP and PHP MapScript correctly. See Section 1.1, “Prerequisite for Installing CartoWeb”. If you intend to use the CartoWeb demo, you need to have a section called Gettext in the previous output.
  4. CartoWeb needs some file to be writable by the Web Server such as the directory where generated images are stored. To set up these permissions, you need to launch the PHP installer with an argument. This needs to be done on the command line (launch cmd.exe on Windows). You also need to find the path to your PHP executable. For instance c:\wamp\php\php.exe on Windows, or /var/lib/cgi-bin/php on Unix (just example, they may differ). Once located, launch the following command:
    php cw3setup.php perms
    Replacing php with the path to your PHP.
  5. You can now configure CartoWeb with your desired options. If you want to quickly test the demo, you need only one option to be modifed. Open in your favorite editor the file named client_conf/client.ini. Find the line containing the value cartoclientBaseUrl. Uncomment this line (removing the first ; character and set on the right side the URL which is used to access the htdocsdirectory inside CartoWeb. For instance, if you need to type http://localhost/cartoweb3/htdocs/info.php to access the PHP information page, then the value to put there will be http://localhost/cartoweb3/htdocs/. Then, do the same for the option cartoserverBaseUrl just below.
  6. (Optional) If you did not download CartoWeb with the demo included, and want to install it afterward, you can get the demo data and extract it inside the projects/demo/server_conf/demo directory (this will give you a projects/demo/server_conf/demo/data new directory with the data. On Unix, you can type the following in a shell:
    cd projects/demo/server_conf/demo
    wget http://www.cartoweb.org/downloads/cartoweb-demodata-3.0.0.tar.gz
    tar xvzf cartoweb-demodata-3.0.0.tar.gz
    On Windows, you can use a graphical extractor to do the same (you can use http://www.7-zip.org/).
  7. You should now be able to point your browser to the htdocs/demo.php file, and see CartoWeb in action (if you have the demo data). If you don't have the demo, you can use the more simple test project with the htdocs/client.php URL.

1.3. UNIX-like Install[2]


For version 3.0.0 installation, please refer to Section 1.2, “Installation Instructions for Version 3.0.0”.


If you are using the Debian distribution, you can easily install PHP and Mapserver. See Appendix A, Mapserver Debian Installation.

CartoWeb installer is "cw3setup.php", located in the root directory of the application: Simply run

php -f cw3setup.php

to setup the application.

1.3.1. List of Available Commands

(no command, by default): install cartoweb3
cvs                     : install cartoweb3 from cvs
check                   : check configuration
get[=user]              : CVS checkout with user name [anonymous]
get_libs                : get required libraries
dirs                    : create user directories
perms[=www-data]        : set writing perms for web-user [www-data]
                          - set ownership if ran as superuser,
                          - give write permission instead.
createConfig            : create the new configuration (install .dist files)
setupLinks              : link or copy paths for web browser
removeLinks             : remove all links created by setupLinks.
                          - super user rights required to remove dynamic content
setup[=path]            : setup a new project in existing installation
mkDirs                  : create all cache directories
rmDirs                  : remove all temporary files AND directories
remove                  : remove cartoweb3

1.3.2. Commands Details

  • (no command, by default): install CartoWeb from a download.
  • cvs: install CartoWeb from a cvs checkout. You must have cvs access configured and cvs login done with the right user name.
  • check: check if the configuration meet requirements.
  • get[=user]: CVS checkout with user name "user". You must have done succesfully a cvs login before.
  • get_libs: fetch required libraries. You need an internet connection.
  • perms[=www-data]: set writing perms for web-user [www-data]. Set the ownership if ran as superuser, and give write permission instead. Warning: the second choice is secureless.
  • createConfig: create configuration from .dist files.
  • setupLinks: setup symbolic links for a SymLink configuration.
  • removeLinks: remove links created by setupLinks.
  • setup[=path]: setup a new CartoWeb project from project sources located in path.
  • mkDirs: make user-writeables directories.
  • rmDirs: remove user-writeable directories.
  • remove: try to completely remove CartoWeb. Super-user rights may be required for user-writed directories removal.

1.4. Windows Install


For version 3.0.0 installation, please refer to Section 1.2, “Installation Instructions for Version 3.0.0”.

The process is as simple as for UNIX, but the windows installer is not available yet.

[1] This implies that you have a Web Server configured to execute PHP scripts, such as Apache (http://httpd.apache.org)

[2] If you are using Debian, and you need to install Mapserver, you can have a look at Appendix A, Mapserver Debian Installation