After upgrading from Beta1 to RC1 I got the Open Basedir errors below. I'm using Blue lagoon, with adapted tpl.php files in my main theme dir. Blue lagoon is selected ok in settings and stylesheets are read as normal.
* warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/advanced_forum-structure.css) is not within the allowed path(s): (/home/vhosts/xxx.org/httpdocs:/tmp) in /home/vhosts/xxx.org/httpdocs/sites/all/modules/advanced_forum/advanced_forum.module on line 1446.
* warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/advanced_forum.css) is not within the allowed path(s): (/home/vhosts/xxx.org/httpdocs:/tmp) in /home/vhosts/xxx.org/httpdocs/sites/all/modules/advanced_forum/advanced_forum.module on line 1446.
I'm at a loss for what can cause this error. Something with themes I guess.
Comments
Comment #1
michelleI've seen that before, long ago, and I bet I caused it again when I changed how it finds the theme. I'm not feeling up to hunting it down at the moment but you may find a fix if you search old issues.
Michelle
Comment #2
dries arnoldsHi Michelle, thanks for your reply. The old issues that make note of this error all refer to the 'path_to_theme', but since it isn't used anymore in the last version(s) I think it's not something I can solve with the solutions in the old issues.
I tried moving the css files around placing them in several theme locations and removing them in others, but it doesn't help.
Comment #3
Ingumsky commentedThe same for me while using garland -( Moving css files didn't help me.
Comment #4
prapse commentedgot the same error, so it is theme related (using 4seasons)
* warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/advanced_forum-structure.css) is not within the allowed path(s): (/www/htdocs/*****/:/tmp:/usr/bin:/www/htdocs/*****:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/*****/modules/advanced_forum/advanced_forum.module on line 1446.
* warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/advanced_forum.css) is not within the allowed path(s): (/www/htdocs/*****/:/tmp:/usr/bin:/www/htdocs/*****:/bin:/usr/local/bin:/usr/share/php) in /www/htdocs/*****/modules/advanced_forum/advanced_forum.module on line 1446.
i really don't know what to do to fix :)
Comment #5
dries arnoldsI'm using a custom built theme based on a framework (not a subtheme), so it's not specific for any theme I think.
Comment #6
michelleFrankly, what you folks are telling me is impossible and I have no clue how it could be happening. Essentially you're saying that the theme system is not initialized within the theme system. Given that debugging something that is impossible is beyond me, I'm simply going to bandaid it. If it can't get the theme from the global variable, I'll fall back to pulling it from the database.
Michelle
Comment #7
Ingumsky commentedHmmm... It's quite interesting I think — my site's mirror on my local machine (LAMP) with absolutely identical site structure, set of modules enabled, base dump etc etc works fine without any open_basedir errors occurring!
Comment #8
naheemsays commentedAdding more info to this, the css file overriding does not work either.
Placing separate css files within the theme directory to override those that come with the module does not work and the original files are loaded.
As a short hack, is there a way to suppress the error messages from showing for normal users?
Comment #9
michellenbz: If it can't find the theme directory, you can't really expect it to find files in the theme directory.
If I can get to the Y today, this is first on my list to fix.
Michelle
Comment #10
naheemsays commentedThanks. If you need any more info, I will keep monitoring this issue.
(My first post was more or less a "subscribe", but potentially with more info.)
Comment #11
michelleWell, the info I need is the reason why it's happening which no one has been able to provide. My "fix" will be a bandaid, treating the symptoms, because I have no idea why some people are having the impossible happen. There should be no way that the global theme variable is empty when called from within the theme system and yet, somehow, it is for some people. I'd love to find out why but I can't reproduce this problem. So all I can do is work around it.
Michelle
Comment #12
naheemsays commentedI have added a drupal_set_message to the
_advanced_forum_add_filesandadvanced_forum_path_to_themefunctions and from what I can see, the global $theme variable is available on the node pages but not on the forum list and forum topic list pages.Comment #13
michelleReally? And other people were reporting problems on the node pages. Very strange. The forum/topic list one is at least possible since that's not being called from within a preprocess. It's the node page issues that are "impossible". I still don't understand why though. Only a handful of people have this problem and I'm not one of them. What would be different from site to site to affect the availability of that variable there? It's quite bizarre.
Anyway, I'm at the Y so I'll get the bandaid in. If someone can come up with a real fix I can always change it later. For now, I want to get a working RC2 out. It's been delayed longer than I wanted it to due to illness and personal stuff.
Michelle
Comment #14
Ingumsky commented>> the global $theme variable is available on the node pages but not on the forum list and forum topic list pages
> Really? And other people were reporting problems on the node pages. Very strange.
I have these errors appearing on the "Forums" list page and on the lists of topics only. Node pages are virgin white.
I've tried to run phpinfo on my local machine and on production site. There's no Local or Master values set on my local server for open_basedir but both of them have been set to "/var/www/virtual/EXAMPLE.NET/:/usr/share/php/" on that troublesome one (obviously EXAMPLE.NET is just a token).
Thank you Michelle!
Comment #15
michelleOk, band-aid committed. One caveat: If you are one of the people with this issue and have multiple themes enabled, this will fall back to the default theme.
Michelle
Comment #16
naheemsays commentedI can't seem to find the commit in the CVS log.
Comment #17
michelleVery strange... Must have been some hiccup in cvs. I just committed it again and it looks like it went thru. Thanks for letting me know.
Michelle
Comment #18
naheemsays commentedJust upgraded to rc2 and I realised that the css handling is still not working for the forum topic list page on my live site (it works for the node page and I never checked on the forum list page), but the error messages as shown before no longer show.
Comment #19
naheemsays commentedJust found the bug. The lines of code you added were:
but they should be
The code is around line 1189 of advanced_forum.module. The original error message was hidden by the code because since there was no variable called default_theme, the module checked in the themes/garland folder for the relevant files.
PS thanks for this module - I have migrated from my custom setup for the forums I had from a year or so ago to advanced_forum and most people are happy with the change.
Comment #20
michelleDoh! I tried commenting out the global $theme part to "fake" the problem since it never happens on my site... But my default theme is Garland.
When I saw your post the other day I just whined about it a bit to merlinofchaos and put it on the back burner because I had absolutely no clue what to do if pulling it right out of the database didn't work. I'm glad you figured it out. :) I'll get it committed before RC3 (sigh... I was hoping I wouldnt' need RC3... Dang bugs)
Thanks,
Michelle
Comment #21
michelleCommitted, thanks.
Michelle
Comment #22
Ingumsky commentedThank you lads!
Comment #23
michelleLads? LOL! Last I checked I was a woman, and not plural. ;)
Michelle
Comment #24
Ingumsky commented*blushes*
Ugh... I'm sorry Michelle... I... I mean... Ugh... That bloody message was for you and nbz both but anyway that was horrible miss (or should I say "That was horrible, miss"? 8-) Blame on me, blame on!
Comment #25
michelleOh, oops. I didn't look that close as to what issue this was and didn't realize that was aimed at nbz. Sorry. :)
Michelle
Comment #27
jdblank commentedWe have installed the latest version of Advanced forums and it just can't seem to find the theme files or tpl pages. It seems similar to the problem described in this post that is why I am reopening this issue.
Any help would be much appreciated.
Comment #28
michelleThere's no way it could be the same as this 1.x bug that was fixed last March because the problem code doesn't even exist in 2.x. Please open a new support request and give some details otherwise I'm not going to be able to guess why it's not finding your style.
Michelle