$_GET empty with Apache and content negotiation
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

$_GET empty with Apache and content negotiation

From: <dalyian39@gmail.com>
Date: Thu Oct 20 2005 - 21:33:51 CEST

Hello,

I'm pretty new to PHP but I have a page, B.php, which runs fine, but I
want to be able to call this as B (long story), i.e.
http://mysite/B?foo=bar should be equivalent to calling
http://mysite/B.php?foo=bar.

I've tried creating a symlink on the filesystem B -> B.php but that
just sends the text content of the B.php file itself back to the
caller. (I kind of thought I'd get away with that =) )

My config is Red Hat 9.0 with the included Apache 2.0.40. PHP seems to
built in to the core instead of as a module because it just works and
there's no included module in httpd.conf.

What I've done now is to try the type-map approach from the docs at
http://httpd.apache.org/docs/2.0/content-negotiation.html and added a
file called B.var with contents

URI: B

URI: B.php
Content-type: application/php

Now the call to http://mysite/B?foo=bar works, and the PHP executes,
but the variable $_GET is empty whereas it is not when I execute
http://mysite/B.php?foo=bar.

Undoubtedly it's something to do with mime types or something.

Any thoughts, or suggestions?

Thanks
Ian
Received on Mon Oct 24 02:11:22 2005