Ticket #30 (closed defect: fixed)
PHP_MAPSCRIPT - the infamous 'invalid _map_handle_' strikes again
| Reported by: | dmorissette | Owned by: | dmorissette |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript-PHP | Version: | 3.5 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Date: Wed, 8 Aug 2001 14:26:06 -0400 (CLT)
From: "Vinko Vrsalovic B." <v@w.cl>
To: morissette@dmsolutions.ca (Daniel Morissette)
CC: mapserver-users@lists.gis.umn.edu
Well, I finally got the time to upgrade from PHP4.0.3 to PHP 4.0.6.
I'm using the latest CVS build of MS3.5 (08-01) and when executing this code:
dl("php_mapscript.so");
$map = ms_newMapObj("../buses.map");
$imag = $map->prepareImage();
$l_stgo=$map->getLayerByName("arcosbase");
$l_stgo->set("status",1);
$l_stgo->draw($imag);
$bar = $map->drawScalebar();
$url_bar = $bar->saveWebImage(MS_PNG,0,0,0);
$map->drawLabelCache($imag);
$url = $imag->saveWebImage(MS_PNG, 0,0,0);
I get a:
Fatal error: Object has an invalid '_map_handle_' property in
/var/www/html/ms_demo/php/layer.php on
line 11
If I change the $l_stgo->draw($imag); line to $imag=$map->draw();
it works perfectly.
Change History
Note: See
TracTickets for help on using
tickets.
