MapGuide restricts you from writing into another session repository, so it is intentional. When you call "CreateSession" you get a clean repository, and cannot interact with the other sessions repository, even if you have the correct path.

Regards, Kenneth Skovhede, GEOGRAF A/S



nclayton skrev:
I just got this to finally work.
I had to return the ResourceId generated inside the function to use in
mainframe.php

so now my code inside mainframe.php that sets up $webLayout looks like this:

  $resourceSrvc = $site->CreateService(MgServiceType::ResourceService);
  $rid = loadWebLayout($sessionId,$resourceSrvc);
  $webLayout = new MgWebLayout($resourceSrvc, $rid);

It's odd that you cannot just create another ResourceID that references that
resource...or maybe it isn't. Is there some sort of "locking" mechanism on
resources when resourceIdentifiers are created?



Kenneth Skovhede, GEOGRAF A/S wrote:
I belive that MapGuide runs in the "System" account, so it has full
access.
Are you certain that $sid is the same sessionid as the connection has?
You cannot save to another session (perhaps the Administrator can?).

Regards, Kenneth Skovhede, GEOGRAF A/S



nclayton skrev:
I am having this exact same problem. I am using php and the ajaxviewer.
I was able to store the weblayout in Library:// but get 'Permission
denied'
when trying to store in Session:

Here is my code:

function loadWebLayout($sid,$svc){

  $lyt = <<<XML
    weblayout xml here...
XML;

  $dom = new domDocument;
  $dom->loadXML($lyt);
  $def = "Session:" . $sid . "//standard.WebLayout";
  $rid = new MgResourceIdentifier($def);
  $dat = $dom->saveXML();
  $src = new MgByteSource($dat,strlen($dat));
  $src->SetMimeType(MgMimeType::Xml);
  $svc->SetResource($rid,$src->GetReader(),null);
}

should the IUSR_* account have write/modify rights to the session folder
in
the repository perhaps?
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users



_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to