MS4W includes an Apache HTTP server that can serve up NapGen's web applications.
Note: Microsoft's SQL Server driver for Windows XP does not support the PHP used in the more recent versions of MS4W. Therefore, to install NapGen on Windows XP, you need to install an early version (e.g. 3.0.3) of MS4W. That version can also be installed onto Windows 7.
Here are the steps setting up MS4W:
Note: If the installer is on a shared network drive, the installer may give an error about failing to create a socket for download. Move the installer to a local drive and run the installer from there.
c:\bin). This will cause MS4W to be installed onto a location such as
c:\bin\ms4w.
You should see a page with a title saying something like
MS4W - MapServer 4 Windows - version 3.0.3
If nothing shows up, it may be that port 80 is already in
use. Use the DOS command netstat -noa
to find
out which process or software is using that port.
Note: The MS4W uninstaller ms4w-uninstall.exe also wipes out the htdocs directory.
c:\data\ms4w\Apache).
c:\bin\ms4w\Apache\htdocsto
c:\data\ms4w\Apache).
c:\bin\ms4w\apache\conf\httpd.conf).
C:/bin/ms4w/Apache/htdocs) and replace them with a path to the data folder (e.g.
c:/data/ms4w/Apache/htdocs).
</Directory>(without quotes)
<Directory "c:/data/ms4w/Apache/htdocs/napGen_output"> Options Indexes FollowSymLinks <IfModule mod_autoindex.c> IndexOptions FancyIndexing IndexOptions SuppressIcon AddDescription "Metadata XML" *.xml IndexOptions IgnoreCase FoldersFirst NameWidth=60 DescriptionWidth=* IndexOrderDefault Ascending Date ReadmeName /lib/dirListingFooter.html </IfModule> AllowOverride None Order allow,deny Allow from all </Directory>
start> Settings> Control Panel> Administrative Tools> Services
napGenfolder to Apache's htdocs (e.g.
c:\data\ms4w\Apache\htdocs).
Note: To determine the proper .zip file to download, use http://localhost/napGen/util/phpinfo.php to get the PHP version and the compiler associated with your particular version of MS4W. For instance, MS4W 3.0.3 comes with PHP 5.3.6 and that PHP was compiled using MSVC9. Therefore, the .zip file to download for a 32-bit Windows is php-5.3.6-Win32-VC9-x86.zip.
c:\bin\ms4w\Apache\php\ext).
c:\bin\ms4w\Apache\cgi-bin\php.ini).
output_buffering = 4096
output_buffering = Off
default_socket_timeout = 60
default_socket_timeout = 600
;extension=php_xsl.dll
extension=php_xsl.dll
date.timezone = "UTC"
http://www.php.net/manual/en/timezones.php
Note: Unless PHP_PEAR_SYSCONF_DIR is
defined, PEAR will try to keep its configuration file in
c:\windows
. However, depending on the particular installation of Windows,
PEAR may not be able to do that. When it
can't, PEAR won't complain. But it may fail to install
packages or the installed packages may not work.
start> Settings> Control Panel> System
Advanced system settingslink on the left.
Advancedtab
Environment Variablesbutton.
System variables, click on the
New...button.
Variable name:, enter
PHP_PEAR_SYSCONF_DIR.
Variable value:, enter the path to the above created PEAR directory (e.g.
c:\bin\ms4w\Apache\php\pear).
OKand again for the next two dialog boxes.
start> Settings> Control Panel> System
Advanced system settingslink on the left.
Advancedtab
Environment Variablesbutton.
System variables, click on the
New...button.
Variable name:, enter
PHP_BIN.
Variable value:, enter the path to PHP's executable (e.g.
c:\bin\ms4w\apache\cgi-bin).
OKand again for the next two dialog boxes.
c:\bin\ms4w\Apache\php\pear)
To update your PEAR installation, request http://pear.php.net/go-pear.phar in your browser and save the output to a local file go-pear.phar.
http://pear.php.net/go-pear.pharis a link. Click on it to download go-pear.phar into the PEAR directory created earlier (e.g.
c:\bin\ms4w\Apache\php\pear).
cd \bin\ms4w\Apache\php\pear)
c:\bin\ms4w\Apache\cgi-bin\php.exe go-pear.phar)
Are you installing a system-wide PEAR or a local copy?, enter
local.
Please confirm local copy by typing 'yes', enter
yes.
1-12, 'all' or Enter to continue, enter
12. That will bring up a folder window. In that window, navigate to folder containing the PHP executable (e.g.
c:\bin\ms4w\Apache\cgi-bin) then click
OK.
1-12, 'all' or Enter to continue, will display again. This time press the
Enterkey.
Would you like to alter php.ini <C:\bin\ms4w\Apache\cgi-bin\php.ini>? [Y/n], press the
Enterkey.
Note: If you get an error saying php.ini cannot be modified, follow the displayed instructions to update php.ini manually.
pear list
HTTP_Request2and
Net_URL2. They indicate that the associated packages have been installed with the initial PEAR installation.
If they are not already installed, execute the following DOS commands (and do
a pear list
check again):
X86 Package (sqlncli.msi).
http://www.microsoft.com/en-us/download/details.aspx?id=20098
c:\bin\ms4w\Apache\php\ext).
c:\bin\ms4w\Apache\cgi-bin\php.ini)
extension=php_xsl.dll
extension=php_sqlsrv_53_ts.dll
X86 Package (sqlncli.msi).
http://www.microsoft.com/en-us/download/details.aspx?id=20098
c:\bin\ms4w\Apache\php\ext).
c:\bin\ms4w\Apache\cgi-bin\php.ini)
extension=php_xsl.dll
extension=php_sqlsrv_<phpVersion>_<threadSafe>_<compilerVersion>.dll
For example,
extension=php_sqlsrv_53_ts_vc9.dll
Notes:
<phpVersion>, look into the output of http://localhost/napGen/util/phpinfo.php for the first two digits in the reported PHP version. Use them in place of <phpVersion>. For example, use
53for the version number
5.3.6.
<threadSafe>, look into the output of http://localhost/napGen/util/phpinfo.php and check the second comma-separated field in
PHP Extension Build. It is either
TSor
NTS. Use that in place of <threadSafe>. For example, use
TSfor the build string
API20090626,TS,VC9.
<compilerVersion>, look into the output of http://localhost/napGen/util/phpinfo.php and check the third comma-separated field in
PHP Extension Build. It is either
VC6or
VC9. Use that in place of <compilerVersion>. For example, use
VC9for the build string
API20090626,TS,VC9.
Instant Client for Microsoft Windows (32-bit)to download the zip file.
instantclient_11_2to a local drive (e.g.
c:\bin\instantclient_11_2).
instantclient_11_2to the Windows environment variable PATH.
start> Settings> Control Panel> System
instantclient_11_2, preceded by a semicolon (;) (e.g.
;c:\bin\instantclient_11_2).
OKand again for the next two dialog boxes.
c:\bin\ms4w\Apache\php\ext).
c:\bin\ms4w\Apache\cgi-bin\php.ini)
;extension=php_oci8_11g.dll
extension=php_oci8_11g.dll
start> Settings> Control Panel> Administrative Tools> Services