Hi, I use nginx with php-fpm in server .This condition " strpos(php_sapi_name(), 'cgi') !== false
" here cause $script_name
to come from $_SERVER['PHP_SELF']
(which is empty) instead of $_SERVER['SCRIPT_NAME]
. so it makes baseurl empty and other problem.
I remove this condition temporarily to fix this issue.
should I change nginx config to fix it ?
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Title |
|
Did you resolve this - it sounds like a server config issue and not a real joomla issue as many people use nginx for their joomla sites.
Resolved, The issue was from bad php and nginx configuration.
working setup :
nginx :
location ~ \.php(.*)$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
}
php.ini :
cgi.fix_pathinfo=1
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-27 14:16:07 |
Closed_By | ⇒ | samanmohamadi |
Hi,
I'm not sure, but I think, you need to update php5-fpm config (host's pool). I think you can define the PHP_SELF manually...