[ms4w-users] How to install/configure PEAR (PHP)

Jeff McKenna jmckenna at dmsolutions.ca
Fri Aug 31 17:01:40 EDT 2007


I'm not sure if I can be of any help in terms of pmapper, but I just 
went through the process of installing PEAR packages on my local MS4W, 
that were required for Mapstorer.  All that I can say is that it worked 
(PEAR packages installed properly), and I did make some notes on that 
(below, maybe part of the PEAR notes can be useful to you, points 1 and 2):


MS4W MapStorer Install Notes, using PostgreSQL
==============================================

1) Install Pear

   - edit /ms4w/Apache/php/go-pear.bat
   - change the path on line 2 to the proper path to your php.exe:

     set PHP_BIN=C:\ms4w\Apache\cgi-bin\php.exe

   - in a command window execute go-pear.bat

2) Install Pear packages

   - see list of Pear packages required in the INSTALL file
   - check what packages are already installed by using the 'pear list' 
command
   - install necessary packages:

     pear install Package Archive_Tar Auth Console_Getopt DB DB_Table 
Date HTML_Common HTML_QuickForm HTML_QuickForm_Controller HTML_Table 
MDB2 MDB2_Driver_mysql MDB2_Driver_pgsql Pager

   - if not installed by the above command, do them manually:

     pear install channel://pear.php.net/validate-0.7.0
     pear install channel://pear.php.net/Structures_DataGrid-0.8.3
     pear install 
channel://pear.php.net/Structures_DataGrid_DataSource_Array-0.1.2
     pear install 
channel://pear.php.net/Structures_DataGrid_DataSource_DB-0.1.1
     pear install 
channel://pear.php.net/Structures_DataGrid_DataSource_DBQuery-0.1.10
     pear install 
channel://pear.php.net/Structures_DataGrid_Renderer_Pager-0.1.2
     pear install 
channel://pear.php.net/Structures_DataGrid_DataSource_MDB2-0.1.10
     pear install 
channel://pear.php.net/Structures_DataGrid_Renderer_HTMLTable-0.1.3

3) Configure MapStorer

   - rename /inc/db.inc.php-dist to /inc/db.inc.php
   - edit /inc/db.inc.php
   - see postgresql section (line 62-68)

4) Create mapstorer database

   - from commandline:

     createdb -U (username) mapstorer

5) edit postgresql's pg_hba.conf file if necessary (to allow access
    to the mapstorer database)

6) import schema

   - from commandline:

     psql -U (username) -d mapstorer -f mapstorer_pgsql.sql

7) create Apache conf file in /ms4w/httpd.d/, such as:

      Alias /mapstorer/ "/ms4w/apps/mapstorer08/"

      <Directory "/ms4w/apps/mapstorer08/">
        AllowOverride None
        Options Indexes FollowSymLinks Multiviews
        Order allow,deny
        Allow from all
      </Directory>

8) restart Apache service
     - execute /ms4w/apache-restart.bat

9) goto 127.0.0.1/mapstorer in web brower

10) login with root/root

11) modify settings by clicking on "Global configuration" button in main 
page








Lorenzo Bottai wrote:
> Hi to everyone!!!
> I try to work with pmapper distribuited with ms4w packages.
> I fall in this prblem when I tried to make a join with an external DB 
> table.
> I followed the instructions under the wiki pmapper and ....( make an 
> ODBC connection with a tables putted inside a MSACCESS DB).
> All these things are already done but I realised that PEAR (PHP) 
> additional package will not installed by default MS4W installation. I 
> followed the instruction of PEAR installation on my machine (OS XP), but 
> the php simple script that use the DB.php lib does'not work (<?php 
> require_once ('DB.php') ......?>) It return an error opening the DB.php 
> files.
> Can you help me in PEAR confiuration and installation with ms4w ?
> 
> ciao Lorenzo Bottai
> 


More information about the ms4w-users mailing list