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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

without www, silver stripe show [Warning]


Go to End


2 Posts   1239 Views

Avatar
adamhk

Community Member, 5 Posts

23 April 2015 at 6:57am

Please help!
[Warning] is_readable(): open_basedir restriction in effect. File(/usr/share/pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php) is not within the allowed path(s):

Source
189
190 foreach (self::explodeIncludePath() as $path) {
191 if ($path == '.') {
192 if (is_readable($filename)) {
193 return true;
194 }
195 continue;
196 }
197 $file = $path . '/' . $filename;
198 if (is_readable($file)) {
199 return true;
200 }
201 }
202 return false;
203 }
204

### SILVERSTRIPE START ###
# Deny access to templates (but allow from localhost)
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

# Deny access to IIS configuration
<Files web.config>
Order deny,allow
Deny from all
</Files>

# Deny access to YAML configuration files which might include sensitive information
<Files *.yml>
Order allow,deny
Deny from all
</Files>

# Route errors to static pages automatically generated by SilverStripe
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
RewriteBase '/'

# Deny access to potentially sensitive files and folders
RewriteRule ^vendor(/|$) - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC]

# Process through SilverStripe if no file with the requested name exists.
# Pass through the original path as a query parameter, and retain the existing parameters.
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* framework/main.php?url=%1 [QSA]
</IfModule>
<IfModule mod_php5.c>
php_value safe_mode 0
php_value open_basedir 0
</IfModule>
### SILVERSTRIPE END ###

Avatar
camfindlay

Forum Moderator, 267 Posts

24 April 2015 at 9:01am

hey adamkh - open_basedir is a php setting they needs to be changed in the php.ini file. If you are on shared hosting I think you can use the htaccess file to set some of these things.

Try adding:

php_admin_value open_basedir none

to the top of your htaccess (though use this with caution, it would be better to set the explicit path if you know it).