[Chameleon] Font Problem

Paul Spencer pagameba at magma.ca
Wed Aug 18 22:02:05 EDT 2004


Tim, this is pretty general.  I'm gonna need more information.  For the record, a good
place to start when you think you have a mapfile problem is to write a small test script
in php and that removes all the chameleon 'junk'.  Here is the script:

<?php
//replace with appropriate mapscript module if necessary
if (!extension_loaded( 'MapScript' ))
    dl( 'php_mapscript_42.dll' );

$szMapFile = '<path-to-map-file>';
$oMap = ms_newMapObj( $szMapFile );
$oImg = $oMap->draw();
$szURL = $oImg->saveWebImage();
echo "<img src=$szURL>";
?>

save this file somewhere web accessible, like the apache htdocs directory, set the name of
your map file and then access the script via your browser.  You *should* get the same
error message, which effectively eliminates chameleon as a problem (to this point,
anyway).  You can then play with your map file and associated files to isolate and resolve
the problem.

Cheers,

Paul


On Aug 18, "Pascoe,Tim [Burlington]" <Tim.Pascoe at ec.gc.ca> wrote:
> 	I've been having trouble getting a new Chameleon 1.99Beta installation to draw a map
using a new template. After searching through the list archive, I found a message that
described the same issue I was having, and isolated it to a font access problem. Low and
behold, the same thing is happening to me! However, I have all of the fonts listed in the
map file installed in the /etc/ directory, and listed in the fonts.txt file.
> 
> 
> 
> 	The error I get is:
> 
> 
> 
> 	Warning: [MapServer Error]: msGetLabelSize(): Could not find/open font in C:\Documents
and Settings\TimP\My Documents\CABIN\maps\htdocs\php.php on line 3
> 
> 
> 
> Fatal error: Call to a member function on a non-object in C:\Documents and
Settings\TimP\My Documents\CABIN\maps\htdocs\php.php on line 4
> 
> 
> 
> 	What can I do to narrow down the issue? I did try changing the path in the map file,
but I just ended up with an Error opening fontset etc/fonts.txt. message then, so it seems
to be related directly with the font files themselves.
> 
> 
> 
> 	TIA,
> 
> 
> 
> Timothy Pascoe
> 
> 
> 
> Environment Canada / Environnement Canada
> 
> Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
> 
> 867 Lakeshore Road / 867, chemin Lakeshore
> 
> Burlington, Ontario / Burlington (Ontario)
> 
> L7R 4A6
> 
> 
> 
> Tel/Tél: (905) 336-6239
> 
> Fax/Téléc: (905) 336-4699
> 
> E-mail/C. élec: tim.pascoe at ec.gc.ca
> 
> Government of Canada/Gouvernement du Canada
> 
> 
> 
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> <a
href='http://lists.maptools.org/mailman/listinfo/chameleon'>http://lists.maptools.org/mailman/listinfo/chameleon</a>
> 
> 


More information about the Chameleon mailing list