I am having problems passing request parameters to SSI from within my zend framework application.
I am trying to include a PHP file in another PHP:
This works correctly if my hellotest.php (which contains the line above) is in my document root directory.
If, however, I do the same from inside my template.phtml (not / public_html / hellotest.php) (I use the Zend Framework for this project), test.php is called and executed without any query parameters (in this case x = hello). No request parameters are passed to test.php from our zend_framework templates.
Does this have anything to do with how the zend framework uses .htaccess? Here is a copy of my .htaccess files (in the web root: /public_html/.htaccess)
SetEnv APPLICATION_ENV development AddOutputFilter INCLUDES .php RewriteEngine On RewriteRule (.*/?)(.*css)$ combine.php?type=css&files=$1$2 [NC,L] RewriteRule (.*/?)(.*js)$ combine.php?type=js&files=$1$2 [NC,L] RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]
EDIT: Recently, I found out that it will pass parameters to SSI taken from the URL. Therefore, if in my browser I type http://www.test.com/controller/action?param1=something , it will actually pass param1 to SSI, but it will completely ignore the parameters that I have SSI lines .... who have experience?
EDIT2 - in response to Tim Fountain: right, my test.php is in public_html / ssi / test.php. However, I am calling from the ZF template file, which ZF always parses. Not sure what you mean "as long as it is not processed by ZF." In my test.php, I just exit var_dump ($ _ GET) - nothing else in this php file, just one line. And the way I call it from the ZF template file looks like this: <!--#include virtual='/ssi/test.php?x=hello' -->
. it is strange that if I type http://mydomain.com/controller/action/?x=hi_there , it will actually pass this parameter X to my SSI include line and overwrite everything I was originally there (x = hello). If I do not pass anything in the URL, nothing will be transferred to the SSI.
php apache2 zend-framework
Gotys
source share