PHP open_basedir problem with mount

area62

Verified User
Joined
Sep 23, 2008
Messages
44
I've recently installed a new server with DirectAdmin, but i'm having a problem with the PHP open_basedir. This is because my /home dir is a mount to /data/home, i mounted it according to this article (http://help.directadmin.com/item.php?id=247)

Here is my /etc/fstab file:

Code:
LABEL=/                 /                       ext3    defaults,usrquota,grpquota      1 1
LABEL=/data             /data                   ext3    defaults        1 2
LABEL=/log              /log                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext2    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda3         swap                    swap    defaults        0 0
/data/home  /home  bind  nosuid,bind  0  0

Does anyone know how to solve my problem?
 
You know that open_basedir is depreciated in php 5.3 right?
 
No, i didn't. That might changes the situation... although i think it's safer to run with open_basedir set

EDIT: i can't find the deprecation of open_basedir... only safe mode that's gonna be deprecated
 
Last edited:
No, i didn't. That might changes the situation... although i think it's safer to run with open_basedir set

EDIT: i can't find the deprecation of open_basedir... only safe mode that's gonna be deprecated

Yes, your "edit" is correct :) You should not mount your "/home" directory with nosuid option. It tells you to do so for /tmp only.
 
Last edited:
Yes, your "edit" is correct :) You should not mount your "/home" directory with nosuid option. It tells you to do so for /tmp only.

This is in the knowledgebase:

"and mount the /home partition with the nosuid option"

I fixed the problem:

Code:
Note that there was a bug with 5.2.15 where open_basedir was broken.
We've since changed the source code to have the fix in it, so if you have 5.2.15 and installed DA a few days ago, you might need to grab the new source.
Type:
 
cd /usr/local/directadmin/custombuild
./build update
./build php n
 
past that, paste me any errors you get.

Thank you,
 
John
 
If you didn't already discuss with John at DirectAdmin about fixing the error, then please post the URL here so he can get it fixed.

Thanks.

Jeff
 
Back
Top