roxen.lists.roxen.general

Subject Author Date
Roxen + path_info with PHP as CGI? <gnudiff <> 18-03-2006
Hello,

I was wondering if it was possible to set up rewrite rules or
something else within Roxen so that PHP called via CGI would
understand the PATH_INFO style URLs?

I have PHP/CGI running OK via the redirect module:
/(.*)\.php(.*)$         /cgi-bin/php/$1.php$2

However, when I try to call a path_info style url:  GET /test.php/boo/3/foo/2 ,
the request does get forwarded to CGI module, however PHP seems to not
understand that and returns: No input file specified (same as if  I
would specify non-existing php file).

I have added also the PATH_INFO module to Roxen, but that doesn't seem
to work that simple.

I tried to look at resolve path and it seems that pathinfo module does
get called, but since it is MODULE_LAST, maybe it's too late?

Any suggestions?

TIA,
Emils


Canonic URL: http://MYHOST/vpp/t.php/doo/3
Resolving /vpp/t.php/doo/3 in devel

   1. First module Redirect Module (modules/filters/redirect.pike)
      Real time: 0.00008 CPU time: 0.00

   2. First module Automatic sending of compressed files
(modules/filters/auto_gzip.pike)
         1. Stat file "/cgi-bin/php/vpp/t.php/doo/3.gz".
               1. Location module [/cgi-bin/] Scripting: CGI scripting
support (modules/scripting/cgi.pike)
                  Real time: 0.00006 CPU time: 0.00

               2. Location module [/] / from /data/we.../phpBB2/
(modules/filesystems/filesystem.pike)
                  Real time: 0.00003 CPU time: 0.00
            Returned 'no such file'.
            Real time: 0.00036 CPU time: 0.00
      Real time: 0.00042 CPU time: 0.00

   3. Request for /cgi-bin/php/vpp/t.php/doo/3
         1. Location module [/cgi-bin/] Scripting: CGI scripting
support (modules/scripting/cgi.pike)
               1. Calling find_file()...
                  Real time: 0.00003 CPU time: 0.00
            Real time: 0.00006 CPU time: 0.00

         2. Location module [/] / from /data/we.../phpBB2/
(modules/filesystems/filesystem.pike)
               1. Calling find_file()...
                     1. find_file("cgi-bin/php/vpp/t.php/doo/3")
                        No file
                        Real time: 0.00002 CPU time: 0.00
                  Real time: 0.00006 CPU time: 0.00
            Real time: 0.00009 CPU time: 0.00
      Returned 'no such file'.
      Real time: 0.00032 CPU time: 0.00

   4. Filter module Supports filter (modules/filters/supports_filter.pike)
      Real time: 0.00000 CPU time: 0.00

   5. Last try module URL Rectifier (modules/filters/url_rectifier.pike)
      Real time: 0.00000 CPU time: 0.00

   6. Last try module Scripting: Path info support (modules/misc/pathinfo.pike)
         1. Stat file "/cgi-bin/php/vpp/t.php".
               1. Location module [/cgi-bin/] Scripting: CGI scripting
support (modules/scripting/cgi.pike)
                  Real time: 0.00002 CPU time: 0.00

               2. Location module [/] / from /data/we.../phpBB2/
(modules/filesystems/filesystem.pike)
                  Real time: 0.00002 CPU time: 0.00
            Returned 'no such file'.
            Real time: 0.00022 CPU time: 0.00

         2. Stat file "/cgi-bin/php".
               1. Location module [/cgi-bin/] Scripting: CGI scripting
support (modules/scripting/cgi.pike)
                  Real time: 0.00002 CPU time: 0.00
            Stat ok.
            Real time: 0.00010 CPU time: 0.00

         3. Returned recurse
               1. First module Redirect Module (modules/filters/redirect.pike)
                  Real time: 0.00000 CPU time: 0.00

               2. First module Automatic sending of compressed files
(modules/filters/auto_gzip.pike)
                     1. Stat file "/cgi-bin/php.gz".
                           1. Location module [/cgi-bin/] Scripting:
CGI scripting support (modules/scripting/cgi.pike)
                              Real time: 0.00002 CPU time: 0.00

                           2. Location module [/] / from
/data/we.../phpBB2/ (modules/filesystems/filesystem.pike)
                              Real time: 0.00002 CPU time: 0.00
                        Returned 'no such file'.
                        Real time: 0.00021 CPU time: 0.00
                  Real time: 0.00025 CPU time: 0.00

               3. Request for /cgi-bin/php
                     1. Location module [/cgi-bin/] Scripting: CGI
scripting support (modules/scripting/cgi.pike)
                           1. Calling find_file()...
                              Real time: 0.02334 CPU time: 0.01
                        Real time: 0.02345 CPU time: 0.01
                  Returned ok. No data (open file)<br />
                  Real time: 0.02357 CPU time: 0.01

               4. Filter module Supports filter
(modules/filters/supports_filter.pike)
                  Real time: 0.00001 CPU time: 0.00
            Recurse done
            Real time: 0.02437 CPU time: 0.01
      Last try done
      Real time: 0.02480 CPU time: 0.01

Real time: 0.02609 CPU time: 0.01