Christoph Fink
Christoph Fink

Reputation: 23113

"open_basedir restriction in effect" but file is in the correct dir

I am trying to move some sites to a new server (running Plesk 11) and I am getting the following Error:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(configuration.php) is not within the allowed path(s): (C:\Inetpub\vhosts\domain.com\domains\domain.com\www\;C:\Windows\Temp) in C:\Inetpub\vhosts\domain.com\domains\domain.com\www\index.php on line 18

But the configuration.php file is in C:\Inetpub\vhosts\domain.com\domains\domain.com\www\!

I am nearly getting crazy here as this makes absolutely no sense to me.
I can even set the open_basedir value to none and still get the same error.
Same also for using PHP 5.2 or 5.3.

The only thing which got me a little bit further was setting a dirname(__FILE__) in front of the call in index.php on line 18, but this is no solution as I can't alter all file references in the whole CMS. Because of this I also tried to add the www folder to the include path without any luck.

Upvotes: 3

Views: 13023

Answers (3)

lisandro
lisandro

Reputation: 506

For IIS, I've cracked my head until I added IUSR (or whatever the user server shows when you run echo get_current_user();) to the Windows\Temp security tab.

Give that user [read] / [write] privileges on Windows\Temp and it should work.

Upvotes: 0

Sergey L
Sergey L

Reputation: 684

AFAIK there has been a problem in Plesk with disabling open_basedir on Windows. Try to delete open_basedir key from registry

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PHP\Per Directory Values\C\Inetpub\vhosts\yourdomain.com\httpdocs

Upvotes: 9

dev-null-dweller
dev-null-dweller

Reputation: 29482

Somethings wrong with your php installation, check php.ini for correct values under windows: http://php.net/manual/en/install.windows.iis7.php#example-42

If they are correct you should contact Plesk support

Upvotes: 0

Related Questions