Welcome! Log In Create A New Profile

Advanced

Re: Problem with fastcgi_split_path_info on ubuntu precise

May 03, 2013 09:56PM
Have you added

cgi.fix_pathinfo=0

into /etc/php5/fpm/php.ini and restarted php?

Steve

On Fri, 2013-05-03 at 21:44 -0400, zakaria wrote:
> Hi,
>
> I must be missing something obvious here.
> I rerun my ubuntu configuration script and suddenly my nginx setup not
> working correctly anymore.
>
> Here my relevant nginx config:
> ----------------------------------------------------------------------
> location ~ [^/]\.php(/|$) {
> fastcgi_split_path_info ^(.+?\.php)(/.*)$;
> fastcgi_param PATH_INFO $fastcgi_path_info;
> try_files $fastcgi_script_name =404;
>
> fastcgi_pass unix:/var/run/php5-fpm.sock;
> fastcgi_index index.php;
> include fastcgi_params;
> }
> ----------------------------------------------------------------------
>
> And I test it with /test.php
> ----------------------------------------------------------------------
> <pre><?php var_export($_SERVER)?></pre>
> ----------------------------------------------------------------------
>
> When I request http://lemp.test/test.php/foo/bar.php the result is:
> ----------------------------------------------------------------------
> array (
> 'USER' => 'www-data',
> 'HOME' => '/var/www',
> 'FCGI_ROLE' => 'RESPONDER',
> 'PATH_INFO' => '',
> 'QUERY_STRING' => '',
> 'REQUEST_METHOD' => 'GET',
> 'CONTENT_TYPE' => '',
> 'CONTENT_LENGTH' => '',
> 'SCRIPT_FILENAME' => '/var/www/test.php',
> 'SCRIPT_NAME' => '/test.php',
> 'REQUEST_URI' => '/test.php/foo/bar.php',
> 'DOCUMENT_URI' => '/test.php',
> 'DOCUMENT_ROOT' => '/var/www',
> 'SERVER_PROTOCOL' => 'HTTP/1.1',
> 'GATEWAY_INTERFACE' => 'CGI/1.1',
> 'SERVER_SOFTWARE' => 'nginx/1.4.0',
> 'REMOTE_ADDR' => '192.168.56.1',
> 'REMOTE_PORT' => '59200',
> 'SERVER_ADDR' => '192.168.56.3',
> 'SERVER_PORT' => '80',
> 'SERVER_NAME' => '',
> 'HTTPS' => '',
> 'REDIRECT_STATUS' => '200',
> 'HTTP_HOST' => 'lemp.test',
> 'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0)
> Gecko/20100101 Firefox/20.0',
> 'HTTP_ACCEPT' =>
> 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
> 'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5',
> 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
> 'HTTP_CONNECTION' => 'keep-alive',
> 'HTTP_CACHE_CONTROL' => 'max-age=0',
> 'PHP_SELF' => '/test.php',
> 'REQUEST_TIME' => 1367630910,
> )
> ----------------------------------------------------------------------
>
> What did I miss?
>
> Sincerely yours,
>
>
> -- Zakaria
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238825,238825#msg-238825
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Skype: sholdowa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 03, 2013 09:44PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

GreenGecko May 03, 2013 09:56PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 03, 2013 11:23PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 04, 2013 07:58AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 04, 2013 07:41PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

B.R. May 04, 2013 08:16PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 04, 2013 09:02PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 05, 2013 04:00AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 05, 2013 07:04AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 07, 2013 04:38PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

vilsack May 13, 2013 02:49PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 14, 2013 05:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready