Re: questions about document_root

2011-12-08 Thread Mark Montague
On December 8, 2011 1:48 , Rui Hu tchrb...@gmail.com wrote: 2011/12/8 Rui Hu tchrb...@gmail.com mailto:tchrb...@gmail.com Is $DOCUMENT_ROOT in php-cgi determined by ap_add_common_vars() in Apache? It seems not to me. I commented the line 237 assigning DOCUMENT_ROOT and re-compiled

questions about document_root

2011-12-07 Thread Rui Hu
Hi, I want to modify apache core to implement a function which can achieve following expectations: when I request 1000.xxx.com/test.php ( curl 1000.xxx.com/test.php), originally apache will get absolute address as $document_root/test.php, but I want apache to get $document_root/1000/test.php.

Re: questions about document_root

2011-12-07 Thread Nick Kew
On 7 Dec 2011, at 10:54, Rui Hu wrote: Hi, I want to modify apache core to implement a function which can achieve following expectations: That's a simple task for a simple module. Since you talk of modifying the core, I infer you're not familiar with the modular structure. If I might

Re: questions about document_root

2011-12-07 Thread Rui Hu
Thanks for you advice. I just started to learn Apache PHP. I looked up the code of PHP and apache2, and found that PHP gets docroot from environment var $DOCUMENT_ROOT. However in apache, I cannot find any code which assign this var. I googled but got nothing. Can you please show me the

Re: questions about document_root

2011-12-07 Thread Mark Montague
On December 7, 2011 23:23 , Rui Hu tchrb...@gmail.com wrote: I looked up the code of PHP and apache2, and found that PHP gets docroot from environment var $DOCUMENT_ROOT. However in apache, I cannot find any code which assign this var. I googled but got nothing. Can you please show me the

Re: questions about document_root

2011-12-07 Thread Rui Hu
2011/12/8 Rui Hu tchrb...@gmail.com Is $DOCUMENT_ROOT in php-cgi determined by ap_add_common_vars() in Apache? It seems not to me. I commented the line 237 assigning DOCUMENT_ROOT and re-compiled apache. php-cgi still works fine. It seems that $DUCUMENT_ROOT in php-cgi is not determined by