Closed (won't fix)
Project:
Drupal core
Version:
6.9
Component:
base system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2009 at 15:54 UTC
Updated:
29 Mar 2011 at 22:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
liliplanet commentedExactly the same error here in my logs. Did you perhaps find a solution? Thanx!
Comment #2
rene_w commentedUnfortunately, no. Still waiting for someone with a clue about Drupal core to chip in...
Comment #3
valayam commentedEven I am getting the same error and looking for a solution.
Comment #4
manogolf commentedDisabling PoorMansCron has no effect. Started receiving error message in log on 1.18.09 for no apparent reason. Anyone looking at this?
Comment #5
manogolf commentedDid someone find a solution?
Comment #6
rene_w commentedNope.
Any idea how to get a Drupal core developer to look at this?
Comment #7
vm commentedhttp://drupal.org/search/apachesolr_search/open_basedir%20restriction%20....
using parts of the error message and drupal.org search will provide clues. I've upgraded quite a few sites to 6.9 and don't see this problem.
When filing a bug report, the above is asked of you on each issue you create. Not providing enough information for others to test is problematic and likely to result in being bypassed in issue queues.
Comment #8
rene_w commentedWell, regarding the three questions, this should be fairly obvious from the report:
For sure, I did search on the open basedir restriction error, both using Google and on drupal.org, but did not find anything that seemed to apply in this case.
I also tried to get an idea what's happening by looking at the code, but since I'm lacking the proper context concerning core this didn't get me very far.
Details on the installation: Apache/1.3.41 (Unix) PHP/5.2.4 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a.
Comment #9
vm commentedYes the first three questions were answered but the OS information is important.
I don't believe it to be a code issue. I believe it to be a server issue.
Is safe mode enabled in php?
seems odd that such an old version of apache is being used with such a new version of php.
If 6.9 is installed on the same server in a testing folder, without it being upgraded are the same issues present? If so, it has nothing to do with the upgrade and likely a change in the server environment. To verify reinstall 6.7 in same testing folder. Are problems removed ? if so, then we can compare the changes made between 6.7 and 6.9 for a culprit.
Comment #10
rene_w commentedRegarding safe_mode, phpinfo says:
Server issue -- well, it only appeared after the upgrade to 6.9, so I guess something must have changed in the code. It seems unlikely that there was a major server reconfiguration on the same day I did my Drupal upgrade. I can try to do the separate test install of 6.9, if it really helps...
Comment #11
vm commentedit would certainly help narrow down where to look for a problem yes. This is not a wide spread issue or there would be reports of it all over the place. Most of the reports I read were related in some way to safe mode or incorrect placement of themes in /themes/ rather than in sites/all/themes and none of those reports had anything to do with cron.php.
The other thing of note here, is that when using google to search the error there are quite a few sites that have been indexed with the error message. That said, of the dozen I looked at, none of them were drupal sites.
Comment #12
vm commentedQuestion
When viewing dynamic pages, I see the following error: Warning: main(): open_basedir restriction in effect. File(/full/path/to/cgi-bin/movabletype/php/mt.php) is not within the allowed path(s): (/full/path/to/tmp) in /full/path/to/blog/mtview.php on line 2
Answer
This error indicates that your host has enabled the PHP open_base_dir setting on your server. Your host needs to add your Movable Type installation folder to the allowed paths for this setting (i.e., add the file path referenced in the error as "not within the allowed path").
The open_base_dir setting is primarily used to prevent php scripts for a particular user from accessing files in another user's account. So usually, any files in your own account should be readable by your own scripts.
replace movabletype with drupal in the Q&A. Thus I'd be asking my host if they recently made the change mentioned.
Comment #13
vm commentedmore information:
open_basedir string
Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.
When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. When the file is outside the specified directory-tree, PHP will refuse to open it. All symbolic links are resolved, so it's not possible to avoid this restriction with a symlink.
The special value . indicates that the working directory of the script will be used as the base-directory. This is, however, a little dangerous as the working directory of the script can easily be changed with chdir().
In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts) the same way as any other configuration directive with "php_admin_value open_basedir none".
Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon. As an Apache module, open_basedir paths from parent directories are now automatically inherited.
The restriction specified with open_basedir is actually a prefix, not a directory name. This means that "open_basedir = /dir/incl" also allows access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: "open_basedir = /dir/incl/"
Note: Support for multiple directories was added in 3.0.7.
The default is to allow all files to be opened.
Comment #14
vm commentedhttpd.conf is not available to you on a shared server. Thus your host would have to look into this and whether or not it can be turned back off.
Comment #15
rene_w commentedOK, here is what I just don't get: why do I get an error from Drupal "File(/tmp/mysql.sock) is not within the allowed path(s)" when /tmp is actually in the allowed path? (see my original bug report)
Understanding this error message would help me lot in actually debugging the problem...
Comment #16
vm commentedif tmp is defined as an allowed path in httpd.conf then I've run my course with helping here and will hope someone else steps in with an answer or something else for you to look into. My research has run dry.
good luck.
Comment #17
rene_w commented(from phpinfo)
Sure, if /tmp were *not* in the allowed path, the error message would actually make sense.
The reason I filed this bug in the first place is that /tmp *is* in the allowed path, yet cron generates error messages claiming it isn't...
Comment #18
wickwood commentedI have the same problem, but on a Drupal 6.10 site, not a Drupal 6.9.
I think I can very definitely say it is a server configuration problem because, as it happens, I moved my site to a new host and upgraded to Drupal 6.10 at the same time.
The error did not occur on the old host with Drupal 6.9, and I don't see it any time on the new host except when the cron is run.
Also, I am not running in safe mode, and open_basedir is set to /home:/tmp:/usr
My exact error is:
is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/tmp/mysql.sock) is not within the allowed path(s): (/home:/tmp:/usr) in /home/wickwood/public_html/includes/file.inc on line 891.I have submitted a ticket to my hosting admin, and will report back anything that I discover.
Steve
Comment #19
damien tournoud commentedSounds very much like a configuration issue. Moving to a support request.
Comment #20
ainigma32 commentedJust taking a stab at this: could it be caused by the file mysql.sock actually being a symlink to a part of the filesystem that is outside the open_basedir?
I don't know if PHP's error/warning would show the resolved symlink (real path) or just the symlink.
Maybe you could ask your provider if that is the case?
@wickwood: Could you also post some more info on your setup and especially OS and PHP version ?
- Arie
Comment #21
rene_w commentedIndeed, on my (shared) server, mysql.sock is a symlink:
and /var/lib is not in the allowed paths...
Comment #22
manogolf commentedI stopped watching this thread after upgrading to 6.10 because the error message went away.
Today I upgraded two modules fckeditor 6.x-1.3 and pathauto 6.x-2.x-dev (2009-Mar-21) and the message is back:
warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/tmp/mysql.sock) is not within the allowed path(s): (/home/manogolf/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/manogolf/public_html/sirarea22/includes/file.inc on line 891.
I wouldn't know if there is a relationship or if it is a coincidence.
Comment #23
manogolf commentedA ticket to my hosting cured the problem. Thanks for pointing out.
Comment #24
rene_w commentedmanogolf, do you happen to know what precisely your hosting provider did to fix the problem (move mysql.sock, change the allowed path for php, etc.)?
Comment #25
manogolf commentedrene_w,
I apologize for not spotting your question sooner.
My host enabled php open base directory.
Hope that means something to you because it doesn't to me.
I am just pleased they could help and it is no longer an issue.
Comment #26
tofuComputer commentedAfter upgrading I also got "File(/tmp/mysql.sock) is not within the allowed path(s)" and seeing so many messages with no solution tells me this must be a bug. Has anyone submitted this as a bug? If so, any updates?
Thanks,
TC
Comment #27
rene_w commentedIt's been a while, but this was eventually fixed by my web hoster.
The error message is misleading -- in my case /tmp/mysql.sock _was_ in the allowed path, but it was a symlink pointing to something that wasn't.
Comment #28
vm commentedbecause it was a configuration issue I'm marking won't fix.
Comment #29
ebermelho commentedAfter searching a while, found one solution:
In some cases the temporary directory in File System settings (/admin/settings/file-system)
is set to '/tmp'. After changing it to 'sites/default/temp' the problem was corrected.