[MS4W-Users] converting saveImage to ms4w 4.0
Jeff McKenna
jmckenna at gatewaygeomatics.com
Wed Apr 10 16:05:05 EDT 2019
Hello,
This was answered recently, but here are the steps to follow through for
you:
As you know, as of the MS4W 4.0 release, PHP is be handled through the
SWIG mapscript API for MS4W, making PHP support better supported in the
long run (as the same functions will be used by other languages as Java,
Python, etc). This means that to find your available functions and
methods, the list is now found in the SWIG API document at
https://mapserver.org/mapscript/mapscript.html
In your case, you can open that document and go to the imageObj section
(https://mapserver.org/mapscript/mapscript.html#imageobj) and you will
notice that the former function "saveImage()" is not there.
Now what to do?
- look at the SWIG API doc for another method to use. You will notice
that there is a "save()" method listed as part of the imageObj, that
requires a mapfile and path. In fact you can see this in action in the
file on your machine at /ms4w/Apache/htdocs/quickmap.php (see line#38).
- if you cannot find a similar function or method, then file a new
ticket in the MapServer issue tracker, mentioning the exact function
name that was included in the PHP MapScript API and is not available in
the SWIG API. File the ticket at
https://github.com/mapserver/mapserver/issues/
If you need a faster fix you can always contact me directly for my
assistance.
Thank you for using MS4W.
"MS4W: open doors as well as windows"
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
On 2019-04-09 4:57 PM, Julian Winter via MS4W-Users wrote:
> Hi,
>
> I’m converting some php mapscripts to the ms4w implementation (Mapserver
> 7.4dev) and running into an issue when saving imageObjs. I get the
> following error when calling saveImage.
>
> *Fatal error*: Uncaught Error: Call to undefined method
> imageObj::saveImage()
>
> The same error is reported for “saveWebImage”.
>
> Any ideas?
>
> Thanks in advance.
>
>
More information about the MS4W-Users
mailing list