MapGuide Rest Permission Deny

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

MapGuide Rest Permission Deny

swimming123
Hi All,

I just started to play with MapGuide Rest and I got permission denied error, how to fix this:

PHP Warning:  fopen(C:\Program Files\OSGeo\MapGuide\Web\www\rest\app/../cache/debug.log): failed to open stream: Permission denied in C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php on line 23
PHP Warning:  Wrong parameter count for invalidargumentexception::invalidargumentexception() in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php on line 60
PHP Fatal error:  Uncaught exception 'invalidargumentexception' in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php:60
Stack trace:
#0 C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php(23): Slim\LogWriter->__construct(false)
#1 C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php(30): LogWriter->__construct('C:\\Program File...')
#2 C:\Program Files\OSGeo\MapGuide\Web\www\rest\index.php(64): require_once('C:\\Program File...')
#3 {main}
  thrown in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php on line 60

Thank you very much.
Reply | Threaded
Open this post in threaded view
|

Re: MapGuide Rest Permission Deny

swimming123
Fixed, it's user permission setting.
Reply | Threaded
Open this post in threaded view
|

Re: MapGuide Rest Permission Deny

GordonL
Yes, after you copy the files, you have to grant the IIS User rights to the cache folder in mapguide-rest..

Reply | Threaded
Open this post in threaded view
|

Re: MapGuide Rest Permission Deny

GeorgesK
This post was updated on .
Hello all,

I've tried without success to make mapguide-rest work. I even grant full rights to the rest directory (not only cache directory), but I keep on having the same error message as swimming123 :

PHP Warning:  fopen(C:\Program Files\OSGeo\MapGuide\Web\www\rest\app/../cache/debug.log): failed to open stream: Permission denied in C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php on line 23
PHP Warning:  Wrong parameter count for invalidargumentexception::invalidargumentexception() in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php on line 60
PHP Fatal error:  Uncaught exception 'invalidargumentexception' in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php:60
Stack trace:
#0 C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php(23): Slim\LogWriter->__construct(false)
#1 C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\log_config.php(30): LogWriter->__construct('C:\\Program File...')
#2 C:\Program Files\OSGeo\MapGuide\Web\www\rest\index.php(64): require_once('C:\\Program File...')
#3 {main}
  thrown in C:\Program Files\OSGeo\MapGuide\Web\www\rest\vendor\slim\slim\Slim\LogWriter.php on line 60

I am using IIS 7 (under Windows 7) and MapGuide Open Source 3.0 final

Does anybody know how to solve this ?

Thanks in advance.

Georges
Reply | Threaded
Open this post in threaded view
|

Re: MapGuide Rest Permission Deny

Jackie Ng
Nothing says that all your cached files/configs/logs/etc must reside inside the mapguide-rest installation directory

If all else fails, you can set the "Cache.RootDir" property in config.php and "log.writer" property in log_config.php to point to a directory *outside* of "C:\Program Files\...".

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: MapGuide Rest Permission Deny

GeorgesK
Thanks Jackie,

I created another directory for the cache and updated the files accordingly, and it works now.

Thanks again.

Georges