473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

open_basedir is commneted out in my php.ini file, yet I still get the error messages

If I ssh to my server and look at the php.ini file, it apears that
open_basedir is off:

; 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 =

yet I still get these errors:

e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp3

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
on line 116
What is up with that?

Mar 12 '07 #1
6 15023
On Mar 12, 5:12 pm, "lawrence k" <lkrub...@geocities.comwrote:
If I ssh to my server and look at the php.ini file, it apears that
open_basedir is off:

; 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 =

yet I still get these errors:

e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp3

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
on line 116

What is up with that?

By the way, I've tried to follow the advice on this page:

http://us2.php.net/features.safe-mode

I added this line:

php_admin_value open_basedir none

to my httpd.conf file and then I restarted Apache. No dice. Still got
the same problem.
Mar 12 '07 #2
On Mar 12, 5:12 pm, "lawrence k" <lkrub...@geocities.comwrote:
If I ssh to my server and look at the php.ini file, it apears that
open_basedir is off:

; 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 =

yet I still get these errors:

e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp3

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
on line 116

What is up with that?


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>
RewriteEngine On
AllowOverride All
php_admin_value open_basedir "/home/httpd/vhosts/monkeyclaus.org/:/usr/
share/pear"
</Directory>

However, I'm still getting open_basedir errors.
Mar 13 '07 #3
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

HTH,
--
Rik Wasmus

Mar 13 '07 #4
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?

Mar 14 '07 #5
On Mar 14, 2:16 am, "lawrence k" <lkrub...@geocities.comwrote:
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.

Mar 14 '07 #6
Rik
lawrence k <lk******@geocities.comwrote:
On Mar 14, 2:16 am, "lawrence k" <lkrub...@geocities.comwrote:
>On Mar 13, 2:20 pm, luiheidsgoe...@hotmail.com wrote:
e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp3
httpdocs....
Warning: file_exists(): open_basedir restriction in effect.
File(...httpdocs...) is not within the allowed path(s):
(.../httpsdocs/...)
httpSdocs
<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.
You have a <Directoryhere that only is valid in you /httpdocs/ path, not
your httpSdopcs. Any settings/php_flags etc. won't be valid for any code
in /httpsdocs/ as it is a total different directory. That's what I was
trying to say.
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".
That's extremely well documented in Plesk's manual. If you'd ask: what
files are used in Plesk to configure a specific domain/folder, you'd have
had a answer in minutes.

Golden Rule when using third party applications/programs/software: consult
THAT manual first.
--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel
Mar 14 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Schoo | last post by:
I don't know how this happened, but my development workstation suddenly stopped showing error messages in IE and instead shows a web portal of some kind that has "Problems finding what you're...
4
by: Piotr Sawuk | last post by:
I'm a newbie in the world of c++, and I am used to learn a programming language simply by programming. Unfortunately I where unable to find any useful helpfile for this language, in which such...
1
by: Jean-David Beyer | last post by:
I am presently running DB2 V8.1.6 on Red Hat Enterprise Linux 3 ES. Every second, the following messages appear in my /var/log/messages file: Jul 10 09:04:45 kernel: application bug:...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
1
by: LP | last post by:
If you can't seem to eliminate throwing this exception, then the answer is to look for a different file opened previously with an invalid or missing filename. For example, assume the following...
4
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
3
by: vhogan | last post by:
Hi. Yes DOS still lives.... I am directing multiple delete (DEL) commands to an output file e.g. del /F /Q D:\Oracle\CoreMid\Apache\Apache\logs\*.* >vh.txt del /F /Q...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.