[ka-Map-users] Printing Error --SOLVED!

Daniel.Huber at ch2m.com Daniel.Huber at ch2m.com
Sat Jan 27 19:24:44 EST 2007


Change the path in the config.php for the map file from a relative path
to an absolute.path.  What comes 'out of the box' with MS4W is 
 
      'path' => '../../gmap/htdocs/gmap75.map',
 
setting it to it's absolute path, based on how they suggest you install
the MS4W directory (at the root of c:\), gets everything working just
fine:
 
    'path' => '/ms4w/apps/gmap/htdocs/gmap75.map',
 
 
The absolute path method breaks because the print_map.php file is not at
the same level as config.php.  So while it appears that everything works
with the config settings because the map and controls show up just fine,
any PHP files called in the /tools directory will fail. 
 
Thanks Lorenzo for prompting me to look at the path for the map files.
This exercise has also taught me a little more about PHP, which I know I
am going to have to learn if I keep messing w/ MapServer.
 
Dan

________________________________

From: ka-map-users-bounces at lists.maptools.org
[mailto:ka-map-users-bounces at lists.maptools.org] On Behalf Of Sacha
Black
Sent: Saturday, January 27, 2007 2:38 PM
To: ka-map-users at lists.maptools.org
Subject: Re: [ka-Map-users] Printing Error


dan,

for what's worth I have the same problem printing from ka-map in ms4w
2.x.... 

sacha


On 1/27/07, Daniel.Huber at ch2m.com <Daniel.Huber at ch2m.com> wrote: 

	Interesting, because I'm using all the default configuration
files
	downloaded from MapTools.org MS4W site.  Everything works
perfectly with
	that example, as well as when I changed config.php to use a
mapfile of 
	my own.  Only printing does not work.
	
	Could you send the config.php file you are using for your test
	application on ominiverdi.org?  I could compare the two.  The
one I have 
	is "config.php,v 1.5 2006/10/13 18:55:47 jmckenna"
	
	PHP is a new animal to me, so I don't know how to debug the code
in
	print_map.php to really find out what is happening.  According
to PHP
	sites, this error is related to one of the objects not being
set. 
	
	BTW, I'm using PHP 5.2.0, if that matters.
	
	Dan
	
	-----Original Message-----
	From: ka-map-users-bounces at lists.maptools.org
	[mailto: ka-map-users-bounces at lists.maptools.org] On Behalf Of
Lorenzo
	Becchi
	Sent: Saturday, January 27, 2007 12:41 AM
	To: ka-map-users at lists.maptools.org
	Subject: [ka-Map-users] Printing Error
	
	Hi Daniel,
	to be honest I have no experience on Windows installation.
	
	Anyway, our test application on ominiverdi.org is working fine
to me:
	http://www.ominiverdi.org/ka-map/ka-map/htdocs/
	
	it is the same code of version 1.0 on a slackware linux.
	
	can you do some more tests?
	
	just trying: it seems it is not loading your mapfile properly,
are you
	using relative path in mapfile or config file?
	
	ciao
	Lorenzo
	
	
	
	> New to ka-Map but really like what I've seen so far.
Except...... 
	>
	> Running the example interface w/ GMap, I'm receiving the
following
	> error, which is similar to what was reported back in September
on this
	
	> but no clear fix was posted (at least I couldn't find it in
the list 
	> archives):
	>
	>     Fatal error: Call to a member function
selectOutputFormat() on a
	> non-object in C:\ms4w\apps\ka-
	> map-1.0.b1\htdocs\tools\print\print_map.php on line 218
	>
	> A quick browse of the print_map.php file shows that this is
the line 
	> of code that fails for everything:
	>
	>     $oMap->selectOutputFormat( $szMapImageFormat );
	>
	> except GeoTIFF, which bails on:
	>
	>      $oMap->set('width', $pw);
	>
	>
	> I have two different configurations setup (on virtual
machines) and
	> they both fail:
	>
	> Windows 2003 Server
	> MS4W 1.6
	> ka-map 1.0.b1 (and latest CVS pulled from wiki site) 
	>
	> WinXP Pro SP2
	> MS4W 2.2.1
	> ka-map 1.0.b1 (and latest CVS pulled from wiki site)
	>
	>
	> I also followed the troubleshooting guide on the Wiki site and
nothing
	
	> failed there, so I'm at a total loss as to why this is
failing. 
	>
	> Any help for a NooB?
	>
	> Dan
	
	_______________________________________________
	ka-Map-users mailing list
	ka-Map-users at lists.maptools.org 
	http://lists.maptools.org/mailman/listinfo/ka-map-users
	
	_______________________________________________
	ka-Map-users mailing list
	ka-Map-users at lists.maptools.org
	http://lists.maptools.org/mailman/listinfo/ka-map-users
	


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070127/709090fc/attachment-0001.html


More information about the ka-Map-users mailing list