Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problems with shared hosting environment....

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

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

Page: 1
Go to End
Author Topic: 2346 Views
  • JohnnyO
    Avatar
    5 Posts

    Problems with shared hosting environment.... Link to this post

    Hey,

    Have had a look around the forums and have managed to sort out a couple of the problems I've run in to with Silverstripe with the latest download (silverstripe-v2.0.2b)

    Have been running/ playing about on my laptop but things are not going smoothly when installed in a shared hosting environment - with safe mode and open_basedir restrictions.

    I've managed to get silverstripe installed following tips found at http://www.silverstripe.com/general-discussion/flat/1699 - but there are a lot of error messages:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../_ss_environment.php) is not within the allowed path(s): (/tmp:/www/virtual/someSite.co.nz/htdocs:/www/virtual/tmp:/usr/local/php5/lib/php) in /www/virtual/someSite.co.nz/htdocs/sapphire/main.php on line 40

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../../_ss_environment.php) is not within the allowed path(s): (/tmp:/www/virtual/someSite.co.nz/htdocs:/www/virtual/tmp:/usr/local/php5/lib/php) in /www/virtual/someSite.co.nz/htdocs/sapphire/main.php on line 40

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

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

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

    I'm no genius and have no idea what/ where _ss_environment.php comes from.

    I can get everything looking neat and tidy - hiding these warnings via .htaccess file but things are broken.

    When managing Files & Images, I can successfully create a new dir (images) and it looks as though I can create a new sub dir too (images/brands) but as soon as I refresh the admin site, there is no dir - and logging in via FTP, you can't see the dir.

    I'm wanting to persist with Silverstripe and figured I could just ftp all these files - which worked fine until I try and use the images. The links within the pages reference a different location eg. assets/images/brands/_resampled/ResizedImage25079-bechstein.gif which doesn't exist.

    Anyone able to offer any suggestions/ help!

    Thanks.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Problems with shared hosting environment.... Link to this post

    This is a bit of a hack, but it should give you a fix:
    Remove lines 38-44 of main.php - the stuff about envFiles.

    We'll need to change this code to only execute if you don't have safe mode / open_basedir set.

  • JohnnyO
    Avatar
    5 Posts

    Re: Problems with shared hosting environment.... Link to this post

    Hey thanks Sam.

    Removing those lines sorted out the problem with the warnings, but the bigger problem still remains - I'm unable to create subfolders/ upload any assests via the Files & Images section of the admin site.

    I don't get any error/ messages to help troubleshoot the problem.

    When I try and upload an image the following is displayed:
    ERROR:
    Error

    The website server has not been able to respond to your request.

    Thanks in advance!

    John

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Problems with shared hosting environment.... Link to this post

    Place this line in your _config.php inside mysite:

    Director::set_environment_type('dev');

    This should then give you some actual error information so you can either attempt to resolve, or ask again here on the forums.

    Hope this helps!

    Sean

  • JohnnyO
    Avatar
    5 Posts

    Re: Problems with shared hosting environment.... Link to this post

    THat's better - a lot more detail now!

    As with all the other problems - related to safe mode restrictions:
    FATAL ERROR: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 4596 is

    not allowed to access /www/virtual/someSite/htdocs/assets/images owned by uid 33
    At line 209 in /www/virtual/someSite/htdocs/sapphire/filesystem/Folder.php

    copy(/www/virtual/tmp/phpgmMGcw,/www/virtual/someSite/htdocs/assets/images/1.jpg)
    line 209 of Folder.php

    Folder->addUploadToFolder(Array)
    line 156 of AssetAdmin.php

    AssetAdmin->doUpload(Array,Form)
    line 108 of Controller.php

    Controller->run(Array)
    line 48 of Director.php

    Director::direct(admin/assets/index/1)
    line 100 of main.php
    Context

    Is there anything constructive I can pass on to the hosting company which will provide a solution? They do seem very reasonable people

    2346 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.