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.

General Questions

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

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

Suddenly broken site (PLESK)


Go to End
Reply

12 Posts   2911 Views

Avatar
martbarr

15 July 2011 at 10:26am Community Member, 46 Posts

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

15 July 2011 at 4:27pm Community Member, 35 Posts

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

15 July 2011 at 11:13pm Forum Moderator, 1091 Posts

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

Avatar
martbarr

15 July 2011 at 11:18pm Community Member, 46 Posts

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

16 July 2011 at 12:01am Forum Moderator, 1796 Posts

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

16 July 2011 at 12:05am Community Member, 46 Posts

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

16 July 2011 at 12:17am Forum Moderator, 1091 Posts

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

16 July 2011 at 12:17am Forum Moderator, 1796 Posts

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