warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/fckstyles.xml) is not within the allowed path(s): (/home/xxxxxxx/:/tmp:/usr/local/lib/php/) in /usr/home/xxxxxxxxxx/domains/xxxxxxxxxxx.nl/public_html/sites/all/modules/fckeditor/fckeditor.module on line 786.
After downgrade to fck-editor 6.x-1.4 warning dissapear.
Comments
Comment #1
zacho commentedI second this. Seems like a bad path is being fed to file_exists?
edit: $themepath not being correctly set?
Comment #2
obris commentedsame for me
Comment #3
Jorrit commentedThat's strange. What theme are you using? Where is the theme located?
Can you verify if the value $theme_key exists around line 1137 of fckeditor.module?
Comment #4
HowToHolidayCottage commentedI've got the same problem. I think I'll downgrade too, but being new to Drupal I'm not sure how to do a downgrade. Do you uninstall the module and then delete the module files, and then download the new module?
Or is there a quicker way?
Comment #5
zacho commentedAs a logged-in user with working permissions to use FCKeditor, but on a page with no textareas, fckeditor.module is being processed with the $themepath variable set to null. This causes file_exists() to be called in two places with only the terminal portion of a path, namely "/fckstyles.xml" and later "/fckeditor.css".
(As the same user, but on a page with an FCKeditor-accessible textarea, it seems like fckeditor.module is getting processed twice -- once where $themepath doesn't get set (causing warnings) and once more where it gets set correctly.)
This looks to the operating system like we're searching for a file directly at root, and if open_basedir restrictions are in effect (as they are in many virtualhost commercial environments) the system throws the loud PHP warnings indicated by the original posting.
One can prevent PHP warnings from being spilled to screen by changing the error reporting settings (Administer > Site configuration > Error reporting), but it will still fill our logs with ugly messages that may raise the eyebrows of our hosting providers.
Moreover, this seems to somehow be causing FCKeditor to occasionally fail to load, though I can't explain that.
Also, this happens both in my normal theme (a Framework modification) and in Garland.
Comment #6
bjaast commentedsame problem with "green and black" theme...
edit: it seems to me that the error fires on a page were fckeditor interface is set to simplified toolbar.
i.e. the error occurs on a page that contains the field addressed in fckeditor management area as:
*.edit-site-offline-messageand in similar pages.
Comment #7
Jorrit commentedThe fckeditor_path_to_theme method is only used in the administrative panel and in the function that displays the editor. So having the error on a page without an FCKeditor looks impossible. Perhaps the Drupal error message comes from a different page view.
I still can't find out why this is happening. Does it happen for all text areas or just some?
Comment #8
Jorrit commentedthe function fckeditor_path_to_theme was introduced to fix a problem when path_to_theme would in some cases not return the right result. Perhaps the following replacement helps your cases. Please let me know if it helps.
Replace the function fckeditor_path_to_theme (bottom of fckeditor.module) with:
Comment #9
bwillia commentedThanks Jorrit, your function seems to fix the problem!
Comment #10
Federico67 commentedCiao.
I've tried to update from fck-editor 6.x-1.4 to fck-editor 6.x-2.0. After update.php execution I've a notify in Status report that tell me "Database out of date". I repeat update.php execution more and more time but nothing happen: same notify appear in Status report.
Some suggestion?
Thanks
Comment #11
Jorrit commentedFederico67: could you open a new issue instead of posting a reply to this one? Your problem is unrelated to the problem of this issue.
Comment #12
Federico67 commentedOk, sorry
Comment #13
summit commentedSubscribing, #8 is working. Will this be committed?
greetings, Martijn
Comment #14
PipB commentedSorry for my late response: the theme i use is "Clean"
I haven't tried #8
Comment #15
bjaast commentedYes it worked! Thanks a million.
Anyway it was happening only in those pages showing fckeditor with simplified toolbar, as I mentioned, in those pages whose path matched the paths listed in the administrative panel.
Thanks again, it looks like the problem is solved.
Comment #16
summit commentedHi,
But still the #8 needs to be patched, right?
greetings, Martijn
Comment #17
PipB commentedI installled a new drupal on a new site with fckeditor 6.x-2.0 and it seems it was OK. But when i visit in admin > site-information and
site-maintenance the error appear:
file_exists() [function.file-exists]: open_basedir restriction in effect. File(/fckstyles.xml) is not within the allowed path(s): (/home/xxxxxx/:/tmp:/usr/local/lib/php/) in /usr/home/xxxxxx/domains/xxxxx.nl/public_html/sites/all/modules/fckeditor/fckeditor.module on line 786.
I use theme Clean in themes/clean
I replaced in fckeditor.module at the bottum the code:
function fckeditor_path_to_theme() {
global $theme_key;
static $themepath;
if(empty($themepath)) {
$themepath = drupal_get_path('theme', $theme_key);
}
return $themepath;
}
by #8
Error is disappeared
Thanks!!!
Comment #18
Jorrit commentedIt has been committed to the 2.0 branch
Comment #19
exile_ch commentedyes good one. 8 helped
Comment #21
gultig commentedThank you it worked for me.
Comment #22
roman-drupal commented#8 Worked for me aswell - great job!
Thanks
R
Comment #23
vir_2 commented#8 worked for me too
thanks
Comment #24
Munkhbuyan commented