473,803 Members | 3,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.mp 3

Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p
on line 116
What is up with that?

Mar 12 '07 #1
6 15053
On Mar 12, 5:12 pm, "lawrence k" <lkrub...@geoci ties.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.mp 3

Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p
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...@geoci ties.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.mp 3

Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p
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...GoogleGr oups.... No newsserver in sight here...

lawrence k schreef:
e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp 3
httpdocs....

Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p
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...GoogleGr oups.... No newsserver in sight here...

lawrence k schreef:
e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp 3

httpdocs....
Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p

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_f iles/
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...@geoci ties.comwrote:
On Mar 13, 2:20 pm, luiheidsgoe...@ hotmail.com wrote:
Oh dear...GoogleGr oups.... No newsserver in sight here...
lawrence k schreef:
e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp 3
httpdocs....
Warning: file_exists(): open_basedir restriction in effect. File(/home/
httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/AlexSchein/
SpeedofLight/TheWhiteFlag.mp 3) is not within the allowed path(s): (/
home/httpd/vhosts/monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/
vhosts/monkeyclaus.org/httpsdocs/site_specific_f iles/makePurchase.ph p
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_f iles/
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******@geoci ties.comwrote:
On Mar 14, 2:16 am, "lawrence k" <lkrub...@geoci ties.comwrote:
>On Mar 13, 2:20 pm, luiheidsgoe...@ hotmail.com wrote:
e path: /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/
AlexSchein/SpeedofLight/TheWhiteFlag.mp 3
httpdocs....
Warning: file_exists(): open_basedir restriction in effect.
File(...httpdo cs...) 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 <Directoryher e 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
1428
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 looking for?" accross the top and a bunch of links to search.windowenhancer.com. I must have downloaded something and inadvertantly got this on my machine. Anyone know how I can get this off so I can read my development error messages again? Scott
4
2783
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 basic things as "class", "operator ::", or even my compiler's error-messages would get explained in a quick-reference kind of way (as turbo pascal did with the pascal-language). Therefore I was forced to read some books and tutorials. However, I'm...
1
3675
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: db2fm(21697) has SIGCHLD set to SIG_IGN but calls wait(). Jul 10 09:04:45 kernel: (see the NOTES section of 'man 2 wait'). Workaround activated. Jul 10 09:05:46 kernel: application bug: db2fm(21724) has SIGCHLD set to
1
2662
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 that says: 'There was a problem retrieving printer information for this object. The object may have been sent to a printer that was unavailable.' When I choose 'report wizard', I can go through all of the steps but then I get an error message...
1
4610
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 code: Dim FileName15, FileName16 As String Filename15 = "mytextfile.txt" Fileopen(15, FileName15, Mode.Output) Fileopen(16, FileName16, Mode.Output)
4
6922
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 "<interactive input>", line 1, in ?
2
19496
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
3
6575
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 D:\Oracle\Core\Apache\Apache\logs\*.* >>vh.txt del /F /Q D:\Oracle\CoreMid\opmn\logs\*.* >>vh.txt del /F /Q D:\Oracle\CoreMid\webcache\logs\*.* >>vh.txt del /F /Q D:\Oracle\CoreInfra\opmn\logs\*.* >>vh.txt I am appending the output in each case except line 1 - that part is...
0
9566
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10300
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9127
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.