Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy doesn't my SSI work?
    text
    copied!<p>I am having problems with passing query params into SSI include from within my zend framework application.</p> <p>I am trying to include a PHP file inside another PHP:</p> <pre><code>&lt;!--#include virtual='/ssi/test.php?x=hello' --&gt; </code></pre> <p>This executes properly, if my hellotest.php (which contains the above line) resides in my document root.</p> <p>If, however I do the same thing from within my template.phtml (not /public_html/hellotest.php anymore) (I am using Zend Framework for this project) , the test.php is called and executed without any query parameters (in this case x=hello). No query parameters are passed into test.php from withitn my zend_framework templates .</p> <p>Does this have anything to do with the way zend framework uses .htaccess ? Here is a copy of my .htaccess files (in web root: /public_html/.htaccess)</p> <pre><code> 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] </code></pre> <p>EDIT: I've recently found out, that it will pass parameters into the SSI taken from URL . So if in my browser I type <a href="http://www.test.com/controller/action?param1=something" rel="nofollow noreferrer">http://www.test.com/controller/action?param1=something</a> , it will actually pass param1 into the SSI , but it will totally ignore the params I have on the SSI line. ... anyone has experience with this ?</p> <p>EDIT2 - in response to Tim Fountain: correct, my test.php is at public_html/ssi/test.php .. However, I am calling from a ZF template file , which gets parsed by ZF always..not sure what you ment by "as long as it's not parsed by ZF" . In my test.php I simple output var_dump($_GET) - nothing else is in that php file, just that one line. And the way I call it from the ZF template file is like so: <code>&lt;!--#include virtual='/ssi/test.php?x=hello' --&gt;</code></p> <p>. the strange thing is, that if I type <a href="http://mydomain.com/controller/action/?x=hi_there" rel="nofollow noreferrer">http://mydomain.com/controller/action/?x=hi_there</a> , it will actually pass that X param to my SSI include line , and will overwrite whatever I had there originally (x=hello) . If I don't pass anything in the URL, nothing will get passed to SSI.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload