[Mapserver-users] PHP Mapscript Problem

Paul Ramsey pramsey at refractions.net
Wed Mar 26 11:49:13 PST 2003


Yes, the moral of the story is: mapserver apps and mapscript libraries are 
STATICALLY LINKED against libmap. So it is not only possible but very easy to 
have a mapserv executable which is a different version than a mapscript 
library. This is not the first time this quirk has bitten us in the bum.

P.

Quoting chodgson at refractions.net:

> OK, so, my solution is this:
> 
> After beating my head against a wall for most of the day, it became obvious
> that my php_mapscript.so wasn't compiled against the same version of
> mapserver
> as my mapserv executable... so, I down'd v3.6.5 of mapserver, compiled myself
> a
> new php mapscript, and voila, it works!
> 
> Thought I'd post this answer to my problem, as obvious as it may be...
> 
> Chris
> 
> Quoting chodgson at refractions.net:
> 
> > My problem is this:
> >
> > The attached mapfile displays correctly for me using basic mapserver in map
> > mode (straight image output). If I do something along the lines of:
> >
> > dl('php_mapscript.so');
> > $map = ms_newMapObj( '/home/chodgson/www/vsa/vsa.map' );
> > $map->setExtent( $minx, $miny, $maxx, $maxy );
> > $image = $map->draw();
> > header( "Content-Type: image/png" );
> > $image->saveImage( '', MS_PNG, 0, 0, 0 );
> >
> > in PHP mapscript, I am unable to display the "lhas" layer. The reason I
> want
> > to
> > use mapscript is to dynamically generate the classes for the lhas layer. At
> > first, I thought it was my class manipulation in PHP that was causing this
> > layer not to display, but after moving all of the class definitions into
> the
> > mapfile, I am still unable to display them using mapscript - even though it
> > displays fine using mapserver alone. Yes, I have tried using mapscript to
> set
> > the status of the lhas layer to MS_ON, to no effect.
> >
> > What's up with this? Has anyone else experienced a similar problem before?
> >
> > Thanks,
> > Chris
> >
> 
> 
> 
> 
> 
> 
> ----- End forwarded message -----
> 
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 







More information about the MapServer-users mailing list