open_basedir conflict PHP / PEAR

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
rgunther
New Forum User
New Forum User
Posts: 1
Joined: Thu Aug 24, 2006 10:24 pm

open_basedir conflict PHP / PEAR

Unread post by rgunther »

I'm running Plesk 8.0.1 on Fedora Core 2

I have the following in my yum.conf, besides the defaults

Code: Select all

[atomic]
baseurl=http://3es.atomicrocketturtle.com/atomic/art/$releasever/
The other day I did a yum update, which updated a LOT of packages. One of those was PHP Version 5.0.4.

I then installed Pear with YUM.

A problem came up related to PHP & Pear.

include_path .:/usr/share/pear
open_basedir /home/httpd/vhosts/mysite.com/httpdocs:/tmp

Now, as I understand it files can only be included under the httpdocs path and the tmp path which sounds good to me security wise. I started getting errors on my PHP pages about open_basedir.

After looking around I suspected that it was looking for PEAR includes in the include_path but that is outside the realm of access based on the open_basedir path.

I added /usr/share/pear to this file:

/home/httpd/vhosts/myside.com/httpd.include under two lines that reference open_basedir under sapi_apache2.c and mod_php5.c and that specific site seems to be back up and running.

The issues with this is is states not to make changes to that file as it can cause problems. Where can I made changes so they are perminent and affect all sites?
jas8522
Forum User
Forum User
Posts: 52
Joined: Mon Jan 09, 2006 4:02 pm

Correct place to make changes

Unread post by jas8522 »

Hey,

Create a file called vhost.conf within the same dir as the httpd.include file you found, and enter your open_basedir lines there.

If you look in httpd.includes for the domain, you will see that it includes the vhost.conf file near the bottom (do a search in the file for it), so that will give you an idea of where the stuff you throw in vhost.conf will 'appear' in the code.

Jordan
Dree
New Forum User
New Forum User
Posts: 2
Joined: Sat Jan 13, 2007 9:03 am

Unread post by Dree »

I just updated one of my servers to PHP5.0.4, and came across this problem as well. It's a pretty big problem as well, because running websites will be broken after installing this RPM.

I fixed it using a patch from the bugs.php.net website:
http://bugs.php.net/bug.php?id=31054

If anyone wants a step-by-step description of how to implement this patch into ART's src.rpm for PHP5.0.4 I can post it.
Post Reply