Problem with php_mapscript and ecw

Bill Binko bill at BINKO.NET
Wed Aug 10 12:56:42 EDT 2005


On Wed, 10 Aug 2005, James P. Browne wrote:

> I am running a Debian Linux/Gnu server and compiled the new ECW driver into
> GDAL and compiled Mapserver against that.
> 
> When I write PHP4 code using php_mapscript I have no trouble creating an
> interface where the user can turn shape files on and off, but when either of
> ECW layers are turned on, they only work intermittently. The correct output
> is created in the image directory, but there is usually no php/html output
> after the line
>   dl('php_mapscript.so');
> If there is no output before that, it looks like nothing happened when using
> firefox or mozila, although IE returns a “page cannot be
> displayed...technical difficulty...” error. The images were created on the
> server, it seems that php_mapscript locks up.
> 
> If you switch back to shape files, the page works normally again.
> 
> I can't see what I could be doing wrong. Any ideas?
> 
> 
I am pretty sure I know the problem here:

libecw 3.1 (all versions) have a multi-threading bug that sometimes leaves 
a thread hanging and keeps the process from completing.  I posted a patch 
to the ermapper forums, and Tom has taken it and incorporated it into 
their latest 3.2 betas (I believe).

There are other problems with ECW at the moment, but the good news is that 
several very smart people are "all over it" at the moment.  Frank and Tom 
are both working to get a 3.2 out (with that and other fixes) and Frank 
has updated the GDAL interface to ECW to match it in GDAL CVS.

Now: to solve your problem...

1) If this can wait a few weeks: just wait for libecw3.2 to be released 
and for Frank to sign off on the changes to GDAL.  Your problems will 
probably go away.

2) If this is critical, you have two options:
	a) If you feel comfortable doing it, apply the patch attached to 
this discussion to the libecw3.1 sources and rebuild completely ( make 
clean all)

http://forums.ermapper.com/viewtopic.php?t=486&highlight=

	b) If you're really realy stuck, find someone who can build you a 
patched library.  I can do it on Mandrake 10.1, but you should be able to 
find someone to help on most platforms if you ask nicely. 

Bill



More information about the mapserver-users mailing list