Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is PHP not seeing my query string?
    primarykey
    data
    text
    <p>This <a href="http://www.greengar.com/scores/info.php?qwerty=asdfg" rel="nofollow noreferrer" title="phpinfo()">phpinfo()</a> demonstrates the problem.</p> <p>I'm passing the URL a query string of:</p> <pre><code>?qwerty=asdfg </code></pre> <p>As a result, I'm expecting it to list these two PHP variables:</p> <pre><code>_REQUEST["qwerty"] asdfg _GET["qwerty"] asdfg </code></pre> <p>And also this query string:</p> <pre><code>_SERVER["QUERY_STRING"] qwerty=asdfg </code></pre> <p>However, it's not working. None of these variables seem to be set at all.</p> <p>I'm using lighttpd. This may or may not be related to the problem, but my greengar.com-lighttpd.conf looks like this, because I'm using WordPress for most of the domain's pages:</p> <pre><code>### Generated by Elliot ### Wordpress: http://www.greengar.com url.rewrite += ( "^/(wp-.+).*/?" =&gt; "$0", "^/(blog/wp-.+).*/?" =&gt; "$0", "^/(.*.php)" =&gt; "$0", "^/(.*.pdf)" =&gt; "$0", "^/(.*.png)" =&gt; "$0", "^/(.*.html)" =&gt; "$0", "^/(.*.ico)" =&gt; "$0", "^/(.*.gif)" =&gt; "$0", "^/(.*.txt)" =&gt; "$0", "^/(images).*/?" =&gt; "$0", "^/(sitemap.xml)" =&gt; "$0", "^/(xmlrpc.php)" =&gt; "$0", "^/(.+)/?$" =&gt; "/index.php/$1" ) </code></pre> <p>Again, I don't know for sure whether this is related to the problem.</p> <p>My question is: why isn't PHP seeing the query string?</p> <p>And how do I fix it?</p> <p>Here's a normal <a href="http://www.greengarstudios.com/scores/info.php?qwerty=asdfg" rel="nofollow noreferrer" title="phpinfo()">phpinfo()</a> which successfully sees the query string. This is running on a different server, which is running Apache.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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