MapTools.org

[Chameleon] Print Widget

Paul Spencer spencer@dmsolutions.ca
Wed, 04 Feb 2004 22:48:26 -0500
Tracy,

Tracy Howlett wrote:

> My print problems continue.
> 
>  
> 
> I think I've sorted out the issues with font lists but now there is an image
> format problem.  When I select download or preview I get a PHP Script
> Interpreter problem.  When I debug it I get this error message:
> 
> CGI Error
> 
> The specified CGI application misbehaved by not returning a complete set of
> HTTP headers. The headers it did return are: 
> 
> Warning 1: TIFFReadDirectory:C:\Apps\chirp\data\Tin_high_new.tif: wrong data
> type 1 for "XMLPacket"; tag ignored
> 
> Warning 1: TIFFReadDirectory:C:\Apps\chirp\data\Tin_high_new.tif: wrong data
> type 1 for "XMLPacket"; tag ignored
> 
>  
> 
> Could this be because of the php_gd.dll version?  The version of PHP that
> I'm running (4.3.4) comes bundled with php_gd2.dll.  Is it just that gd does
> not support tiff output?  Perhaps it is the MapScript.  I'm using some
> aerial photos and a DEM in tiff format and I'd like to add them to the map
> printout if possible.
> 

it is likely that it is not a gd issue since gd does not support tiff. 
The tiff output is actually generated by MapServer I believe.  I would 
recommend against using tiff for now.

php_gd.dll was dropped in favour of php_gd2.dll in php 4.3.x, it is 
possible that some code still refers to php_gd.dll but you would get a 
different error message.  As far as Chameleon is concerned, they are API 
compatible so if you ever get messages saying that php was unable to 
load php_gd.dll, you can avoid it by copying php_gd2.dll and renaming 
the copy php_gd.dll :)  This is a hack, though, and the problem should 
be reported on the list so I can fix it.

>  
> 
> I just ran a test.phtml (<?php  dl("php_mapscript_4.0.1.dll"); phpinfo(); ?>
> and there is an error message telling me "MapScript:  Unable to register
> functions; Unable to load"  Just when I think I've solved one problem I find
> another with this thing!! ;)

Do you load mapscript automatically in your php.ini?  There is a section 
called extensions in there, if you list php_mapscript in that section, 
then the test does not need to load it and in fact loading it results in 
the error message that you see above.  To avoid this message, we 
typically use:

<?php
if (!extension_loaded( 'MapScript' ))
{
     dl( 'php_mapscript_4.0.1.dll' );
}
else
{
     echo 'MapScript loaded via php.ini<BR>';
}
phpinfo();
?>

Cheers,

Paul
> 
>  
> 
> Tracy
> 
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



This archive was generated by Pipermail.