Page 1 of 1

Open Base Dir problems on windows

Posted: Wed Jan 30, 2013 6:29 pm
by sagelike
Hi there,

I've installed CMSMS 1.11.4 and have been experiencing problems with open_basedir and image uploads.

Warning: file_exists(): open_basedir restriction in effect. File(C:\Inetpub\vhosts\somewebsite.com\subdomains\demo/install) is not within the allowed path(s):

I have a number of older CMSMS installs on Windows 2008, IIS 7.5 with Plesk and haven't had these image upload problems with Windows before. I get corrupted image errors in the Gallery module or error: image too small in the slideshow module.

I've tried changing plesk from default to {docroot} or {webdocroot} and finally got it working using the direct path to httpdocs but I don't think this should be necessary.

My programmer thinks there might be a bug. Note the / slash after demo which should be \.

Anyone had these issues?

Re: Open Base Dir problems on windows

Posted: Wed Jan 30, 2013 6:45 pm
by sagelike
Well, using direct path worked briefly but now getting same set of upload errors. It seems if change open_basedir type uploads work one or twice and stop working again.

Also, using {Gallery} tag produces this error: The directory 'Gallery/' does not exist. Check your parameters.

If I add {Gallery dir=uploads/images/Gallery"} i get this:

The directory 'Gallery/uploads/images/Gallery' does not exist. Check your parameters.

I have no path set in config.php.

Re: Open Base Dir problems on windows [SOLVED]

Posted: Wed Jan 30, 2013 11:36 pm
by sagelike
Turns out it's a Plesk bug in Plesk for Windows 10.4 and possibly Linux Plesk 10.4.

Under your PHP setting, open_basedir you may need to use this: {DOCROOT};C:\WINDOWS\Temp\

In Linux Plesk: {DOCROOT}:/tmp

In Windows, you may also need to fix your open_basedir registry key assuming you can gain access to the system. Turns out Plesk 10.4 will write it incorrectly on some domains.

Just search for the domain in regedit. That's the easiest way to find it.

Works for Wordpress sites on Windows too.

Re: Open Base Dir problems on windows

Posted: Wed Jan 30, 2013 11:55 pm
by calguy1000
CMSMS does not support running under open_basedir restrictions anyways. Too many problems, and they ALWAYS turn out to be the fault of the server.