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.

Installing SilverStripe /

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

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

[SOLVED] SS3 installation error: [Warning] is_readable(): open_basedir restriction in effect


22 Posts   8897 Views

Optic Blaze

Community Member, 163 Posts

26 October 2012 at 8:12am

Ok seemed to have found the file that contains the address to the "/usr/share/pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php" file. It is located in 'framework/i18n/i18TextCollector.php'

On line 516 it seems that a language file is written for the i18nRailsYamlAdapter. Just need to figure out how to change the directory that the file is created to to '/usr/share/php'


Forum Moderator, 801 Posts

30 October 2012 at 12:31pm

i18n.php calls require_once 'i18nRailsYamlAdapter.php';
This should go through the include paths, starting with the current directory, and find the file in framework/i18n/i18nRailsYamlAdapter.php
Does this file exist for you? If it doesn't, PHP will continue traversing the include_path parts.
Please try adding ".:" (without the quotes) at the start of your include_path setting.
I've tried to prevent this config error in the future by making the require_once directives a bit more specific:

Optic Blaze

Community Member, 163 Posts

30 October 2012 at 8:21pm

Hi Ingo thanks for the reply, i really appreciate it.

1) I checked and the 'framework/i18n/i18nRailsYamlAdapter.php' exists
2) I dont know if this is relevant but i thought that i should mention that this test site is in a subdirectory of a webiste
that is running SS2.5.
So the main site runs on '' (SS2.5) and this test site runs under '' (SS3.02)


As per your suggestion tried the following:

in the i18.php file i changed the require_once call from
require_once 'i18nRailsYamlAdapter.php';
// to
require_once '.:i18nRailsYamlAdapter.php';

i had the following error:

Warning: require_once(.:i18nRailsYamlAdapter.php): failed to open stream: No such file or directory in /usr/www/users/opticb/customers/diveschoolcapetown/framework/i18n/i18n.php on line 3 Fatal error: require_once(): Failed opening required '.:i18nRailsYamlAdapter.php' (include_path='/usr/www/users/opticb/customers/diveschoolcapetown/framework:/usr/www/users/opticb/customers/diveschoolcapetown/framework/parsers:/usr/www/users/opticb/customers/diveschoolcapetown/framework/thirdparty:.:/usr/share/php:/usr/share/pear') in /usr/www/users/opticb/customers/diveschoolcapetown/framework/i18n/i18n.php on line 3


Then i tried making the changes you showed on GITHUB to the i18.php

require_once 'Zend/Translate.php';

// Overrule Zend_Loader
require_once FRAMEWORK_PATH . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'i18nRailsYamlAdapter.php';
require_once FRAMEWORK_PATH . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'i18nSSLegacyAdapter.php';

And got the following error

[Warning] is_readable(): open_basedir restriction in effect. File(/usr/share/pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php) is not within the allowed path(s): (/usr/wwws/users/opticb:/usr/www/users/opticb:/usr/home/opticb:/usr/local/rmagic:/usr/www/users/he/_system_:/usr/share/php:/usr/local/lib/php:/tmp:/usr/bin:/usr/local/bin:/usr/local/share/www:/usr/share/misc)
GET /customers/diveschoolcapetown/dev/build?flush=1

Line 198 in /usr/www/users/opticb/customers/diveschoolcapetown/framework/thirdparty/Zend/Loader.php


Forum Moderator, 801 Posts

30 October 2012 at 10:44pm

The ".:" needs to go at the start of your "include_path" PHP configuration setting, not the require_once() call.
As for the last error message you're getting, that's really really weird. The changed require_once() call
contains an absolute path to the file in your webroot, nothing in the /usr directory.
Running the website in a subdirectory of another SS installation shouldn't have an effect on this specific
problem, although its generally not a good idea due to autoloading issues.
Would be good to get a stacktrace on your last error, but otherwise I'm out of ideas.

Optic Blaze

Community Member, 163 Posts

31 October 2012 at 12:35am

Thanks for the reply.

I have included a stack trace (i hope i did it right).

Out of pure frustration i went and commented out line 200 - 204 in Thirdparty/Zend/Loader.php (see below).

I then tested if the following files still loaded. They did load.

I dont get the open base error any more. I dont know what else to do.... i just hope this wont bite me in the ass later.

Thirdparty/Zend/Loader.php now it looks like this:

foreach (self::explodeIncludePath() as $path) {
if ($path == '.') {
if (is_readable($filename)) {
return true;
/*         $file = $path .'/' . $filename;
if (is_readable($file)) {
return true;

return false;

Attached Files

Forum Moderator, 801 Posts

2 November 2012 at 9:28am

We've merged in a fix which forces the current directory to be part of the include_path:

Optic Blaze

Community Member, 163 Posts

2 November 2012 at 9:50am

Thanks Ingo, i really appreciate it. I was really stuck there at one stage.
That solved the problem!!!!


Community Member, 3 Posts

12 November 2012 at 10:47pm

I have a similar but unsolved issue.

The warning message has led me seriously astray and I've looked in many places to do with /usr/share/pear and /usr/share/pear-addons thinking I was missing something there. This subject seems to fit a lot better with my actual problem!

I was converting a ss 2.4 to ss3.0.2

Once I have deleted CMS and Silverstripe directories and copied CMS and framework from version 3 in (along with .htaccess and index.php) and run {site]/dev/build/?flush=1 I get the following error:

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

You can see why I was led astray!!!

But reading the posts in this subject in the forums has given me a clue. The file l18mRailsYamlAdapter.php is NOT in the {webroot}/framework/Zend/Translate/Adapter directory it is looking in so therefore is searching further along the allowed paths and doesn't find it in any of them either, eventually giving up with the open_BaseDir error

The site has userforms module. I deleted it and downloaded the latest version whcih said it was compatible with ss v3.0

Any help would be immensely appreciated.