[BlueOnyx:08108] Re: suPHP

Michael Stauber mstauber at blueonyx.it
Mon Aug 15 12:24:03 -05 2011


Hi Jeff,

> I'm afraid that has no effect... blank pages in Safari, Chrome says "HTTP
> Error 500 (Internal Server Error): An unexpected condition was encountered
> while the server was attempting to fulfill the request.", and error_log
> says:
> 
> [Mon Aug 15 10:48:53 2011] [error] [client 108.77.214.37] PHP
> Warning:  require(): open_basedir restriction in effect.
> File(/home/.sites/28/site1/web/wp-blog-header.php) is not within the
> allowed path(s): (/tmp/:/var/lib/php/session/) in
> /home/.sites/28/site1/web/index.php on line 17
> 
> Where "/tmp/:/var/lib/php/session/:/home/.sites/28/site1/" is clearly in
> the open_basedir of the site in question... path is correct. Adding the
> site path to global open_basedir gets the site working again.
> 
> I'm stumped! (spelled s-t-u-p-i-d) LOL
> Any other suggestions?

Yeah, I just looked into it again and tried to replicate the problem on 5106R 
and 5107R. Both show the same behaviour in that respect.

The problem is as follows (and I had forgotten and/or overlooked it):

When suPHP is enabled, ANY PHP related settings in the 
/etc/httpd/conf/vhosts/siteX Apache config files are ignored.

Instead it uses the global settings from php.ini. So that's the point where a 
restrictive hlobal "open_basedir" hits us smack in the face.

Work around:

Under "Server Management" / "Security" / "PHP Settings" set the server wide 
"open basedir" setting to this:

/tmp/:/var/lib/php/session/:/home/

Then it'll work for all sites, although this is far from being perfect <sigh>.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list