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

warning: is_readable()


Go to End


1296 Views

Avatar
adamhk

Community Member, 5 Posts

22 April 2015 at 10:28am

Please help!
How do I solve this problem.
The Silver Stripe was installed on Sentora 1.00, centos 6. Php version 5.3.3.
Is there any way to bypass it through editing the .htaccess?
I don't want to mess with the php.ini.
I tried the method on the forum, but it does not work.
I am not sure where to put the php_value safe_mode "0" and php_value open_basedir "0".
Also different versions php use different command. I am not sure if the command above will work with my php version.

[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

Trace
is_readable(/usr/share/pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php)
Loader.php:198
Zend_Loader::isReadable(Zend/Translate/Adapter/I18nRailsYamlAdapter.php)
Translate.php:126
Zend_Translate->setAdapter(Array)
Translate.php:93
Zend_Translate->__construct(Array)
i18n.php:2146
i18n::get_translators()
i18n.php:2053
i18n::_t(SecurityAdmin.NEWGROUP,New Group,,)
Core.php:169
_t(SecurityAdmin.NEWGROUP,New Group)
Group.php:54
Group->populateDefaults()
DataObject.php:429
DataObject->__construct()
ReflectionClass->newInstance()
InjectionCreator.php:20
InjectionCreator->create(Group,Array)
Injector.php:548
Injector->instantiate(Array,Group)
Injector.php:854
Injector->get(Group)
Core.php:157
singleton(Group)
Security.php:964
Security::database_is_ready()
Controller.php:75
Controller->init()
RootURLController.php:118
RootURLController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:370
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:153
Director::direct(/,DataModel)
main.php:177

.htaccess

### 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>
### SILVERSTRIPE END ###