[Cartoweb-users] LayersInitProvider.php

Oliver Christen oliver.christen at camptocamp.com
Tue Feb 9 02:23:19 EST 2010


hello

you may try to comment the parameter legendResolutions in your layers.ini on 
serverside and see if it solve the problem.


I dont know exactly why the errror happens, but it is related to the 
creation of pseudo-layers used for classification representation in the 
layer tree. This is only a wild guess but maybe the layer for which the 
pseudo-layers are created is invalid.

If you want to figure exactly what's happening, you may try to replace the 
line 197 in the file LayersInitProvider.php :

$tempLayer = ms_newLayerObj($msMapObj, $msLayerObj);

by this:

try {
        $tempLayer = ms_newLayerObj($msMapObj, $msLayerObj);
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
}

this should display any error returned by mapserver when creating a new 
layer object. I suspect $msLayerObj is invalid or empty.

and since the LayersInitProvider is only called once at the first access, 
you need to do a phpcw3setup.php --clean to remove all existing 
mapinfo_cache and mapresult_cache

regards
Oliver

> Hi folk,
> I moved a Cartoweb package on another localhost.
> on the first machine everything runned correctly. On the second I
> performed installation of Cartoweb (with previous Mapserver and Apache
> test) and it's ok. I added my folders and upgrade, others projects (all
> the demo, for example) work but not the last one. The text error is:
>
> Fatal error: Call to a member function setMetaData() on a non-object in
> C:\ms4w\apps\cartoweb3\coreplugins\layers\server\LayersInitProvider.php
> on line 199
>
> Why a php for Init provider?! What is the error? I checked in cartoweb
> list archive but no info founded.
> The folder used is exactly the same, not forgot anything.
> Thanks
>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list