|
Posted by lawrence k on 03/14/07 06:52
On Mar 14, 2:16 am, "lawrence k" <lkrub...@geocities.com> wrote:
> On Mar 13, 2:20 pm, luiheidsgoe...@hotmail.com wrote:
>
>
>
> > Oh dear...GoogleGroups.... No newsserver in sight here...
>
> > lawrence k schreef:
>
> > > > e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
> > > > AlexSchein/SpeedofLight/TheWhiteFlag.mp3
>
> > httpdocs....
>
> > > > Warning: file_exists(): open_basedir restriction in effect. File(/home/
> > > > httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
> > > > SpeedofLight/TheWhiteFlag.mp3) is not within the allowed path(s): (/
> > > > home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
> > > > vhosts/monkeyclaus.org/httpsdocs/site_specific_files/makePurchase.php
>
> > httpSdocs
>
> > > I discovered that if the server uses Plesk, you have to edit the
> > > vhost.conf file for the domain. I edited the file, and added the
> > > php_admin_value line that you can see here:
>
> > > <Directory /home/httpd/vhosts/monkeyclaus.org/httpdocs>
>
> > Which won't do you any good, as you're not in that directory....
> > You're in httpSdocs
>
> I'm not sure I understand you. I have a script in the httpsdocs folder
> that is trying to use file_exists() on files in the httpdocs folder. I
> can't do that right now because of the open_basedir restrictions. That
> is why I have been trying to turn off open_basedir. Apparently the
> problem I face has something to do with the way that Plesk overwrites
> the default config info.
>
> I'm working on a server running Enterprise Redhat 3.
>
> I am have been researching this issue all day, and changing different
> aspects of my server, but so far nothing has worked.
>
> Here is what I've done so far.
>
> In the php.ini file I put this line:
>
> ; open_basedir, if set, limits all file operations to the defined
> directory
> ; and below. This directive makes most sense if used in a per-
> directory
> ; or per-virtualhost web server configuration file. This directive is
> ; *NOT* affected by whether Safe Mode is turned On or Off.
> open_basedir = none
>
> In the httpd.conf file I put this:
>
> php_admin_value open_basedir none
>
> In the vhost.conf file I put this:
>
> <Directory /home/httpd/vhosts/monkeyclaus.org/httpdocs>
> RewriteEngine On
> AllowOverride All
> php_admin_value open_basedir none
> </Directory>
>
> <Directory /home/httpd/vhosts/monkeyclaus.org/httpsdocs>
> RewriteEngine On
> AllowOverride All
> php_admin_value open_basedir none
> </Directory>
>
> and in the vhost_ssl.conf file I put this:
>
> <Directory /home/httpd/vhosts/monkeyclaus.org/httpsdocs>
> php_admin_value open_basedir none
> </Directory>
>
> I've stopped and restarted the server several times at this point.
>
> I'm still getting the same error.
>
> "Warning: main(): open_basedir restriction in effect. File(/home/httpd/
> vhosts/monkeyclaus.org/httpdocs/media/audio/site_specific_files/
> config.php) is not within the allowed path(s): (/home/httpd/vhosts/
> monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/vhosts/monkeyclaus.org/
> httpsdocs/buy.php on line 1"
>
> What do I have to do to turn off open_basedir and override Plesk?
Okay, I found the answer to my own question. Apparently you also have
to edit the httpd.include file, and add this line to the directory
directives:
php_admin_value open_basedir none
It is seriously like hunting for a needle in a haystack, trying to
figure out which configuration file you have to edit.
On my machine, running RedHat and Plesk, there is a httpd.include
file for every domain, and it is inside the domain folder (which is
inside of the vhosts folder), in a folder called "conf".
Wasted most of 2 damn days figuring this out.
[Back to original message]
|