[mapguide-users] physical files

Jason Birch Jason.Birch at nanaimo.ca
Sat Nov 17 14:34:13 EST 2007


Hmm, that's interesting (about the different standalone php.exe).  I don't believe that it has the MapGuide extensions loaded, as all it's doing is interacting with DBXML.  You'll want to run this script using the php.exe that's in the main WebServerExtensions/php directory.
 
You shouldn't need constants.php; the only constant you should need is the ResourceType, which I've hard-coded.
 
What version of MapGuide are you running?  I coded this against 1.2.0.  There have been some changes between MapGuide 1.0 and 1.2 so if you are not using 1.2 you may need to use MgSite instead of MgSiteConnection.  You may also run into problems with the XML stuff; I'm not sure if it was supported in PHP 5.0 (earlier versions of MapGuide came with this instead of 5.2)
 
Jason

________________________________

From: Zac Spitzer
Subject: Re: [mapguide-users] physical files


nice job... i got stuck trying to run this in C:\Program Files\MapGuideOpenSource\Server\RepositoryAdmin 

it's got a different standalone php.exe there

i changed
// Define the path to your webconfig file if it's somewhere else 
define("MG_WEB_CONFIG_FILE",'../../WebServerExtensions/www/webconfig.ini');

and got

C:\Program Files\MapGuideOpenSource\Server\RepositoryAdmin>PHP cli_listfiles.php Admin

Fatal error: Call to undefined function MgInitializeWebTier() in C:\Program Files\MapGuideOpenSource\Server\RepositoryAdmin\cli_listfiles.ph 
p on line 46

so i added (scuz my php knowledge)
with include '../../WebServerExtensions/www/mapadmin/constants.php';

and got

C:\Program Files\MapGuideOpenSource\Server\RepositoryAdmin>PHP cli_listfiles.php Admin 

Fatal error: Cannot redeclare class mgservicetype in C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\mapadmin\constants.php on l
ine 192

any idea?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4712 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071117/81a2516a/attachment.bin


More information about the mapguide-users mailing list