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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Suddenly broken site (PLESK)


Go to End


12 Posts   4295 Views

Avatar
martbarr

Community Member, 59 Posts

15 July 2011 at 10:26am

Hi,

I started to get this in my error_log:-
PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: open_basedir restriction in effect.
File(/var/www/vhosts/stmartinsherwood.org.uk/httpdocs) is not within the allowed path(s): (/var/www/vhosts/stmartinsherwood.org.uk/httpdocs/:/tmp/)
in /var/www/vhosts/stmartinsherwood.org.uk/httpdocs/sapphire/core/ManifestBuilder.php on line 69

and the dreaded white screen of whiteness.
ISP reckons nothing changed but neither has my code or DB!

a) why in the warning am I getting "file not within the path" when it clearly is?
b) this eventually leads to a PHP error Debug class not found - which I think is caused by the basedir strangeness.
c) Any one got any clues where to start to fix - as site is well and truly down!

The code and db when copied to my own server work great with no errors/warnings in the log.
Tempted to go to a new ISP but time is against me!

Thanks very much for any wisdom!
Martin

Avatar
Chris_Bryer

Community Member, 35 Posts

15 July 2011 at 4:27pm

have you added a silverstripe_cache folder in your base directory? it kinda looks like its trying to write temp / cache files to a folder it doesnt have permission to write to. just a guess..

-Chris

Avatar
martimiz

Forum Moderator, 1391 Posts

15 July 2011 at 11:13pm

small typo: make it silverstripe-cache :-) And be sure to make it writable...

Avatar
martbarr

Community Member, 59 Posts

15 July 2011 at 11:18pm

Hi,

Yes have silverstripe-cache and it's writable.
This site has been up for over a year, and suddenly failed out of the blue with this error.
So have started fresh and a new install gives the same errors.
So I think it's with the service provider - bu they are saying not!

Given that the exact same code and DB work on my home server and work server I think it's likely !
Asked them to turn off open_basedir temporarily to see if that gets me anywhere.
I expect it's a Plesk upgrade that's tightened something as I can pinpoint the day the warnings started in the log.

I'd love a temporary way of turning off a hosted open_basedir but no success so far.
No access to /conf folder !!!

Cheers anyway!
Martin

Avatar
swaiba

Forum Moderator, 1899 Posts

16 July 2011 at 12:01am

I'd love a temporary way of turning off a hosted open_basedir but no success so far.
Isn't this possible in vhost.conf?

Avatar
martbarr

Community Member, 59 Posts

16 July 2011 at 12:05am

yeh sure - if only I had access to that file it would be wonderful - this is a hosted plesk service so only see httpdocs and downwards

Avatar
martimiz

Forum Moderator, 1391 Posts

16 July 2011 at 12:17am

well, the error says that open_basedir restricts your access to /var/www/vhosts/stmartinsherwood.org.uk/httpdocs, but the filemtime(MANIFEST_FILE) function on or near line 69 in ManifestBuilder.php wants to access the /tmp/ directory.

It only wants to do that if it cannot find the silverstripe-cache directory, that should be located here in your httpdocs directory: /var/www/vhosts/stmartinsherwood.org.uk/httpdocs/silverstripe-cache/

Could it be that your install always used the /tmp/ directory, but your ISP just recently turned to open_basedir? Are there any (recent) files present in your httpdocs/silverstripe-cache directory?

Avatar
swaiba

Forum Moderator, 1899 Posts

16 July 2011 at 12:17am

ah

I've had issues with open_basedir using curl... but this is only in Dev mode... something triggers a warning and silverstirpe stops to show me the warning - in live mode it doesn't and just continues. I don't suppose that helps you does it - i.e. ensure the site stays in live mode...

Go to Top