LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Litespeed + PHP 5.3 + open_basedir + Silverstripe

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2012, 03:12 PM
craigles craigles is offline
Member
 
Join Date: Jun 2011
Posts: 34
Default Litespeed + PHP 5.3 + open_basedir + Silverstripe

Hi Everyone,

Have a customer experiencing an issue with silverstripe in his account.

When running under apache, the site loads without issue and is fine.
However on switching to LS, the site no longer loads and throws out these sort of errors.

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/xxxx/public_html/.htaccess/_config.php) is not within the allowed path(s): (/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/xxxx/public_html/sapphire/core/i18n.php on line 1739

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/xxxx/public_html/COPYING/_config.php) is not within the allowed path(s): (/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/xxxx/public_html/sapphire/core/i18n.php on line 1739

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/xxxx/public_html/ChangeLog/_config.php) is not within the allowed path(s): (/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/xxxx/public_html/sapphire/core/i18n.php on line 1739

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/xxxx/public_html/INSTALL/_config.php) is not within the allowed path(s): (/home/xxxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/xxxx/public_html/sapphire/core/i18n.php on line 1739

Did some digging around on the silverstripe forums and found the following post:

http://www.silverstripe.org/general-...ons/show/15726

Which seems to be the same issue we are experiencing.

Does anybody know what I can do to get rid of these errors??

Cheers,
Craig
Reply With Quote
  #2  
Old 03-08-2012, 06:58 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
It is a PHP internal bug regarding open_basedir, has nothing to do with LiteSpeed, remember that Apache suphp does not enforce open_basedir at all.
You should report this bug to bug.php.net
Also, should upgrade to the latest PHP 5.3.x release or downgrade to PHP 5.2.17 see if it helps or not.
Another choice is to turn off open_basedir to match Apache suphp, we do not recommend this method as it is an extra layer of protection over suphp, good to have it.
Reply With Quote
  #3  
Old 03-08-2012, 07:09 AM
craigles craigles is offline
Member
 
Join Date: Jun 2011
Posts: 34
Hi,

Thanks for your reply.
That's interesting to note, I had no idea that suPHP didn't enfoce the open_basedir restrictions on Apache - it answers a few questions i've always wondered about.

Anyway moving back on topic, I've found the related bug at php.net - https://bugs.php.net/bug.php?id=44901

Seems to be the exact issue to a tee, but it's been reported now since 2008 and if it hasn't had much movement since then - well im hesitant to think it's going to move much now.

I think for the few customers who are using the silverstripe cms i'll just modify the code slightly so as to not treat every single entry in a directory as a directory, which appears to be what it is doing according to the errors from open_basedir.

Cheers.
Reply With Quote
  #4  
Old 03-08-2012, 07:16 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I think changing silverstripe cms code is the correct way to fix this problem.
Please post your fix to the PHP code or contribute the change back to silverstripe project if you do not mind, it will benefit to others.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:28 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.