hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Requests with trailing / to php script request result in file not found --

Open joelastpass opened this issue 16 years ago • 7 comments

Create a file called blah.php

" .$_SERVER['SCRIPT_URI']; ?>

go to http://localhost/blah.php/test

With hiphop you get a 404 with the warning: HipHop Notice: Tried to invoke blah.php/test but file not found.

With Apache you get: /blah.php/test http://localhost/blah.php/test

joelastpass avatar Aug 23 '10 19:08 joelastpass

I know we match Apache 1 behaviour with SCRIPT_URI and SCRIPT_NAME and PHP_SELF.

How did you invoke hphpi / hphp?

It looks like it works for me.

scottmac avatar Aug 24 '10 00:08 scottmac

I wasn't very clear in this example -- the key issue is that hphpi thinks that /blah.php/test is a directory named blah.php/ with a file called 'test' in it whereas apache loads blah.php

This should be easy to reproduce if you use the URL like my example (take any .php url you have and put /asdf at the end -- in apache it would still load).

$HPHP_HOME/src/hphpi/hphpi -m server -p 8080 -v "Server.SourceRoot=pwd" -v "S erver.DefaultDocument=index.php" -v "Log.Level=Verbose" -c ./.hphp/mime.hdf

joelastpass avatar Aug 24 '10 02:08 joelastpass

It's probably not terribly important that this be fixed as you can utilize rewrite rules in nginx/apache to convert it to something hiphop would like.

joelastpass avatar May 02 '11 19:05 joelastpass

any update on this issue??

sandeepuno avatar Oct 08 '12 10:10 sandeepuno

Hi! I actually ran into this issue as well http://www.hiphop-php.com/wp/?p=113 and have it on my personal TODO list. I can't promise an ETA, but as soon as I can, I intend to address it.

sgolemon avatar Oct 08 '12 20:10 sgolemon

Hi, Thanks for the response, I think i managed to work with dirindex in virtualhost for time being.. btw nice blog..

sandeepuno avatar Oct 08 '12 23:10 sandeepuno

We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575

If this is still an issue, please re-open it, and in order of goodness:

  1. Give detailed repro steps
  2. Write a test case in hphp/tests/quick (run it with hphp/tests/run) and send the pull request
  3. Fix it in a pull request

ptarjan avatar May 13 '13 22:05 ptarjan