Fastcgi_split_path_info capture group bug?

I’m running nginx v0.8.54 (latest stable), and I’m having issues with
fastcgi_split_path_info passing the query parameters into PATH_INFO

e.g., http://example.com/index.php/foo/bar/?id=1 breaks is passed to
fcgi as

SCRIPT_FILENAME = /var/www/index.php          (good)
PATH_INFO       = /foo/bar/?id=1              (bad)

I’ve defined the split in my config as:

  fastcgi_split_path_info ^(.+\.php)(.*)\??$;

  fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
  fastcgi_param PATH_INFO         $fastcgi_path_info;

The second capture group should only grab “/foo/bar/”, am I doing
something obviously wrong here?

Posted at Nginx Forum:

uid_b Wrote:

scratch that!

regex was a little greedy, should look like:
^(.+.php)(.*?)?

unless of course you’re using the pcre library which can’t handle ??

this actually works: ^(.+.php)([^?]).$

Posted at Nginx Forum:

scratch that!

regex was a little greedy, should look like: ^(.+.php)(.*?)?

Posted at Nginx Forum: