Building dynamic maps using Perl or PHP

Stephan Dunning SDunning at nephrology.org
Mon Nov 20 16:16:35 EST 2000


Daniel,

We have reinstalled MapServer with PHP3.  I tried using the
phpinfo_mapscript.phtml file to see what I'd get.  
Well, here it is...

	Warning: Cannot open 'c:\winnt\system32\inetserv\browscap.ini' for
reading in - on line 0
	
	Fatal error: Unable to start browscap module in (null) on line 0
	Unable to start modules 

Does this look familiar to you or anyone else?  Or is it simply something
we've mixed up on our own.
I noticed that the warning references my local hard drive (c:\), which I
thought seemed odd.  Clearly I do not have "browscap.ini" in this directory,
but I'm not clear as to what it is, or why I would need it.

Here's the URL I used:
http://www2.usrds.org/mapserver/phpinfo_mapscript.phtml

Thanks for any insight.
Stephan

-----Original Message-----
From: Daniel Morissette [mailto:morissette at dmsolutions.ca]
Sent: Tuesday, November 14, 2000 2:39 PM
To: Stephan Dunning
Cc: Mapserver (E-mail)
Subject: Re: Building dynamic maps using Perl or PHP


Stephan Dunning wrote:
> 
> My thinking is that I should be able to connect to my database using
either
> Perl or PHP, then pull in my data and join it to the chosen shapefile
.dbf,
> build my mapfile, and display the map for the user.  Does this sound
> reasonable?  
> Which is the better laguage to use: Perl or PHP (or another)?
> Are there any recommended resources available in addition to the Perl and
> PHP sites linked through MapServer's site?  Does anyone have a good
example
> of a similar application?

Stephan,

That approach has been used by us and by a couple of MapScript users and
works very well.  Note that you won't be able to 'join' your created DBF
table to an existing shapefile... you'll have to copy the .shp/.shx and
create a new dbf for it with a temporary (unique) filename (you could
use a logical link for the .shp/.shx on Unix).

Unfortunately I'm not aware of any sample application available in
source code that does that.  However, there is a sample script
distributed with the MapServer source that shows how to create
shapefiles: mapserver/mapscript/php3/examples/test_writeshape.phtml

In our case we used PHP (obviously!).  Since you're on NT I'm not sure
if Perl is an option for you.  I don't think we've had a report of
succesfull use of Perl MapScript on NT yet?

-- 
------------------------------------------------------------
 Daniel Morissette                morissette at dmsolutions.ca
                 http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the mapserver-users mailing list