Operating System - HP-UX
1832984 Members
2986 Online
110048 Solutions
New Discussion

PHP MultiViews/Content Negition

 
Dan Parnell
New Member

PHP MultiViews/Content Negition

Hello there -

I am running HP-UX 11iv1 and have recently set up the HPWS suite.

However, I have discovered that the HP-provided PHP was not compiled with mime magic support and did not include the Fileinfo extension, so attempting to use MultiViews for Content Negotiation only works at the most extremely basic of levels (intelligent enough to turn a request for http://some.server/index into http://some.server/index.php) but is utterly useless when attempting to use it to hide architectures and generate clean URLs.

For example,
- http://some.server/index.php?foo=bar
Is a dirty URL which I do not want. On almost any other distribution of PHP, mime_magic capability is built into PHP (not to be confused with Apache's own mime_magic), so I can clean up the URL thusly:
- http://some.server/index/foo/bar

This does not work with the HPWS. A 404 error is generated indicating that http://some.server/index.php/foo/bar cannot be found. This means that while Apache's MultiViews are getting the index.php expansion right, PHP doesn't seem to know what to do with itself.

This would normally be solved by simply installing the Fileinfo extension, but ever-so-helpfully half the tools for compiling and/or installing prebuilt PHP extensions are inexplicably missing from the distribution of HPWS.

I am open to any and all suggestions, including links to or attachments of pre-built Fileinfo extensions that I only have to move into the correct locations -- PEAR/PECL packages won't work because the command-line PHP interpreter is missing (?!) in the HPWS.

Thanks!

- Dan Parnell