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

Installation issues


Go to End


7 Posts   3433 Views

Avatar
philwhite

Community Member, 24 Posts

23 July 2010 at 4:55pm

I installed SS on a WAMPP setup, quickly mocked up and styled a site for demo purposes and all went well.

I then tried to install on my host (in a subdomain).

I first received the the following during installation:

Warning: require_once(Zend/Log.php) [function.require-once]: failed to open stream: No such file or directory in /www/keyword-db.de/redrope/sapphire/dev/Log.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Log.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /www/keyword-db.de/redrope/sapphire/dev/Log.php on line 2

I refreshed the browser and installation completed, but the follwoing message appeared at the top of the screen:

Warning: There are two files both containing the same class: '/www/keyword-db.de/redrope/sapphire/thirdparty/json/JSON.php' and '/www/keyword-db.de/redrope/sapphire/thirdparty/json/JSON.php'. This might mean that the wrong code is being used. in /www/keyword-db.de/redrope/sapphire/core/ManifestBuilder.php on line 461

Attempting to access the CMS, I first received the fatal error from Zend/Log.php, and on refreshing the page, received

[Warning] is_dir() [function.is-dir]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/keyword-db.de:/tmp/upload/keyword-db.de:/tmp/session/keyword-db.de:/usr/lib/php5:/usr/share/php5)
GET /admin/

Line 152 in /www/keyword-db.de/redrope/sapphire/thirdparty/Zend/Cache/Backend/File.php

The solution to the first error has been discussed here, but quite honestly, it's above me. How do I find out the directory structure my host is using to set the correct paths with ini_set(). Sorry if it's a dumb question.

I also need solutions for the other errors. I can't understand the second message, as the two files it mentions appear to be identical.

Is it all perhaps to do with installing in a subdomain?

Any help would be appreciated.

Avatar
philwhite

Community Member, 24 Posts

24 July 2010 at 2:29am

Okay, after wading through all the threads on these issues and speaking to my provider, I've got this far:

I've created a silverstripe-cache folder, which is being filled (so it works), but I'm still sporadically getting the open_basedir restriction message.

I've put an ini_set() in _config.php, and I can sporadically get the site to start, but occasionally it still throws the fatal error and shows the include path as above (i.e. as not having been changed, although it must have been to get any of the pages to come up).
This seems to have also cleared the "There are two files both containing the same class" error.
I cannot, however, get the admin pages to work at all. They always throw the fatal error.

I also tried using php_value include_path in .htaccess

php_value include_path ".:/usr/share/php5:/usr/share/php5/PEAR:/www/keyword-db.de/redrope/sapphire:/www/keyword-db.de/redrope/sapphire/thirdparty:/www/keyword-db.de/redrope/sapphire/parsers"

but that only throws the error
"The server encountered an internal error or misconfiguration and was unable to complete your request."

The provider said I needed "/svr/www/keyword-db.de..." as the path, but this had no effect in _config.php. The only thing that worked was /www... (with the leading slash).

I am now at a complete loss.

Avatar
philwhite

Community Member, 24 Posts

24 July 2010 at 6:38am

Right, I echoed the content of include_path in the actual pages delivered, and it contains the correct content when the page displays. If it doesn't have the correct content, the page doesn't display and I get an error. If I can get into the site, I can click between pages, and suddenly I will get an error, and after one (or usually several) refreshes, I can get back in again. I only have the three pages from the default installation, and it is entirely random when and on which page the error triggers.

I can't get into the CMS at all because of the open_basedir error.

Please, is anybody there?

Avatar
Devlin

Community Member, 344 Posts

24 July 2010 at 7:11am

Hi phil,

If the only problem is the open_basedir error as "File(/tmp) is not within the allowed path" and "Zend/Cache/Backend/File.php", you might want to try this:

_config.php

// workaround to get ZF cache in the right folder
$_ENV['TMPDIR'] = dirname(__FILE__)."/../silverstripe-cache";

http://www.silverstripe.org/installing-silverstripe/show/286701?start=8#post289109#post289109

Avatar
philwhite

Community Member, 24 Posts

24 July 2010 at 7:47am

Thanks for that.

I thought I had already done that by setting TEMP_FOLDER in an _ss_environment file. Has this changed since it was described elsewhere here?

Having done that, it now also lets me into the admin pages ... sporadically. They no longer fail with the open_basedir error, but sometimes with the include_path error. As with the site pages (which are just the same), the behaviour is entirely unpredictable.

But it is progress. Thanks a lot!

Avatar
philwhite

Community Member, 24 Posts

24 July 2010 at 11:18pm

Edited: 25/07/2010 11:28am

Right, I'm another step further. PHP appears to be running in CGI mode on my host, which means that I can't use "php value" in .htaccess (thows a 500 error). That at least explains why any attempt to use htaccess failed. The include_path I'm using in _config.php (with ini_set()) must be right, otherwise I wouldn't be able to call up the site at all.

I can use all the functions and navigate to all pages, but the site still sporadically throws the error

Warning: require_once(Zend/Log.php) [function.require-once]: failed to open stream: No such file or directory in /www/keyword-db.de/redrope/sapphire/dev/Log.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Log.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /www/keyword-db.de/redrope/sapphire/dev/Log.php on line 2

It is not unique to any particular page. Sometimes it will occur on a page, sometimes not.

(it also returns the warning

Warning: There are two files both containing the same class: '/www/keyword-db.de/redrope/sapphire/thirdparty/json/JSON.php' and '/www/keyword-db.de/redrope/sapphire/thirdparty/json/JSON.php'. This might mean that the wrong code is being used. in /www/keyword-db.de/redrope/sapphire/core/ManifestBuilder.php on line 461

But that's only a problem in dev mode.

Otherwise, I'm still completely at sea.

The site is at rrdemo.keyword-db.de if you want to see for yourself.

Avatar
philwhite

Community Member, 24 Posts

25 July 2010 at 11:16am

I've cobbled together a workaround, but it's not a really long-term fix:

I did a search and replace for require_once 'Zend in the whole of the sapphire directory, replacing with require_once '/full/path/to/Zend

I then had to make 4 similar manual changes to the "require_once" lines in Zend/Cache.php

The site seems now to work without throwing errors.

I cannot understand why the ini_set function in _config.php isn't working all the time. On pages which displayed, I could echo include_path, and it was set correctly with the full paths. When the error was thrown, the error showed the path set as default (without the full paths).

Any suggestions for a proper fix would be appreciated.