Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Warnings - open_basedir restriction in effect / is not within the allowed path(s) / Permission denied


Reply


5 Posts   4836 Views

Avatar
smordi

9 Posts

2 September 2007 at 12:04am

Hi all!

Does anybody know what I can do to fix this problem?
It appears only when I open the page the first time after turning on the computer:

<b>Warning</b>: is_dir() [<a href='function.is-dir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.is-dir</a>]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>50</b><br />
<br />
<b>Warning</b>: is_dir() [<a href='function.is-dir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.is-dir</a>]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>64</b><br />

<br />
<b>Warning</b>: is_dir() [<a href='function.is-dir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.is-dir</a>]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>82</b><br />
<br />
<b>Warning</b>: scandir(/www/htdocs/v155019/logs) [<a href='function.scandir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.scandir</a>]: failed to open dir: Permission denied in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>146</b><br />

<br />
<b>Warning</b>: scandir() [<a href='function.scandir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.scandir</a>]: (errno 13): Permission denied in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>146</b><br />
<br />
<b>Warning</b>: scandir(/www/htdocs/v155019/mail) [<a href='function.scandir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.scandir</a>]: failed to open dir: Permission denied in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>146</b><br />

<br />
<b>Warning</b>: scandir() [<a href='function.scandir?PHPSESSID=7598bbbd5b0977ca53742e31ae92debd'>function.scandir</a>]: (errno 13): Permission denied in <b>/www/htdocs/v155019/sapphire/core/ManifestBuilder.php</b> on line <b>146</b><br />

Thanks guys!

Best
smordi

Avatar
SiSt

Community Member, 5 Posts

2 September 2007 at 6:05am

You can edit the ManifestBuilder.php and put an @ in front of each is_dir() / scandir() / file_exists so that they don't output warnings / errors. There might be a better way, but I've found this pretty easy.

For line 50:

if( @is_dir($fullPath) && @file_exists($fullPath . '/_exclude.php') )

Avatar
smordi

9 Posts

2 September 2007 at 6:57am

Hi and thanks a lot!
That helps (for the first time).

It would be nice if somebody else has a different solution for that.

Best

Avatar
Willr

Forum Moderator, 5513 Posts

2 September 2007 at 11:47am

I think andy fixed all the open_basedir restriction warnings and errors last week. You might like to try the daily builds and see if that works for you.

Avatar
smordi

9 Posts

2 September 2007 at 9:42pm

Edited: 02/09/2007 10:03pm

I followed the documentation of upgrading to a higher build. I used the silverstripe.2.0.DailyBuild.2007-09-02.tar.gz and overwrote the files cms, sapphire and jsparty.
First it worked without any warnings, but after cleaning the browser's cache, Firefox gave this warning:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept
cookies.

So I tried to open the page by using the flush-option (?flush=1) to clean the cache, but then these warnings appeared:

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/v155019/sapphire/core/ManifestBuilder.php on line 50

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/v155019/sapphire/core/ManifestBuilder.php on line 64

Warning: Warning: there are two 'BBCodeParser' files: '/www/htdocs/v155019/sapphire/parsers/BBCodeParser.php' and '/www/htdocs/v155019/forum/code/BBCodeParser.php'. This might mean that the wrong code is being used. in /www/htdocs/v155019/sapphire/core/ManifestBuilder.php on line 153

Warning: Warning: there are two 'TextParser' files: '/www/htdocs/v155019/sapphire/parsers/TextParser.php' and '/www/htdocs/v155019/forum/code/TextParser.php'. This might mean that the wrong code is being used. in /www/htdocs/v155019/sapphire/core/ManifestBuilder.php on line 153

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/www/htdocs/v155019/..) is not within the allowed path(s): (/www/htdocs/v155019/:/tmp:/usr/bin:/www/htdocs/v155019:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/v155019/sapphire/core/ManifestBuilder.php on line 82

Redirecting to /Security/login... (output started on /www/htdocs/v155019/sapphire/core/ManifestBuilder.php, line 50)

mmmm....

The .htaccess looks like this:

### SILVERSTRIPE START ###
RewriteEngine On

RewriteRule \.js$ - [L]
RewriteRule \.css$ - [L]
RewriteRule \.png$ - [L]
RewriteRule \.jpg$ - [L]
RewriteRule \.gif$ - [L]
RewriteRule \.php$ - [L]

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###

Greetz
smordi