Opened 9 years ago

Closed 8 years ago

#15 closed defect (fixed)

PHP Mapscript problems in Mapserver 7.0

Reported by: TC Haddad Owned by: Jeff McKenna
Priority: major Milestone: 3.1.1 release
Component: MS4W - PHP Version:
Keywords: Cc:
Blocked By: Blocking:

Description

First reported here: https://github.com/mapserver/mapserver/issues/5142#issuecomment-135852328

Unclear extent of problem, appears to impact print related tasks.

Change History (9)

comment:1 by Jeff McKenna, 9 years ago

Component: MS4W - BaseMS4W - PHP

comment:2 by TC Haddad, 9 years ago

Found an example test that illustrates the problem. Geomoose uses PHP Mapscript for some printing tasks. Most are working as expected, however there is a call in the Geomoose print_util.php to:

   ms_shapeObjFromWKT()

that attempts to draw any vector overlay on top of a print job, and this call throws the following error:

   PHP Fatal error:  Call to undefined function ms_shapeObjFromWKT() in C:\\ms4w\\apps\\geomoose2\\htdocs\\php\\print_util.php on line 265

The error is thrown in MS4W 3.1.0-beta4 (Mapserver7) but not in MS4w 3.1.0-beta1 (Mapserver 6.2.1). This test is with Geomoose 2.8 standard demo.

comment:3 by Jeff McKenna, 9 years ago

Regarding the ms_shapeObjFromWKT error, I have Geomoose 2.8.0 installed with MS4W 3.1.0-beta4, can you give me the steps to reproduce this locally with the packaged demo? Whenever I click on the print button and then "Go!" I get valid results. Is there a specific layer in the demo that I must turn on?

comment:4 by TC Haddad, 9 years ago

Yes - apologies. The missing Mapscript item is only used when the user has a vector overlay drawn on the map. So to reproduce do the following:

  • Open the demo
  • use the Draw Polygon Tool (upper left in the layer list)
  • draw a shape on the map (I tested with polygon)
  • open print and press Go

The result will be the fatal error mentioned above.

Last edited 9 years ago by TC Haddad (previous) (diff)

comment:5 by Jeff McKenna, 9 years ago

I was able to successfully draw a polygon and print (result: http://pasteboard.co/lFG55NN.jpg).

comment:6 by Jeff McKenna, 9 years ago

Note that I am running this with MS4W-3.1.0 (32bit) on a 32bit machine. Could this be only be affecting 64bit users? Not sure, needs more testing. (I suppose it is possible that there is an issue with the phpmapscript dll on 64bit machines) hmmm... By the way, for testing PHPMapScript on a new machine I always use the MS4W file in: /ms4w/Apache/htdocs/quickmap.php (and then modify it for whatever mapfile).

comment:7 by TC Haddad, 9 years ago

Hmmm - apologies for the delayed reply. I finally got a chance to retest this in both 32bit and 64bit, and I've realized that my original result was probably an anomaly due to the fact that the beta4 I originally tested with on 64bit was actually one with an older date (mid-July). I feel bad about this as I've been testing across 3 machines and hadn't realized that that one had fallen behind.

When I retested today with the 2015-08-07 version of beta4 I am not seeing the problem.

It looks like this was a difference in Mapserver version between 7.0.0-beta2 (July) and 7.0.0 (August), and PHP 5.4.42 (July) and PHP 5.4.44 (August). So somewhere in there things apparently improved. I'm happy for this result, and sorry for the heartburn of the earlier report! Will try to keep on the lookout for anything else related to the Mapserver Github Issue...

comment:8 by Jeff McKenna, 9 years ago

Milestone: 3.1.1 release

comment:9 by Jeff McKenna, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.