Dolibarr ERP & CRM » Bugs » bug #873
Problem with DOL_URL_ROOT with NginxÉtat Détails |
Last Modified On: | 03/05/2013 12:31 | | Submitted by: | Sébastien Maccagnoni-Munch (tiramiseb) |
Submitted on: | 03/05/2013 12:31 | |
Summary: | Problem with DOL_URL_ROOT with Nginx |
Description: | I've installed Dolibarr in a subpath on Nginx with FastCGI and PHP-FPM (migration from an Apache serveur with mod_php). With Apache + mod_php, I don't have this problem. I don't know why.
The problem seems to be in filefunc.inc.php, on line 161 :
if ($real_dolibarr_main_document_root == @realpath($pathroot.$concatpath)) // @ avoid warning when safe_mode is on.
- The first exploded path part is always an empty string, because SCRIPT_NAME starts with "/".
- $real_dolibarr_main_document_root is the path to the "htdocs" directory.
- $pathroot (defined as $_SERVER["DOCUMENT_ROOT"]) is the path to the directory where the script is executed, so $pathroot is the path to the "htdocs" directory.
At the first occurrence of the test on line 161, $concatpath = "" and $real_dolibarr_main_document_root = $pathroot ; this test is always true, whatever the real script path is.
To override this, I've changed line 161 :
if (!empty($tmppath) && $real_dolibarr_main_document_root == @realpath($pathroot.$concatpath)) // @ avoid warning when safe_mode is on.
|
Step to reproduce bug: | Install Dolibarr in a subpath on Nginx with FastCGI and PHP-FPM (migration from an Apache serveur with mod_php). |
Version: | 3.3.1 | | Category: | Other |
Severity: | 5 - Major | | OS Type/Version: | |
PHP version: | | | Database type and version: | |
Etat |
Status: | Open | | Assigned to: | Aucun |
Resolution: | Aucun | |
Répondre
|
|