gmap demo : Fatal error: Object expected as argument. in /home/ii/mapserver/gmap/htdocs/gmap75.php3 on line 696
Daniel Morissette
morissette at dmsolutions.ca
Tue Mar 13 17:02:51 PST 2001
This is a follow-up on a bug with MapScript with PHP4.0.4 that was
posted a few weeks ago:
Angus D Madden wrote:
>
> When I first load gmap75.phtml, everything runs
> fine, the images are created, and the applet loads. However, as soon as
> I click on anything, I get the following error:
>
> Fatal error: Object expected as argument. in
> /home/ii/mapserver/gmap/htdocs/gmap75.php3 on line 696
>
There was indeed a bug that will cause random instability in MapScript
v3.4 compiled with PHP 4 ... the fix will be part of the next 3.5
release, but I have seen a few messages on the list about odd behaviors
with PHP4 MapScript and while I'm not 100% sure I suspect that some of
them may be related to this.
So if you are running PHP4/MapScript with v3.4 and noticed intermittent
crashes or the above error message, then it might be a good idea to
patch your php_mapscript.so. (Note that this bug was for PHP4 only...
PHP3 is fine)
The fix is to add a ZVAL_ADDREF() call at the end of the PHP4 version of
_phpms_add_property_object() in php_mapscript_util.c, around line 545:
*(*phandle) = *pObjToAdd;
ZVAL_ADDREF(*phandle);
return 0;
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
http://www.dmsolutions.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list