bcremer / shopware-with-nginx

Running shopware using NGINX
http://shopware.com
BSD 2-Clause "Simplified" License
95 stars 46 forks source link

Change FastCGI Param SCRIPT_FILENAME #22

Closed FiveDigital closed 7 years ago

FiveDigital commented 8 years ago

This change is needed otherwise the index.php will be printed int the installer like this: <link rel="stylesheet" type="text/css" href="/recovery/install/index.php/../common/assets/styles/reset.css" media="all"/> because of https://github.com/shopware/shopware/blob/5.2/recovery/common/src/Utils.php#L48-L68

bcremer commented 8 years ago

I am unable to reproduce this error.

https://some.site/recovery/install/index.php/requirements/?language=en generates the following href for me recovery/install/../common/assets/styles/reset.css

FiveDigital commented 8 years ago

We are using nginx version: nginx/1.10.0 (Ubuntu) and PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS ) perhaps something has changed?

bcremer commented 8 years ago

nginx version: nginx/1.10.1 and PHP 7.0.9 (cli) (built: Jul 20 2016 17:12:28) ( NTS ) so it's not about the version.

What is your cgi.fix_pathinfo value?

FiveDigital commented 8 years ago
cat /etc/php/7.0/fpm/php.ini | grep fix_pathinfo
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
cgi.fix_pathinfo=0
bcremer commented 8 years ago

In public static function getBaseUrl($app) what do you get for and for $_SERVER['SCRIPT_FILENAME']) and $app->request()->getScriptName();?