sshutdownow / mod-myvhost

Automatically exported from code.google.com/p/mod-myvhost
Apache License 2.0
5 stars 5 forks source link

PHP open_basedir doesn't work. #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With http://code.google.com/p/mod-myvhost/wiki/InstallDBD

DBDocRoot "SELECT `rootdir` AS DocumentRoot,`admin` AS 
ServerAdmin,`extra_php_config` AS php_admin FROM `vhosts` WHERE (`vhost` LIKE 
%s OR CONCAT_WS('.', 'www', `vhost`) LIKE %s) AND `enabled`='yes' LIMIT 1" 
HOSTNAME HOSTNAME

I'd successful installed & compiled the module for Apache/2.2.14 (Ubuntu) with 
mod_php & mysql5.

All rows in the db are correctly opened for each host but open_basedir 
functionality don't work with my config.

With phpinfo() I see :
- open_basedir  no value    no value (in Core)
-_SERVER["php_admin"] -> open_basedir "/home/neuro/testvh1" (in PHP Variables)
-php_admin -> open_basedir "/home/user1/testvh1" (in Apache Environment)

Nothing with LogLevel debug :/

It's work perfectly for change/add rootdir or host-name, the issue is only for 
open_base dir, php can remote to /

Is the Core value should change?
Is there another way to change open_basedir in the DB?

Thanks in advance.

Original issue reported on code.google.com by alex.sbi...@gmail.com on 30 Oct 2010 at 4:14

GoogleCodeExporter commented 9 years ago
Is safe_mode on? It must globally off.

Original comment by iPop...@gmail.com on 4 Nov 2010 at 8:03

GoogleCodeExporter commented 9 years ago
Yep, safe_mode is off.

Original comment by alex.sbi...@gmail.com on 4 Nov 2010 at 10:28

GoogleCodeExporter commented 9 years ago
What CFLAGS have been used for compilation?

Original comment by iPop...@gmail.com on 4 Nov 2010 at 10:57

GoogleCodeExporter commented 9 years ago
I doesn't used the Makefile but this command:
apxs2 -cia -I /usr/include/mysql -L /usr/lib/mysql -lmysqlclient mod_vhost_dbd.c
Without any errors. 

Original comment by alex.sbi...@gmail.com on 4 Nov 2010 at 12:35

GoogleCodeExporter commented 9 years ago
To enable PHP support you should rebuild module with WITH_PHP macro defined, 
i.e.:
apxs2 -cia -DWITH_PHP -I /usr/include/mysql -L /usr/lib/mysql -lmysqlclient 
mod_vhost_dbd.c

I think, that I may close ticket.

Original comment by iPop...@gmail.com on 4 Nov 2010 at 5:05

GoogleCodeExporter commented 9 years ago
Ok, Thanks for the support ;)

Original comment by alex.sbi...@gmail.com on 4 Nov 2010 at 5:14

GoogleCodeExporter commented 9 years ago

Original comment by iPop...@gmail.com on 4 Nov 2010 at 5:19