Dynamic open_basedir and mod_vhost_alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe anyone can point me in the right direction.

I need to modify this patch
http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php
and replace VIRTUAL_DOCUMENT_ROOT on the real path.

As described in patch note - "When using mod_vhost_alias the
DOCUMENT_ROOT = PATH_TRANSLATED - SCRIPT_NAME(request_uri)"

But in fact this is not always true. If we used any redirection
(mod_rewrite) for example, in the request_uri would be modified uri

For example

1. Without any redirects
url - http://project.domain.com/subdir1/test.php
SG(request_info).path_translated=/var/www/vhosts/project/subdir1/test.php
SG(request_info).request_uri=/subdir1/test.php

Looks everything is ok.

So we can use something like this
doc_root = strncpy( real_open_basedir_path,
SG(request_info).path_translated,
strlen(SG(request_info).path_translated) -
strlen(SG(request_info).request_uri) );

2. With some kind of redirects
url - http://magento.domain.com/index.php
SG(request_info).path_translated=/var/www/vhosts/magento/index.php
SG(request_info).request_uri=/index.php/install

And that is a BIG problem.

So my question. Could we get in php, maybe through apache API original
uri or doc_root? So later we can replace VIRTUAL_DOCUMENT_ROOT on the real path?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux