Summary: | [cwc2] More graceful handling of offline servers | ||
---|---|---|---|
Product: | Chameleon | Reporter: | Dean Gadoury <dgadoury@dmsolutions.ca> |
Component: | Core | Assignee: | Paul Spencer <pspencer@dmsolutions.ca> |
Status: | CLOSED FIXED | ||
Severity: | major | ||
Priority: | P1 | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Here is what drawmap.php returns in this case: <br /> <b>Warning</b>: [MapServer Error]: msDrawMap(): Failed to draw layer named 'l21:5stations'. in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b> on line <b>487</b><br /> <br /> <b>Warning</b>: [MapServer Error]: msDrawRaster(): Unrecognized or unsupported image format in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b> on line <b>487</b><br /> <br /> <b>Warning</b>: [MapServer Error]: drawEPP(): /tmp/ms_tmp/1076597279825510.img.tmp is not an EPPL file. in <b>/raid/home/msapps/chameleon-1.0.6/htdocs/common/wrapper/drawmap.php</b> on line <b>487</b><br />
drawmap should be attempting to draw the layer and suppressing the warnings from mapserver, and then putting errors into the error manager so you would then get a popup (if you had the error manager enabled) with whatever mapserver reports ... I have seen this working so I am not entirely sure what has gone wrong here. In looking at the code, I think the problem is that it is not suppressing the error messages from mapserver, which results in text output before the image ... and ultimately corrupts the image. I have changed chameleon-1.0.6 on xcalibur to supress the message. I need dean to test his app there and see if it fixes the problem .... Dean, if the server is back online then you can always fake an error by changing the context to point to an invalid server. If this fixes the error then I will commit the change to php_utils/wrapper/drawmap.php and we can move it to chameleon-1.0.6/htdocs/common/wrapper/drawmap.php on mapsherpa.
It is still broken on xcalibur. http://www2.dmsolutions.ca/msapps/chameleon-1.0.6/cwc2.php?template=http://www2.dmsolutions.ca/msapps/ioos/ioos_sst.html&context=http://www2.dmsolutions.ca/msapps/ioos/ioos_sst.xml
this will also affect 1.99, to be fixed.
fixed in latest drawmap.php (suppress draw errors using @), this applies to both chameleon cvs and cwc2 1.0.6 since they use exactly the same version of php_utils.
cannot verify 1.0.6 bug with beta 1.99, is ioos still using cwc2 1.0.6 version? Dean, can you plese verify and/or close this bug please. Thanks
I can't reproduce it either and we're not using 1.0.6 anymore for the new app. I'll close the bug.